示例#1
0
    public override void on_update(AnimalShelter shelter, InnerState state)
    {
        state.change(InnerState.Emotion.Lonely, 0.01f * Time.deltaTime);
        state.change(InnerState.Emotion.Loved, -0.01f * Time.deltaTime);

        refresh_emotion(state);

        if (state.get(InnerState.Emotion.Lonely) > 0.8f)
        {
            shelter.kill(this);
        }
    }
示例#2
0
 private void become_hungry(InnerState state)
 {
     state.change(InnerState.Emotion.Hungry, 0.03f * Time.deltaTime);
     state.change(InnerState.Emotion.NotHungry, -0.03f * Time.deltaTime);
 }