public PlanAct(CreatureAI agent, string pathOut, string target, PlanType planType) : base(agent) { Type = planType; Name = "Plan to " + target; PlannerTimer = new Timer(1.0f, false); MaxExpansions = 1000; PathOut = pathOut; TargetName = target; PlanSubscriber = new PlanSubscriber(PlayState.PlanService); WaitingOnResponse = false; MaxTimeouts = 4; Timeouts = 0; Radius = 0; }
public CreatureAI(Creature creature, string name, EnemySensor sensor, PlanService planService) : base(name, creature.Physics) { Movement = new CreatureMovement(); GatherManager = new GatherManager(this); Blackboard = new Blackboard(); Creature = creature; CurrentPath = null; DrawPath = false; PlannerTimer = new Timer(0.1f, false); LocalControlTimeout = new Timer(5, false); WanderTimer = new Timer(1, false); Creature.Faction.Minions.Add(this); DrawAIPlan = false; WaitingOnResponse = false; PlanSubscriber = new PlanSubscriber(planService); ServiceTimeout = new Timer(2, false); Sensor = sensor; Sensor.OnEnemySensed += Sensor_OnEnemySensed; Sensor.Creature = this; CurrentTask = null; Tasks = new List<Task>(); Thoughts = new List<Thought>(); IdleTimer = new Timer(15.0f, true); SpeakTimer = new Timer(5.0f, true); XPEvents = new List<int>(); }