Ejemplo n.º 1
0
    void GiveObjectToPlayer()
    {
        switch (typeObject)
        {
        case TypeObject.TREASURE:
            player.AddToTreasure(value);
            break;

        case TypeObject.KEY:
            playerKeyController.AddKey();
            break;
        }
    }
 private void PickUpKey(GameObject key)
 {
     keyController.AddKey();
     Destroy(key);
 }