public Explore(GameObject agent, float maxWanderTime, float maxIdleTime) : base(agent, TaskType.Explore) { this.maxWanderTime = maxWanderTime; this.maxIdleTime = maxIdleTime; steeringBehaviour = agent.GetComponent<SteeringBehaviour>(); }
/// <summary> /// Creates a new Move task specifying the agent that will perform this task, the target position and /// the admissible error. /// </summary> /// <param name="agent">The agent that will perform this task.</param> /// <param name="position">The target position.</param> /// <param name="errorMargin">The maximum admitted error.</param> public Move(GameObject agent, Vector2 position, float errorMargin) : base(agent, TaskType.Move) { this.errorMargin = errorMargin; target = position; steering = agent.GetComponent<SteeringBehaviour>(); }
public Attack(GameObject agent, GameObject enemy) : base(agent, TaskType.Attack) { this.enemy = enemy; steeringBehaviour = agent.GetComponent<SteeringBehaviour>(); stats = agent.GetComponent<Stats>(); remainingCooldownTime = 0.0f; }
public Produce(GameObject agent, GameObject refiningCell) : base(agent, TaskType.Produce) { this.refiningCell = refiningCell.GetComponent<Cell>(); behaviour = agent.GetComponent<SteeringBehaviour>(); }