Esempio n. 1
0
		public void SetPlayer(Player player) {
			playerNameText.text = player.name;
			settlementsText.text = player.settlements.Count(s => s.type == Settlement.SettlementType.Settlement).ToString();
			citysText.text = player.settlements.Count(s => s.type == Settlement.SettlementType.City).ToString();
			roadsText.text = player.roads.Count.ToString();
			knightsText.text = player.knights.ToString();
		}
Esempio n. 2
0
		private bool HasAllPlayersTwoSettlements(Player[] players) {
			foreach (Player player in players) {
				if (player.settlements.Count < 2) {
					return false;
				}
			}

			return true;
		}
Esempio n. 3
0
		public void Init(Player[] players, int currentPlayer) {
			playerArea.SetPlayer(players[currentPlayer]);

			opponentAreas = new OpponentArea[players.Length - 1];
			int o = 0;
			for (int i = 0; i < players.Length; ++i) {
				if (i != currentPlayer) {
					PrefabLoader.LoadAndGetComponent<OpponentArea>(oa => {
						opponentAreas[o++] = oa;
						oa.transform.SetParent(opponentAreasContainer, false);
						oa.SetPlayer(players[i]);
					});
				}
			}
		}