Exemplo n.º 1
0
 public void CompelteMission()
 {
     if (friendlies.Count == 0 && !readyForEvac)
     {
         readyForEvac = true;
         evacHeli.GetComponent <HeliController>().enabled = false;
         StartCoroutine(TakeOff());
     }
 }
Exemplo n.º 2
0
    private void OnCollisionEnter(Collision coll)
    {
        HeliController tempHC = coll.collider.gameObject.GetComponentInChildren <HeliController>();

        if (tempHC != null)
        {
            Debug.Log("tempHC before " + tempHC.transform.position);
            coll.collider.transform.position += coll.contacts[0].normal * -20.0f;
            Rigidbody rb = tempHC.GetComponentInParent <Rigidbody>();
            tempHC.GetComponent <HeliInput>().ZeroSpeed();
            rb.velocity = Vector3.zero;
            Debug.Log("tempHC after " + tempHC.transform.position);
            FMOD.Studio.EventInstance randomSound = SoundPicker();
            randomSound.start();
        }
    }