Ejemplo n.º 1
0
        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);
        }
Ejemplo n.º 2
0
        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);
            }
        }
Ejemplo n.º 3
0
 void Start()
 {
     playerCursor = GetComponent <PlayerCursor>();
     playerCursor.SetColor(PlayerCursor.PlayerColors[0]);
 }
Ejemplo n.º 4
0
 public void SetPlayerIndex(int playerIndex)
 {
     SetColor(PlayerCursor.PlayerColors[playerIndex]);
     playerData = PlayerCursor.GetPlayerData(playerIndex);
 }
Ejemplo n.º 5
0
 void OnEnable()
 {
     text       = GetComponent <Text>();
     text.color = PlayerCursor.PlayerColors[PlayerIndex];
     playerData = PlayerCursor.GetPlayerData(PlayerIndex);
 }