public Game1() { graphics = new GraphicsDeviceManager(this); Content.RootDirectory = "Content"; Tile.g = this; MainGame = this; }
/// <summary> /// The main entry point for the application. /// </summary> static void Main(string[] args) { using (Game1 game = new Game1()) { game.Run(); } }
public Sprite(Game1 g = null) { name = ""; options = new Dictionary<string, string>(); fileName = ""; x = -1; y = -1; width = -1; height = -1; img = null; passable = true; parentName = ""; }
static void Main() { var form = new Form1(); if (form.ShowDialog() == System.Windows.Forms.DialogResult.OK) { using (var game = new Game1()) { game.amountOfPlayers = form.amountOfPlayers; game.PlayerControllerChoices = form.PlayerControllerChoices; game.Run(); } } }
public void SetData(string main, Game1.GameState currGameState) { textToDraw = main; this.currentGameState = currGameState; switch (currentGameState) { case Game1.GameState.START: case Game1.GameState.LEVEL_CHANGE: secondaryTextToDraw = "Press ENTER to begin"; break; case Game1.GameState.END: secondaryTextToDraw = "Press ENTER to quit"; break; } }
public GameResources(String ResourceFileName, Game1 g) { if (!System.IO.File.Exists(ResourceFileName)) throw new GameException("Game resource '" + ResourceFileName + "' not found", GameException.LevelCatastrophic); Sprites = new Dictionary<string, Sprite>(); Persons = new Dictionary<string, Person>(); parent = g; badSprite = new Sprite(); XmlDocument xmlDc = new XmlDocument(); xmlDc.Load(ResourceFileName); spriteParse(xmlDc); mapParse(xmlDc); settingsParse(xmlDc); personsParse(xmlDc); }
static void Main() { using (var game = new Game1()) game.Run(); }
public GameState(Game1 game) { this.game = game; }
static void Main() { Application.Run(new starterform()); using (var game = new Game1()) game.Run(); }
public TitleScreenState(Game1 game) : base(game) { }
public PlayingState(Game1 game) : base(game) { }
public PausedState(Game1 game) : base(game) { }
public GameOverState(Game1 game) : base(game) { }
private Game1Factory(Game1 game) { _game = game; }
public Room7(Game1 game, Border border, GraphicsDeviceManager graphics) : base(game, border, graphics) { entityLoader = new Room7EntitiesLoadCommand(enemies, items, collidables, blocks, game.GetHUD().GetHeight()); this.backgroundSrcRec = new Rectangle(772, 532, 256, 176); entityLoader.Execute(); }