Example #1
0
 private 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;
 }
Example #2
0
    // 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;
    }
Example #3
0
    private void Start()
    {
        leaderLocomotion = Leader.GetComponent <Vehicle>();

        steeringForEvade = GetComponent <SteeringForEvade>();

        vehicle = GetComponent <Vehicle>();

        isPlanar = vehicle.IsPlannar;

        LEADERBEHINDDIST = 2.0f;

        sqrEvadeDistance = EvadeDistance * EvadeDistance;
    }