Exemple #1
0
 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
     };
 }
Exemple #2
0
 public Creature(
     ComponentManager Manager,
     CreatureStats stats,
     string allies,
     PlanService planService,
     Faction faction,
     string name) :
     base(Manager, name, stats.MaxHealth, 0.0f, stats.MaxHealth)
 {
     Gender = Mating.RandomGender();
     DrawLifeTimer.HasTriggered = true;
     HasMeat               = true;
     HasBones              = true;
     HasCorpse             = false;
     Buffs                 = new List <Buff>();
     IsOnGround            = true;
     Stats                 = stats;
     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;
 }
Exemple #3
0
 public BalloonAI(ComponentManager Manager, Vector3 target, ShipmentOrder shipment, Faction faction) :
     base("BalloonAI", Manager)
 {
     VelocityController = new PIDController(0.9f, 0.5f, 0.0f);
     MaxVelocity        = 2.0f;
     MaxForce           = 15.0f;
     TargetPosition     = target;
     State            = BalloonState.DeliveringGoods;
     Shipment         = shipment;
     Faction          = faction;
     CurrentResources = new List <ResourceAmount>();
 }
Exemple #4
0
 public BalloonAI(Body body, Vector3 target, ShipmentOrder shipment, Faction faction)
     : base("BalloonAI", body)
 {
     Body = body;
     VelocityController = new PIDController(0.9f, 0.5f, 0.0f);
     MaxVelocity = 2.0f;
     MaxForce = 15.0f;
     TargetPosition = target;
     State = BalloonState.DeliveringGoods;
     Shipment = shipment;
     Faction = faction;
     CurrentResources = new List<ResourceAmount>();
 }
Exemple #5
0
 public Creature(
     ComponentManager Manager,
     CreatureStats stats,
     Faction faction,
     string name) :
     base(Manager, name, stats.MaxHealth, 0.0f, stats.MaxHealth)
 {
     Stats        = stats;
     Stats.Gender = Mating.RandomGender();
     DrawLifeTimer.HasTriggered = true;
     IsOnGround            = true;
     Faction               = faction;
     Controller            = new PIDController(Stats.MaxAcceleration, Stats.StoppingForce * 2, 0.0f);
     IsHeadClear           = true;
     NoiseMaker            = new NoiseMaker();
     NoiseMaker.BasePitch  = stats.VoicePitch;
     OverrideCharacterMode = false;
     InitializeAttacks();
 }
Exemple #6
0
 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
     };
 }