void OnEnable() { playerCursor = GetComponent <PlayerCursor>(); if (FreeIndices == null) { FreeIndices = new List <int>() { 1, 2, 3 } } ; PlayerIndex = FreeIndices[0]; FreeIndices.RemoveAt(0); if (!board) { board = FindObjectOfType <Board>(); } } void OnDisable() { FreeIndices.Add(PlayerIndex); } Homebase homebase; void Start() { playerCursor.SetColor(PlayerCursor.PlayerColors[PlayerIndex]); coro = StartCoroutine(Play()); homebase = Homebase.ForPlayerIndex(PlayerIndex); }
void DiminishArrow() { if (!HasArrow) { return; } else if (arrowStrength == ArrowStrength.Big) { arrowStrength = ArrowStrength.Small; UpdateOverlayGraphic(); } else { ToggleArrow(ArrowDirection); // notify players that their arrow was gone PlayerCursor.ArrowWasRemoved(this); } }
void Start() { playerCursor = GetComponent <PlayerCursor>(); playerCursor.SetColor(PlayerCursor.PlayerColors[0]); }
public void SetPlayerIndex(int playerIndex) { SetColor(PlayerCursor.PlayerColors[playerIndex]); playerData = PlayerCursor.GetPlayerData(playerIndex); }
void OnEnable() { text = GetComponent <Text>(); text.color = PlayerCursor.PlayerColors[PlayerIndex]; playerData = PlayerCursor.GetPlayerData(PlayerIndex); }