예제 #1
0
 public void AddThought(Thought.ThoughtType type)
 {
     if (!HasThought(type))
     {
         AddThought(Thought.CreateStandardThought(type, PlayState.Time.CurrentDate), true);
     }
 }
예제 #2
0
        public static Body GenerateTestMoleman(Vector3 position)
        {
            CreatureDef dwarfDef = ContentPaths.LoadFromJson <CreatureDef>(ContentPaths.Entities.Moleman.moleman);
            Creature    toReturn = new Creature(position, dwarfDef, "Moleman Miner", 0, "Molemen");

            toReturn.AI.AddThought(Thought.CreateStandardThought(Thought.ThoughtType.JustArrived, PlayState.Time.CurrentDate), false);
            return(toReturn.Physics);
        }
예제 #3
0
        public static Body GenerateTestSeketon(WorldManager world, Vector3 position)
        {
            CreatureDef dwarfDef = ContentPaths.LoadFromJson <CreatureDef>(ContentPaths.Entities.Skeleton.skeleton);
            Creature    toReturn = new Creature(world.ComponentManager, position, dwarfDef, "Skeleton", 0, "Undead");

            toReturn.AI.AddThought(Thought.CreateStandardThought(Thought.ThoughtType.JustArrived, world.Time.CurrentDate), false);
            return(toReturn.Physics);
        }
예제 #4
0
        public static GameComponent GenerateDwarf(Vector3 position,
                                                  ComponentManager componentManager,
                                                  ContentManager content,
                                                  GraphicsDevice graphics,
                                                  ChunkManager chunkManager, Camera camera,
                                                  Faction faction, PlanService planService, string allies, EmployeeClass dwarfClass, int level)
        {
            CreatureStats stats    = new CreatureStats(dwarfClass, level);
            Dwarf         toReturn = new Dwarf(stats, allies, planService, faction, "Dwarf", chunkManager, graphics, content, dwarfClass, position);

            toReturn.AI.AddThought(Thought.CreateStandardThought(Thought.ThoughtType.JustArrived, PlayState.Time.CurrentDate), false);
            return(toReturn.Physics);
        }
예제 #5
0
        public static GameComponent GenerateDwarf(
            Vector3 Position,
            ComponentManager Manager,
            string Allies,
            EmployeeClass DwarfClass,
            int Level, Gender gender, int seed)
        {
            Dwarf toReturn = new Dwarf(Manager, new CreatureStats(DwarfClass, Level)
            {
                Gender = gender, RandomSeed = seed, VoicePitch = CreatureStats.GetRandomVoicePitch(gender)
            }, Allies, Manager.World.PlanService, Manager.World.PlayerFaction, "Dwarf", DwarfClass, Position);

            toReturn.AddThought(Thought.CreateStandardThought(Thought.ThoughtType.JustArrived, Manager.World.Time.CurrentDate), false);
            return(toReturn.Physics);
        }
예제 #6
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);
                }
            }
        }