/// Bid farewell to a dodo that finished eating public override void FinishInteraction(DodoManager dodo) { dodo.hunger = 0; dodo.hungerAnimationProgress = 0; dodo.mealTimeAgo += 0.01f; foodServed--; dodo.Animate("FedAnimation", DodoManager.AnimationPosition.TopRight); base.FinishInteraction(dodo); }
/// Dodo is done and is leaving! public override void FinishInteraction(DodoManager dodo) { dodo.mealTimeAgo = 0; dodoniumAccumulated++; if (dodoniumAccumulated > maxDodoniumStorage) { dodoniumAccumulated = maxDodoniumStorage; } dodo.Animate("RelaxAnimation", DodoManager.AnimationPosition.TopRight); GameObject animation = Instantiate(Resources.Load <GameObject>("RelaxAnimation")); if (animation == null) { Debug.LogError("Could not find RelaxAnimation prefab in Resources folder!"); } else { animation.transform.parent = transform; animation.transform.position = dodo.transform.position + new Vector3(0.4f, 0.6f, 0); } dodosPresent.Remove(dodo); }