Ejemplo n.º 1
0
        public void UpdateThoughts()
        {
            Thoughts.RemoveAll(thought => thought.IsOver(PlayState.Time.CurrentDate));
            Status.Happiness.CurrentValue = 50.0f;

            foreach (Thought thought in Thoughts)
            {
                Status.Happiness.CurrentValue += thought.HappinessModifier;
            }

            if (Status.IsAsleep)
            {
                AddThought(Thought.ThoughtType.Slept);
            }
            else if (Status.Energy.IsUnhappy())
            {
                AddThought(Thought.ThoughtType.FeltSleepy);
            }

            if (Status.Hunger.IsUnhappy())
            {
                AddThought(Thought.ThoughtType.FeltHungry);
            }
           
        }
Ejemplo n.º 2
0
        override public void Update(DwarfTime Time, ChunkManager Chunks, Camera Camera)
        {
            Thoughts.RemoveAll(thought => thought.IsOver(Manager.World.Time.CurrentDate));
            Status.Happiness.CurrentValue = 50.0f;

            foreach (Thought thought in Thoughts)
            {
                Status.Happiness.CurrentValue += thought.HappinessModifier;
            }

            if (Status.IsAsleep)
            {
                AddThought(Thought.ThoughtType.Slept);
            }
            else if (Status.Energy.IsDissatisfied())
            {
                AddThought(Thought.ThoughtType.FeltSleepy);
            }

            if (Status.Hunger.IsDissatisfied())
            {
                AddThought(Thought.ThoughtType.FeltHungry);
            }
        }
Ejemplo n.º 3
0
 public void RemoveThought(Thought.ThoughtType thoughtType)
 {
     Thoughts.RemoveAll(thought => thought.Type == thoughtType);
 }