IEnumerator Wait()
    {
        if (power >= 1 && triggered)
        {
            yield return(new WaitForSeconds(stopTimer));

            power--;
            textArea.text = power.ToString();
            triggered     = false;
            if (power == 0)
            {
                airCraft.Immobilize();
            }
        }
    }
    /// <summary>
    ///
    /// </summary>
    public void OnExit(bool byDeath = false)
    {
        foreach (MonoBehaviour m in VehicleScripts)
        {
            m.enabled = false;
        }
        if (m_VehicleType == VehicleType.Jet)
        {
            JetScript.Immobilize();
        }
        VehicleCamera.SetActive(false);

        Player.transform.parent   = null;
        Player.transform.position = ExitPoint.position;
        Vector3 r = ExitPoint.eulerAngles;

        r.y = transform.eulerAngles.y;
        Player.transform.rotation = Quaternion.Euler(r);

        Player.GetComponent <bl_PlayerCar>().OnExitLocal(this, byDeath);
        LocalInVehicle  = false;
        RemoteInVehicle = false;
        VehicleUI.OnExit(m_VehicleType);
        bl_EventHandler.OnLocalPlayerVehicle(false, m_VehicleType);
        LocalPlayerView.RPC("NetworkCarEvent", PhotonTargets.OthersBuffered, false, m_VehicleType, photonView.viewID, PlayerVisibleInside);
        view.RPC("InAndOutEvent", PhotonTargets.OthersBuffered, false);
    }
Example #3
0
    public override void Die()
    {
        base.Die();
        if (aiController != null)
        {
            aiController.enabled = false;
        }

        plane.Immobilize();
//		plane.enabled=false;
//		aiController.
//		plane.=0;
        Expolde();
    }
Example #4
0
    /// <summary>
    ///
    /// </summary>
    public void OnExit()
    {
        foreach (MonoBehaviour m in JetScripts)
        {
            m.enabled = false;
        }
        CarCamera.SetActive(false);

        Player.transform.position = ExitPoint.position;
        Player.transform.rotation = ExitPoint.rotation;

        Player.GetComponent <bl_PlayerCar>().OnExitLocal();
        FindPlayerView(bl_GameController.m_ViewID).RPC("NetworkCarEvent", PhotonTargets.OthersBuffered, false, 1);
        InCar      = false;
        Into       = false;
        LocalInCar = false;
        view.RPC("JetEvent", PhotonTargets.OthersBuffered, false);
        JetController.Immobilize();
    }