Esempio n. 1
0
        public async Task SwitchFaction(int newFactionID)
        {
            await Database.UpdateTeam(GameModel.Player, newFactionID);

            foreach (AntiMine am in AntiMines.Values)
            {
                if (GameModel.CellsInView.ContainsKey(am.CellID))
                {
                    am.Stop();
                    GameModel.CellsInView[am.CellID].MapOverlay.RemoveAntiMine();
                }
            }

            foreach (Mine m in Mines.Values)
            {
                if (GameModel.CellsInView.ContainsKey(m.CellID))
                {
                    GameModel.CellsInView[m.CellID].MapOverlay.RemoveAntiMine();
                }
            }

            AntiMines.Clear();
            Mines.Clear();

            Team = new Team(newFactionID, ColorCode.TeamName(newFactionID));
        }
Esempio n. 2
0
 private void SetTeamColor(Cell cell)
 {
     teamText.Text = ColorCode.TeamName(cell.TeamID);
     teamText.SetTextColor(ColorCode.BrightTeamColor(cell.TeamID));
 }