コード例 #1
0
ファイル: Player.cs プロジェクト: jakezenger/MobileTag
        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));
        }
コード例 #2
0
 private void SetTeamColor(Cell cell)
 {
     teamText.Text = ColorCode.TeamName(cell.TeamID);
     teamText.SetTextColor(ColorCode.BrightTeamColor(cell.TeamID));
 }