예제 #1
0
 public Game1()
 {
     graphics = new GraphicsDeviceManager(this);
     Content.RootDirectory = "Content";
     Tile.g = this;
     MainGame = this;
 }
예제 #2
0
파일: Program.cs 프로젝트: Dutchman97/Game1
 /// <summary>
 /// The main entry point for the application.
 /// </summary>
 static void Main(string[] args)
 {
     using (Game1 game = new Game1())
     {
         game.Run();
     }
 }
예제 #3
0
 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 = "";
 }
예제 #4
0
        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;
     }
 }
예제 #6
0
 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);
 }
예제 #7
0
 static void Main()
 {
     using (var game = new Game1())
         game.Run();
 }
예제 #8
0
 public GameState(Game1 game)
 {
     this.game = game;
 }
예제 #9
0
파일: Program.cs 프로젝트: dusanp/lvledit
 static void Main()
 {
     Application.Run(new starterform());
     using (var game = new Game1())
         game.Run();
 }
예제 #10
0
파일: Game1.cs 프로젝트: eturan/ShooterGame
 public TitleScreenState(Game1 game)
     : base(game)
 {
 }
예제 #11
0
파일: Game1.cs 프로젝트: eturan/ShooterGame
 public PlayingState(Game1 game)
     : base(game)
 {
 }
예제 #12
0
파일: Game1.cs 프로젝트: eturan/ShooterGame
 public PausedState(Game1 game)
     : base(game)
 {
 }
예제 #13
0
파일: Game1.cs 프로젝트: eturan/ShooterGame
 public GameOverState(Game1 game)
     : base(game)
 {
 }
예제 #14
0
 private Game1Factory(Game1 game)
 {
     _game = game;
 }
예제 #15
0
 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();
 }