Beispiel #1
0
 public Avoid()
 {
     target = new PointActor(Vector3.zero);
     flee.Target = target;
 }
Beispiel #2
0
 /// <summary>
 /// Create an avoid behavior.
 /// </summary>
 /// <param name="flock">The flock.</param>
 public Avoid(Flock flock)
     : base(flock)
 {
     target = new PointActor(Vector3.zero);
     flee.Target = target;
 }
Beispiel #3
0
 /// <summary>
 /// Create a cohesion behavior.
 /// </summary>
 /// <param name="flock">The flock.</param>
 public Cohesion(Flock flock)
     : base(flock)
 {
     target = new PointActor(Vector3.zero);
     seeker.Target = target;
 }
    void Start()
    {
        prevParam = 0.0f;
        manager = GetComponent<SteeringManagerComponent>();
        Heuristic heuristic = new EuclideanHeuristic();

        finder = new ASearch(heuristic.Heuristic);
        follower = new CoherentPathFollower();
        manager[moveBehavior].SetEnabled(false);
        manager[moveBehavior].SetFloat("ArriveRadius", lookAhead * 0.75f);
        target = new PointActor(Vector3.zero);
        manager[moveBehavior].SetActor("Target", target);
    }
Beispiel #5
0
 /// <summary>
 /// Default constructor.
 /// </summary>
 public Wander()
 {
     wanderAngle = Random.Range(0f, 360f);
     target = new PointActor(Vector3.zero);
     base.Target = target;
 }
 public RayCastObstacleAvoidance()
 {
     lookTarget = new PointActor(Vector3.zero);
     lookAt.Target = lookTarget;
 }
Beispiel #7
0
 public Cohesion()
 {
     target = new PointActor(Vector3.zero);
     seeker.Target = target;
 }