public void Start(GameTime gameTime) { //called in Game().Update() if (!started) { started = true; Timer.Start(); } if (Timer.TimeUp(gameTime)) { i += .1; } i = Math.Round(i, 1); // i should be 0.59999 or 2.0000002, so should round to .1th if (Schedule.ContainsKey(i)) { Schedule[i](); Schedule.Remove(i); } }
protected override void Action() { if (Timer.TimeUp(GameEngine.gameTime)) { JustRevived = false; Timer.Stop(); } Move(); //user control Attack(); OtherActions(); base.Action(); if (!JustRevived) { if (ScoreTimer.TimeUp(GameEngine.gameTime)) { incScore(); } } }