public Menu(TornadoGame game) { Game = game; SelectedItem = MenuItems.NewGame; SelectedLevel = 0; State = MenuStates.Menu; Paused = false; Background = Game.Content.Load<Texture2D>(@"Graphics\Menu\cat5fade"); MenuItemTextures = new Texture2D[4]; MenuItemTextures[(int)MenuItems.Resume] = Game.Content.Load<Texture2D>(@"Graphics\Menu\resume"); MenuItemTextures[(int)MenuItems.NewGame] = Game.Content.Load<Texture2D>(@"Graphics\Menu\new"); MenuItemTextures[(int)MenuItems.LoadLevel] = Game.Content.Load<Texture2D>(@"Graphics\Menu\load"); MenuItemTextures[(int)MenuItems.Info] = Game.Content.Load<Texture2D>(@"Graphics\Menu\info"); EscTexture = Game.Content.Load<Texture2D>(@"Graphics\Menu\esc"); TitleTexture = game.Content.Load<Texture2D>(@"Graphics\Menu\title"); CursorFrame = 0; CursorTimeSinceLastFrame = 0.0f; CursorTexture = new Texture2D[4]; for (int i = 0; i < CursorTexture.Length; i++) CursorTexture[i] = Game.Content.Load<Texture2D>(@"Graphics\Menu\tornado" + (i + 1)); InfoFont = Game.Content.Load<SpriteFont>(@"Graphics\Font\CourierNew"); LevelFont = Game.Content.Load<SpriteFont>(@"Graphics\Font\CourierNew"); Music = new MusicTrack(Game.Content, 0.5f); Music.Load(0, "Music\\category5"); Music.Play(0, true); }
/// <summary> /// The main entry point for the application. /// </summary> static void Main(string[] args) { using (TornadoGame game = new TornadoGame()) { game.Run(); } }
public static void Initialize(TornadoGame g) { game = g; width = 0; height = 0; location = new Vector2(0, 0); blank = game.Content.Load<Texture2D>(@"Graphics\square"); }
public static void Initialize(TornadoGame game) { GameRef = game; }