Exemplo n.º 1
0
 public Avoid()
 {
     target = new PointActor(Vector3.zero);
     flee.Target = target;
 }
Exemplo n.º 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;
 }
Exemplo n.º 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;
 }
Exemplo n.º 4
0
    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);
    }
Exemplo n.º 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;
 }
Exemplo n.º 7
0
 public Cohesion()
 {
     target = new PointActor(Vector3.zero);
     seeker.Target = target;
 }