public override void Update(Skiing game, GameTime gametime) { if (keyboard.space()) { Active = false; } ElaspedTime += (float)gametime.ElapsedGameTime.TotalMilliseconds; if (ElaspedTime >= Delay) //AFTER THE ELASPED TIME IS GREATER THAN THE DELAY { //CHANGES THE FRAMES if (Frame == 1) { Frame = 0; } else { Frame = 1; } // ElaspedTime = 0; //RESETS THE TIME } base.Update(game, gametime); }
public override void Update(Skiing game, GameTime gametime) { nKey(gametime); qKey(gametime); base.Update(game, gametime); }
/// <summary> /// The main entry point for the application. /// </summary> static void Main(string[] args) { using (Skiing game = new Skiing()) { game.Run(); } }
public override void Update(Skiing game, GameTime gametime) { if (MouseClass.click()) { if (MouseClass.click(ButtonRec)) //WHEN THE USER CLIKCS THE BUTTON { Skiing.menu.Active = false; Skiing.mainGame.Active = true; Skiing.mainGame.Pause = true; Skiing.mainGame.RunOnce = false; //INITILISE VARIABLES Skiing.mainGame.Initialize(); Skiing.mainGame.Reset(); Skiing.userPrompts.Active = true; } } else { if (MouseClass.hover()) //IF THE USER IS HOVERING OVER THE BUTTON { if (MouseClass.hover(ButtonRec)) { ButtonColor = Color.Red; } else { ButtonColor = Color.White; } } } base.Update(game, gametime); }
public override void Reset(Skiing game) { Active = false; base.Reset(game); }