Exemple #1
0
 void Start()
 {
     controller = GetComponent <ActorMove>();
     if (controller != null)
     {
         controller.SetActorState(seekerState);
         controller.SetGroup(group);
     }
 }
Exemple #2
0
    // Use this for initialization
    void Start()
    {
        Pos = new Vector2(transform.position.x - PathFind.instance.m_map.mapStartPos.x, transform.position.z - PathFind.instance.m_map.mapStartPos.z);
        neighbourRadiusSquaredMoving = neighbourRadiusMoving * neighbourRadiusMoving;
        neighbourRadiusSquaredIdle   = neighbourRadiusIdle * neighbourRadiusIdle;
        SetNeighbourRadius(seekerState);
        neighbours = new Seeker[SeekerMovementManager.maxNeighbourCount];
        SeekerMovementManager.AddSeeker(this);

        controller = GetComponent <ActorMove>();
        if (controller != null)
        {
            controller.SetActorState(seekerState);
            controller.SetGroup(group);
        }
    }