int main() { SetupAll(); SetupBalls(); DoTimers(); LoadBitmaps(); DoBlock(); while (!key[KEY_ESC] && GoGame == 1) { CheckDead(); CheckBlock(); MoveBall(); if (BallsToDrop > 0) DropBalls(); if (Lives <= 0) GoGame = 0; DrawBack(); CheckExplode(); DrawBalls(); MoveMouse(); MoveStoneBlock(); WaitTimer(); flip(); } EndOfGame(); allegro_exit(); //Clean up allegro return 0; }
void AGameObject::Move( float t ) { MoveCounters( t ); if( CheckDead( t ) ) return; CheckNextCommand(); UpdateStats( t ); RecomputePath(); // Recomputes path towards destination, if applicable Walk( t ); // Walk towards destination FlushPosition(); }
void ZActor::OnUpdate(float fDelta) { if(m_pVMesh) { m_pVMesh->SetVisibility(1.f); } if (CheckFlag(AF_MY_CONTROL)) { m_TaskManager.Run(fDelta); CheckDead(fDelta); ProcessNetwork(fDelta); // for test - bird if (m_bTestControl) { TestControl(fDelta); } else { __BP(60,"ZActor::OnUpdate::ProcessAI"); if(isThinkAble()) ProcessAI(fDelta); __EP(60); } ProcessMovement(fDelta); } ProcessMotion(fDelta); if (CheckFlag(AF_MY_CONTROL)) { UpdateHeight(fDelta); } }