コード例 #1
0
 public void AddThought(Thought.ThoughtType type)
 {
     if (!HasThought(type))
     {
         AddThought(Thought.CreateStandardThought(type, PlayState.Time.CurrentDate), true);
     }
 }
コード例 #2
0
        /// <summary> Add a standard thought to the creature. </summary>
        public void AddThought(Thought.ThoughtType type)
        {
            if (!HasThought(type))
            {
                var thought = Thought.CreateStandardThought(type, Manager.World.Time.CurrentDate);
                AddThought(thought, true);

                if (thought.HappinessModifier > 0.01)
                {
                    Creature.NoiseMaker.MakeNoise("Pleased", Position, true);
                }
                else
                {
                    Creature.NoiseMaker.MakeNoise("Tantrum", Position, true);
                }
            }
        }
コード例 #3
0
ファイル: Creature.cs プロジェクト: svifylabs/dwarfcorp
 public ThoughtBuff(float time, Thought.ThoughtType type) :
     base(time)
 {
     ThoughtType = type;
 }
コード例 #4
0
ファイル: Creature.cs プロジェクト: polytronicgr/dwarfcorp
 public void AddThought(Thought.ThoughtType ThoughtType)
 {
     Physics.GetComponent <DwarfThoughts>()?.AddThought(ThoughtType);
 }
コード例 #5
0
 public void RemoveThought(Thought.ThoughtType thoughtType)
 {
     Thoughts.RemoveAll(thought => thought.Type == thoughtType);
 }
コード例 #6
0
 public bool HasThought(Thought.ThoughtType type)
 {
     return(Thoughts.Any(existingThought => existingThought.Type == type));
 }