Exemple #1
0
 public void Drink()
 {
     player = GameObject.FindGameObjectWithTag("Player").GetComponent("Character") as Character;
     isEating = true;
     player.FeedAnimal((water.GetComponent("WaterDrink") as WaterDrink));
     StartCoroutine(DelayForFeeding(water));
 }
Exemple #2
0
        public void EatBeef()
        {
            player = GameObject.FindGameObjectWithTag("Player").GetComponent("Character") as Character;
            if (!isEating)
            {
                PurchaseFood(beef);

                if (isAble(beefCount, 1))
                {
                    isEating = true;
                    MeshRenderer skin = beef.GetComponent("MeshRenderer") as MeshRenderer;
                    skin.enabled = true;
                    player.FeedAnimal((beef.GetComponent("BeefFood") as BeefFood));
                    StartCoroutine(DelayForFeeding(beef));
                    beefCount--;
                }
            }
        }
Exemple #3
0
        public void EatFish()
        {
            player = GameObject.FindGameObjectWithTag("Player").GetComponent("Character") as Character;
            if (!isEating)
            {
                PurchaseFood(fish);

                if (isAble(fishCount, 1))
                {
                    isEating = true;
                    SkinnedMeshRenderer skin = fish.GetComponentInChildren(typeof(SkinnedMeshRenderer)) as SkinnedMeshRenderer;
                    skin.enabled = true;
                    player.FeedAnimal((fish.GetComponent("FishFood") as FishFood));
                    StartCoroutine(DelayForFeeding(fish));
                    fishCount--;
                }
            }
        }
Exemple #4
0
        public void EatChicken()
        {
            player = GameObject.FindGameObjectWithTag("Player").GetComponent("Character") as Character;
            if (!isEating)
            {
                PurchaseFood(chicken);

                if (isAble(chickenCount, 1))
                {
                    isEating = true;
                    MeshRenderer skin = chicken.GetComponent("MeshRenderer") as MeshRenderer;
                    skin.enabled = true;
                    player.FeedAnimal((chicken.GetComponent("ChickenFood") as ChickenFood));
                    StartCoroutine(DelayForFeeding(chicken));
                    chickenCount--;
                }
            }
        }
Exemple #5
0
        public void EatTurkey()
        {
            player = GameObject.FindGameObjectWithTag("Player").GetComponent("Character") as Character;
            if (!isEating)
            {
                PurchaseFood(turkey);

                if (isAble(turkeyCount, 1))
                {
                    isEating = true;
                    MeshRenderer skin = turkey.GetComponent("MeshRenderer") as MeshRenderer;
                    skin.enabled = true;
                    player.FeedAnimal((turkey.GetComponent("TurkeyFood") as TurkeyFood));
                    StartCoroutine(DelayForFeeding(turkey));
                    turkeyCount--;
                }
            }
        }
Exemple #6
0
        public void EatTreat()
        {
            player = GameObject.FindGameObjectWithTag("Player").GetComponent("Character") as Character;
            if (!isEating)
            {
                PurchaseFood(treat);

                if (isAble(treatCount, 1))
                {
                    isEating = true;
                    MeshRenderer skin = treat.GetComponentInChildren(typeof(MeshRenderer)) as MeshRenderer;
                    skin.enabled = true;
                    player.FeedAnimal((treat.GetComponent("TreatFood") as TreatFood));
                    StartCoroutine(DelayForFeeding(treat));
                    treatCount--;
                }
            }
        }
Exemple #7
0
        public void EatRibs()
        {
            player = GameObject.FindGameObjectWithTag("Player").GetComponent("Character") as Character;
            if (!isEating)
            {
                PurchaseFood(ribs);

                if (isAble(ribCount, 1))
                {
                    isEating = true;
                    MeshRenderer skin = ribs.GetComponent("MeshRenderer") as MeshRenderer;
                    skin.enabled = true;
                    player.FeedAnimal((ribs.GetComponent("RibFood") as RibFood));
                    StartCoroutine(DelayForFeeding(ribs));
                    ribCount--;
                }
            }
        }