예제 #1
0
        public UpperBlueStationModel(Game game) : base(game, StationLocation.UpperBlue)
        {
            var battleBots = game.SittingDuck.BlueZone.UpperBlueStation.BattleBotsComponent.BattleBots;

            if (battleBots != null)
            {
                BattleBots = new BattleBotsModel(battleBots);
            }
        }
예제 #2
0
        public LowerRedStationModel(Game game) : base(game, StationLocation.LowerRed)
        {
            var battleBots = game.SittingDuck.RedZone.LowerRedStation.BattleBotsComponent.BattleBots;

            if (battleBots != null)
            {
                BattleBots = new BattleBotsModel(battleBots);
            }
            BatteryPackHasEnergy = game.SittingDuck.RedZone.LowerRedStation.BatteryPack.HasEnergy;
        }
예제 #3
0
        public PlayerModel(Player player)
        {
            Index           = player.Index;
            StationLocation = player.CurrentStation.StationLocation;
            HasBattleBots   = player.BattleBots != null;
            PlayerColor     = player.PlayerColor;
            if (player.BattleBots != null)
            {
                BattleBots = new BattleBotsModel(player.BattleBots);
            }
            Actions = player.Actions.Select(action => ActionModelFactory.Create(action, player)).ToList();
            if (player.Interceptors != null)
            {
                Interceptors = new InterceptorsModel();
            }
            PlayerSpecialization = player.Specialization;

            //Uncomment this to get battle bots in turn 1 on the client.
            //else if (player.PlayerColor == PlayerColor.Red || player.PlayerColor == PlayerColor.Green)
            //    BattleBots = new BattleBotsModel(new BattleBots());
        }