예제 #1
0
/*
 *  slowAnimate
 *  ------
 *  step through the animation process
 */
void slowAnimate()
{
  moveLight();
  moveTowerTops();
  moveShots();
  checkCollisions();
  moveMinions();
  checkCollisions();
  checkTowerRange();
}
예제 #2
0
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();
}