Пример #1
0
 /// <summary>
 /// The main entry point for the application.
 /// </summary>
 static void Main(string[] args)
 {
     using (Game1 game = new Game1())
     {
         game.Run();
     }
 }
Пример #2
0
 public LevelSelectionScreen(Game1 game)
 {
     this.game = game;
     lmState = mState = Mouse.GetState();
     cursor = game.Content.Load<Texture2D>("cursor");
     levelWriting = game.Content.Load<SpriteFont>("Font/level");
     title = game.Content.Load<SpriteFont>("Font/ScreenFont");
 }
Пример #3
0
        public GameOverScreen(Game1 game)
        {
            this.game = game;

            title = game.Content.Load<SpriteFont>("Font/Massive");
            enemy = game.Content.Load<Texture2D>("GamePlay/enemyTank");
            cursor = game.Content.Load<Texture2D>("cursor");
            gameoverWriting = game.Content.Load<SpriteFont>("Font/level");

            lmState = mState = Mouse.GetState();
        }
Пример #4
0
 public StartScreen(Game1 game)
 {
     this.game = game;
     Title = game.Content.Load<SpriteFont>("Font/ScreenFont");
     normalWriting = game.Content.Load<SpriteFont>("Font/Arial");
     cursor = game.Content.Load<Texture2D>("cursor");
     tankModel = game.Content.Load<Texture2D>("GamePlay/tank");
     enemyModel = game.Content.Load<Texture2D>("GamePlay/enemyTank");
     massiveWriting = game.Content.Load<SpriteFont>("Font/Massive");
     lmState = mState = Mouse.GetState();
 }
Пример #5
0
 public CongratsScreen(Game1 game)
 {
     this.game = game;
     //background = game.Content.Load<Texture2D>("screenBackground");
     player = game.Content.Load<Texture2D>("GamePlay/tank");
     cursor = game.Content.Load<Texture2D>("cursor");
     title = game.Content.Load<SpriteFont>("Font/ScreenFont");
     congratsWriting = game.Content.Load<SpriteFont>("Font/level");
     sw = new StreamWriter("scores.txt", true);
     sw.WriteLine(game.Score);
     sw.Close();
 }
Пример #6
0
        public GamePlayLevel2(Game1 game)
        {
            this.game = game;
            GameEntity character, enemy;

            camera = new Camera(game.GraphicsDevice.Viewport);

            character = new Character();
            enemy = new Enemy();
            game.Entities.Add(character);
            game.Entities.Add(enemy);
            game.Enemies.Add(enemy);

            for (int i = 0; i < game.Entities.Count; i++)
                game.Entities[i].LoadContent();

            for (int i = 0; i < 7; i++)
                powerSpawn[i] = (int)random.Next(40);

            Game1.Instance.PowerFlag = true;

            game.SpriteFont = Game1.Instance.Content.Load<SpriteFont>("Font/Arial");
        }
Пример #7
0
 public Game1()
 {
     graphics = new GraphicsDeviceManager(this);
     Content.RootDirectory = "Content";
     instance = this;
 }
Пример #8
0
 public ScoreScreen(Game1 game)
 {
     this.game = game;
     cursor = game.Content.Load<Texture2D>("cursor");
 }