IEnumerator DoWork() { yield return(null); State = HumanActionState.Working; processing = false; }
IEnumerator DoWalk() { if (Human.Tracker.Cleanliness < 5) { processing = false; yield break; } if (State == HumanActionState.Working) { Human.Tracker.annoyance++; processing = false; yield break; } State = HumanActionState.Walking; yield return(Human.Movement.GoTo("Door")); InputManager.SetState(false); yield return(Pause.Access.FadeColor(Color.clear, Color.black)); TimeCycle.Access.SkipHour(1); yield return(new WaitForSeconds(2)); yield return(Pause.Access.FadeColor(Color.black, Color.clear)); InputManager.SetState(true); Human.Tracker.AddHappiness(10); Human.Tracker.SetCleanliness(3); Human.Tracker.SetHunger(2); }
IEnumerator DoBath() { yield return(null); State = HumanActionState.Bathing; processing = false; }
IEnumerator DoPet() { State = HumanActionState.Petting; yield return(Human.Movement.RotateTowards(Quaternion.Inverse(Dog.Transform.rotation))); yield return(TriggerAnim("Pet")); processing = false; }
IEnumerator DoSleep() { State = HumanActionState.Sleeping; yield return(Human.Movement.GoTo("Bed")); yield return(Human.Movement.GoTo("OnBed")); yield return(TriggerAnim("Lie Down")); processing = false; }
IEnumerator DoEat() { if (Human.Tracker.Hunger > Human.Tracker.MinHungerToEat) { Human.Tracker.annoyance++; } else { Human.Tracker.attention++; } if (Human.Tracker.attention <= 2) { processing = false; yield break; } if (Human.Tracker.annoyance > 2) { Human.Dialog.TriggerDialog(HumanEmotion.Angry); if (Human.Tracker.annoyance > 4) { Human.Tracker.AddHappiness(-1); } processing = false; yield break; } State = HumanActionState.Eating; yield return(Human.Movement.GoTo("Fridge")); // Animators.TriggerAnim("Fridge", "Open"); yield return(TriggerAnim("Access Fridge")); yield return(Human.Movement.GoTo("Counter")); yield return(TriggerAnim("Use Counter")); Human.Tracker.ResetHunger(); processing = false; }