Esempio n. 1
0
        private int timePerRound  = 5000; // 15 seconds

        public Battle(ScrapWarsApp scrapWarsApp, GraphicsDevice graphics, GameWindow window, Map map, Team teamOne, Team teamTwo)
            : base(scrapWarsApp, graphics, window)
        {
            currentBattleState = BattleState.Unfinished;
            SubscribeToEvents();

            this.map     = map;
            this.teamOne = teamOne;
            this.teamTwo = teamTwo;

            bullets = new List <Bullet>();

            allMechs = new List <Mech>();
            foreach (Mech mech in teamOne.Mechs)
            {
                mech.RestoreDefaultState( );
                allMechs.Add(mech);
            }
            foreach (Mech mech in teamTwo.Mechs)
            {
                mech.RestoreDefaultState( );
                allMechs.Add(mech);
            }

            mapChanged            = true;
            battlePaused          = true;
            upperLeftOfView       = Vector2.Zero;
            GameSettings.TileSize = GameTextureRepo.tileDirt.Width;

            battleDrawer = new BattleDrawer(this, graphics, spriteBatch);
            battleInput  = new BattleInput(this);
            battleLogic  = new BattleLogic(this);

            battleLogic.PlaceTeams(teamOne, teamTwo);
        }
Esempio n. 2
0
 public MechSelect(ScrapWarsApp scrapWarsApp, GraphicsDevice graphics, GameWindow window, Team team)
     : base(scrapWarsApp, graphics, window)
 {
     this.team   = team;
     mechs       = team.Mechs;
     currentMech = 0;
 }
Esempio n. 3
0
 public TeamSelect(ScrapWarsApp scrapWarsApp, GraphicsDevice graphics, GameWindow window)
     : base(scrapWarsApp, graphics, window)
 {
     currentTeam = 0;
 }
 public MechCustomize(ScrapWarsApp scrapWarsApp, GraphicsDevice graphics, GameWindow window, Team team, Mech mech)
     : base(scrapWarsApp, graphics, window)
 {
     this.team = team;
     this.mech = mech;
 }
Esempio n. 5
0
 public MainMenu(ScrapWarsApp scrapWarsApp, GraphicsDevice graphics, GameWindow window)
     : base(scrapWarsApp, graphics, window)
 {
     SetSelection((int)Options.Battle);
 }
Esempio n. 6
0
 public OptionsScreen(ScrapWarsApp scrapWarsApp, GraphicsDevice graphics, GameWindow window)
     : base(scrapWarsApp, graphics, window)
 {
 }
Esempio n. 7
0
 public Screen(ScrapWarsApp scrapWarsApp, GraphicsDevice graphics, GameWindow window)
 {
     this.scrapWarsApp = scrapWarsApp;
     Refresh(graphics, window);
 }
Esempio n. 8
0
 public MapSelection(ScrapWarsApp scrapWarsApp, GraphicsDevice graphics, GameWindow window)
     : base(scrapWarsApp, graphics, window)
 {
     SetSelection(0);
     mapSize = new Point(75, 75);
 }