Пример #1
0
    IEnumerator DoWork()
    {
        yield return(null);

        State      = HumanActionState.Working;
        processing = false;
    }
Пример #2
0
    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);
    }
Пример #3
0
    IEnumerator DoBath()
    {
        yield return(null);

        State      = HumanActionState.Bathing;
        processing = false;
    }
Пример #4
0
    IEnumerator DoPet()
    {
        State = HumanActionState.Petting;
        yield return(Human.Movement.RotateTowards(Quaternion.Inverse(Dog.Transform.rotation)));

        yield return(TriggerAnim("Pet"));

        processing = false;
    }
Пример #5
0
    IEnumerator DoSleep()
    {
        State = HumanActionState.Sleeping;
        yield return(Human.Movement.GoTo("Bed"));

        yield return(Human.Movement.GoTo("OnBed"));

        yield return(TriggerAnim("Lie Down"));

        processing = false;
    }
Пример #6
0
    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;
    }