static void Main(string[] args) { using (Game1 game = new Game1()) { game.Run(); } }
// Fields. // Constructor. public HUD(Game1 game, Texture2D texture, Cursor cursor, Sprite sprite) { this.texture = texture; this.cursor = cursor; this.game = game; this.sprite = sprite; InitComponent(); }
// Constructor. public GameMain(Game1 game, int sizeX, int sizeY) { this.game = game; selection = new SelectionTile(Ressources.SelectionTest); mapBackground = new Map(Ressources.tileSetFloorInt, this.cursor, this.selection, 6, 0, map1); mapMiddleground = new Map(Ressources.tileSetInterieur, this.cursor, this.selection, 5, 4, map2); cursor = new Cursor(32, 32, 2); sprite = new Sprite(new Vector2(875, 30), 5, 4, 6 ,0, 0 ,0); hud = new HUD(this.game, Ressources.textureHUD, this.cursor, this.sprite); }
// Constructor. public Button(Game1 game, Cursor cursor, Texture2D texture, Vector2 position, string function, string title) { this.game = game; this.texture = texture; this.cursor = cursor; this.hitbox = new Rectangle((int)position.X, (int)position.Y, texture.Width, texture.Height); this.title = title; this.colorTitle = Color.Black; this.colorAlpha = Color.White; this.function = function; this.backState = BackButtonState.Released; /* Collsions */ this.textureData = new Color[this.texture.Width * this.texture.Height]; this.texture.GetData(this.textureData); }
static int Main() { Application.EnableVisualStyles(); // LevelEditorInterface editor = new LevelEditorInterface(); Game1 game2 = new Game1(); game2.Run(); /* using (Game1 game = new Game1()) { game.Run(); }*/ return 0; }
static void Main() { Game1 game = new Game1 (); game.Run (); }
static void Main() { using (var game = new Game1()) game.Run(); }