示例#1
0
/*
 *  slowAnimate
 *  ------
 *  step through the animation process
 */
void slowAnimate()
{
  moveLight();
  moveTowerTops();
  moveShots();
  checkCollisions();
  moveMinions();
  checkCollisions();
  checkTowerRange();
}
void glutTime(int toggle)
{
  if (gameStarted) {
    if (gamePaused != DEF_GAME_PAUSED) {
      moveTowerTops();
      moveBalls();
      checkCollisions();
      moveMinions();
      checkCollisions();
      checkTowerRange();
    }
    glutTimerFunc(50,glutTime,0);
  }
  redisplayAll();
}
示例#3
0
/*
 *  timer
 *  ------
 *  game animation logic turned on or off here
 */
void timer(int toggle)
{
  if (gameStarted) {
    if (gamePaused != DEF_GAME_PAUSED) {
      moveLight();
      moveTowerTops();
      moveShots();
      checkCollisions();
      moveMinions();
      checkCollisions();
      checkTowerRange();
    }
    glutTimerFunc(50,timer,0);
  }
  redisplayAll();
}