本文整理汇总了C++中FnScene::DeleteGameFXSystem方法的典型用法代码示例。如果您正苦于以下问题:C++ FnScene::DeleteGameFXSystem方法的具体用法?C++ FnScene::DeleteGameFXSystem怎么用?C++ FnScene::DeleteGameFXSystem使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FnScene
的用法示例。
在下文中一共展示了FnScene::DeleteGameFXSystem方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: GameAI
//.........这里部分代码省略.........
genSpot[1][0] = 729.288;
genSpot[1][1] = -2472.88;
// Bad guys generator
for (int i = 0; i < NUM_OF_GENERATOR; i++)
{
if (!InArea(origin, genSpot[i], generator[i].range))
{
generator[i].in = 0;
generator[i].double_in = 0;
}
if (generator[i].in && InArea(origin, genSpot[i], generator[i].range))
{
generator[i].double_in = 1;
}
if (InArea(origin, genSpot[i], generator[i].range))
{
generator[i].in = 1;
}
if (generator[i].in == 1 && generator[i].double_in == 0)
generator[i].produce(origin, actoruDir, scene, i, NUM_OF_GENERATOR);
}
origin[2] = origin[2] + HEIGHTOFFSET; // need an offset to probe the hit
dir[0] = actorfDir[0] / ACTORPROBE;
dir[1] = actorfDir[1] / ACTORPROBE;
dir[2] = -1.0f;
//////////////////////////////////////////
// Homework #01 part 1
//////////////////////////////////////////
if (dirCount % SMOOTHINESS != 0)
{
if ((dirCount + SMOOTHINESS) % SMOOTHINESS < SMOOTHINESS / 2 + 1)
{
dirCount--;
actor.TurnRight(360 / SMOOTHINESS);
}
else
{
dirCount++;
actor.TurnRight(360 - 360 / SMOOTHINESS);
}
}
if ((FyCheckHotKeyStatus(FY_UP) || FyCheckHotKeyStatus(FY_S)) && dirCount % SMOOTHINESS == 0)
{
actor.SetDirection(camerafDir, camerauDir);
if (terrain.HitTest(origin, dir) > 0)
actor.MoveForward(RUNSPEED, FALSE, FALSE, 0, FALSE);
}
if (FyCheckHotKeyStatus(FY_D) && dirCount % SMOOTHINESS == 0)
actor.TurnRight(TURNSPEED);
if (FyCheckHotKeyStatus(FY_A) && dirCount % SMOOTHINESS == 0)
actor.TurnRight(360 - TURNSPEED);
else if (FyCheckHotKeyStatus(FY_RIGHT) && dirCount % SMOOTHINESS == 0)
{
actorfDir[0] = camerafDir[1];
actorfDir[1] = -camerafDir[0];
actor.SetDirection(actorfDir, actoruDir);
if (terrain.HitTest(origin, dir) > 0)
{
//actor.MoveRight(CALLIBRATION, FALSE, FALSE, 0, FALSE);
actor.MoveForward(RUNSPEED / 2, FALSE, FALSE, 0, FALSE);
}
}
else if (FyCheckHotKeyStatus(FY_LEFT) && dirCount % SMOOTHINESS == 0)
{
actorfDir[0] = -camerafDir[1];
actorfDir[1] = camerafDir[0];
actor.SetDirection(actorfDir, actoruDir);
if (terrain.HitTest(origin, dir) > 0)
{
//actor.MoveRight(CALLIBRATION, FALSE, FALSE, 0, FALSE);
actor.MoveForward(RUNSPEED / 2, FALSE, FALSE, 0, FALSE);
}
}
else if (FyCheckHotKeyStatus(FY_DOWN) && dirCount % SMOOTHINESS == 0)
{
actor.SetDirection(camerafDir, camerauDir);
actor.TurnRight(180.0f);
if (terrain.HitTest(origin, dir) > 0 && camVertical > MAXCAMANGLE)
actor.MoveForward(RUNSPEED, FALSE, FALSE, 0, FALSE);
}
//Tang: FX
if (gFXID != FAILED_ID) {
FnGameFXSystem gxS(gFXID);
BOOL4 beOK = gxS.Play((float)skip, ONCE);
if (!beOK) {
FnScene scene(sID);
scene.DeleteGameFXSystem(gFXID);
gFXID = FAILED_ID;
}
}
//Tang
}