public override void Update(UltravioletTime time) { songPlayer.Update(time); var move = 0; if (Resources.Input.GetActions().SelectKey.IsPressed()) { Select(); } if (Resources.Input.GetActions().DownKey.IsPressed()) { move++; } if (Resources.Input.GetActions().UpKey.IsPressed()) { move--; } if (move < 0 && selected == MMenuHighligh.Play) { move = 0; } if (move > 0 && selected == MMenuHighligh.Exit) { move = 0; } selected += move; }
private static void Timer_Elapsed(object state) { //Timer.Change(Timeout.Infinite, 10); SongPlayer.Update(); Midi.MidiPlayer.Update(); //Timer.Change(10, 10); }
protected override void OnUpdating(UltravioletTime time) { songPlayer.Update(time); if (Ultraviolet.GetInput().GetActions().ExitApplication.IsPressed()) { Exit(); } base.OnUpdating(time); }