Ejemplo n.º 1
0
 // Use this for initialization
 void Start()
 {
     leaderLocomotion   = leader.GetComponent <Vehicle>();
     evadeScript        = GetComponent <SteeringForEvade>();
     m_vehicle          = GetComponent <Vehicle>();
     isPlanar           = m_vehicle.isPlanar;
     LEADER_BEHIND_DIST = 2.0f;
     sqrEvadeDistance   = evadeDistance * evadeDistance;
 }
        // Use this for initialization
        IEnumerator Start()
        {
            evadeScript = GetComponent <SteeringForEvade>();
            seekScript  = GetComponent <SteeringForSeek>();

            evadeScript.enabled = false;
            seekScript.enabled  = true;

            yield return(new WaitForSeconds(5));

            evadeScript.enabled = true;
            seekScript.enabled  = false;
        }