public void Drink() { player = GameObject.FindGameObjectWithTag("Player").GetComponent("Character") as Character; isEating = true; player.FeedAnimal((water.GetComponent("WaterDrink") as WaterDrink)); StartCoroutine(DelayForFeeding(water)); }
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--; } } }
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--; } } }
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--; } } }
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--; } } }
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--; } } }
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--; } } }