Exemple #1
0
    private void UpdateButtonText()
    {
        for (int k = 0; k < storeButtons.Length; k++)
        {
            ButtonClickScript currentButton = storeButtons.GetValue(k) as ButtonClickScript;

            if (purchasedItems[k] == 1)
            {
                if (gameControllerScript.currentEquipped[storeNumber] == k)
                {
                    if (currentButton.textToPlace.Equals("Owned"))
                    {
                        currentButton.UpdateText("Equipped");
                        //gameControllerScript.currentEquipped[storeNumber] = k;
                        BoardSpawner boardSpawnner = GameObject.Find("Spawnner").GetComponent <BoardSpawner>();

                        boardSpawnner.UpdateStyles(k, storeNumber);
                    }
                    else
                    {
                        currentButton.UpdateText("Equipped");
                    }
                }
                else
                {
                    currentButton.UpdateText("Owned");
                }
            }
            else
            {
                currentButton.UpdateText("Buy");
            }
        }
    }
Exemple #2
0
    public Board(int _rows, int _columns, int _levelID)
    {
        rows          = _rows;
        columns       = _columns;
        levelID       = _levelID;
        BoardTiles    = new Tile[rows, columns];
        BoardPiecesID = new int[rows, columns];

        spawner = (BoardSpawner)ScriptableObject.CreateInstance("BoardSpawner");
        spawner.Setup(this);

        if (levelID != -1 && rows > 0 && columns > 0)
        {
            ValidLevelBoard = true;
        }
    }
 public SpawnTokenCommand(BoardSpawner boardSpawner, Vector3 position)
 {
     _boardSpawner = boardSpawner;
     _position     = position;
 }