private int targetBulletID;//当前子弹的ID public Goal_GetBullet(RavenEntity owner) : base(owner) { this.state = GoalState.Wait; }
public RavenGoal(RavenEntity owner) { this.owner = owner; this.state = GoalState.Wait; }
private int mTargetHealthPackID;//目标健康包的ID号 public Goal_GetHealth(RavenEntity owner) : base(owner) { this.state = GoalState.Wait; }
public Goal_TraverseEdge(RavenEntity owner, PathEdge edge) : base(owner) { this.edge = edge; }
public Goal_FollowTarget(RavenEntity entity) : base(entity) { this.state = GoalState.Wait; }
protected float activeTime;//有效时间 public Goal_SeekMemoryTarget(RavenEntity owner) : base(owner) { this.state = GoalState.Wait; this.activeTime = 0.5f; this.owner.state = EvaluatorType.SeekMemory; }
public Goal_FollowPath(RavenEntity owner, List <PathEdge> path) : base(owner) { this.path = path; }
public override void SetGoal(RavenEntity entity) { entity.ThinkGomponent.AddSubGoal(new Goal_AttackAndHunterTarget(entity)); Debug.Log(entity.gameObject.name + "的当前最上层的目标是hunter"); //Debug.Break(); }
public CompositeGoal(RavenEntity entity) : base(entity) { this.type = GoalType.Composite; subGoalStack = new Stack <RavenGoal>(); this.state = GoalState.Wait; }
public override void SetGoal(RavenEntity entity) { entity.ThinkGomponent.AddSubGoal(new Goal_GetBullet(entity)); Debug.Log(entity.gameObject.name + "当前最上层的目标是GetWeapon"); }
public override float Calculate(RavenEntity entity) { //一直返回一个比较小的的期望值 return(0.2f); }
public override void SetGoal(RavenEntity entity) { //添加一个获取健康包的目标 entity.ThinkGomponent.AddSubGoal(new Goal_GetHealth(entity)); Debug.Log(entity.gameObject.name + " 当前的最上层的目标是GetHealth"); }
/// <summary> /// 让AI设置完成这个目标的子目标 /// </summary> public virtual void SetGoal(RavenEntity entity) { }
protected float k = 10;//目标价值的调整因子 public virtual float Calculate(RavenEntity entity) { return(0); }
public TargetSelectSystem(RavenEntity entity) { this.owner = entity; this.ravenSensoryComponent = this.owner.SensoryComponent; }
public Goal_Wander(RavenEntity owner, NavMap map) : base(owner) { this.map = map; }
protected float distance = 3f; //进行感知的距离(Lua) public RavenSensoryComponent(RavenEntity owner) { this.owner = owner; sensoryMemory = new RavenSensoryMemory(this.owner); }
public Goal_SeekTarger(RavenEntity owner) : base(owner) { this.state = GoalState.Wait; this.owner.state = EvaluatorType.HunterEvaluator; }