コード例 #1
0
ファイル: Powerup.cpp プロジェクト: jdnielse/Ryxius
orxOBJECT* Powerup::spawnPointObj(int val){
	orxVECTOR tempVec;
	orxObject_GetPosition(powerup, &tempVec);

	//make a point object
	stringstream pointsText;
	pointsText<<"Points";
	//cout<<enemyName; //debug to find enemy's name for the ini's
	orxOBJECT* pts = orxObject_CreateFromConfig(pointsText.str().c_str());
	stringstream string;

	string<<val;

	orxObject_SetTextString(pts, string.str().c_str());
	orxObject_SetPosition(pts, &tempVec);

	orxVECTOR ptSpeed;
	ptSpeed.fY = -50;
	ptSpeed.fX = 0;
	ptSpeed.fZ = 0;
	orxObject_SetSpeed(pts, &ptSpeed);
	//end point object

	orxCOLOR white;
	orxVECTOR w = {255,255,255};
	white.vRGB = w;
	white.fAlpha = 1;
	orxObject_SetColor(pts, &white);

	return pts;
}
コード例 #2
0
ファイル: FFCheckBox.cpp プロジェクト: Yariki/fightgame
FFCheckBox::FFCheckBox(FFBaseUiScene* parent, FFVector3& position, orxCHAR* name, 
	CHECKCHANGE oncheckchange)
	:FFBaseControl(parent,position,name)
{
	_OnCheckChange = oncheckchange != NULL ? oncheckchange : NULL;
	_state = CHB_NORMAL;
	_mainObject = orxObject_CreateFromConfig(CHECKBOX_SECTION);
	if(_mainObject)
	{
		orxObject_SetPosition(_mainObject,_position);
		for(orxOBJECT* obj = orxObject_GetOwnedChild(_mainObject); obj != orxNULL; obj = orxObject_GetOwnedSibling(obj))
		{
			const orxSTRING name = orxObject_GetName(obj);
			if(!orxString_Compare(name,CHECKBOX_CAPTION_SECTION))
			{
				_captionObject = obj;
				orxObject_SetTextString(_captionObject,_caption);
			}
		}
	}

}