コード例 #1
0
ファイル: Creature.cs プロジェクト: svifylabs/dwarfcorp
 public Creature(CreatureStats stats,
                 string allies,
                 PlanService planService,
                 Faction faction,
                 Physics parent,
                 ChunkManager chunks,
                 GraphicsDevice graphics,
                 ContentManager content,
                 string name) :
     base(parent.Manager, name, parent, stats.MaxHealth, 0.0f, stats.MaxHealth)
 {
     HasMeat               = true;
     HasBones              = true;
     Buffs                 = new List <Buff>();
     IsOnGround            = true;
     Physics               = parent;
     Stats                 = stats;
     Chunks                = chunks;
     Graphics              = graphics;
     Content               = content;
     Faction               = faction;
     PlanService           = planService;
     Allies                = allies;
     Controller            = new PIDController(Stats.MaxAcceleration, Stats.StoppingForce * 2, 0.0f);
     JumpTimer             = new Timer(0.2f, true);
     Status                = new CreatureStatus();
     IsHeadClear           = true;
     NoiseMaker            = new NoiseMaker();
     OverrideCharacterMode = false;
     SelectionCircle       = new SelectionCircle(Manager, Physics)
     {
         IsVisible = false
     };
 }
コード例 #2
0
ファイル: Creature.cs プロジェクト: maroussil/dwarfcorp
 public Creature(CreatureStats stats,
     string allies,
     PlanService planService,
     Faction faction,
     Physics parent,
     ChunkManager chunks,
     GraphicsDevice graphics,
     ContentManager content,
     string name)
     : base(parent.Manager, name, parent, stats.MaxHealth, 0.0f, stats.MaxHealth)
 {
     Buffs = new List<Buff>();
     IsOnGround = true;
     Physics = parent;
     Stats = stats;
     Chunks = chunks;
     Graphics = graphics;
     Content = content;
     Faction = faction;
     PlanService = planService;
     Allies = allies;
     Controller = new PIDController(Stats.MaxAcceleration, Stats.StoppingForce * 2, 0.0f);
     JumpTimer = new Timer(0.2f, true);
     Status = new CreatureStatus();
     IsHeadClear = true;
     NoiseMaker = new NoiseMaker();
     OverrideCharacterMode = false;
     SelectionCircle = new SelectionCircle(Manager, Physics)
     {
         IsVisible = false
     };
 }