Example #1
0
    void CollectCoin()
    {
        if (GameManagerPackMan.coins[CellPosition.YCoordinate, CellPosition.XCoordinate] != null)
        {
            GameManagerPackMan.coins[CellPosition.YCoordinate, CellPosition.XCoordinate].PickupDot();

            // GameManagerPackMan.coins[CellPosition.YCoordinate, CellPosition.XCoordinate] = null;
            GameManagerPackMan.coinsTotal -= 1;
            score += 10;
            WIN    = GameManagerPackMan.HasWon();
        }
    }
Example #2
0
 private void Start()
 {
     gameManager = GameObject.FindGameObjectWithTag("GameController").GetComponent <GameManagerPackMan>();
 }