A simple script that sets the behaviour for the falling airship state. The player's ship will free-fall and the camera will stay in place and look at the ship.
Inheritance: UnityEngine.MonoBehaviour
コード例 #1
0
 void Awake()
 {
     m_myRigid = GetComponent<Rigidbody>();
     m_trans = transform;
     //m_dyingBehaviour = GetComponent<AirshipDyingBehaviour>();
     m_stallingBehaviour = GetComponent<AirshipStallingBehaviour>();
     m_suicideBehaviour = GetComponent<AirshipSuicideBehaviour>();
 }
コード例 #2
0
        void Awake()
        {
            // Get Rigidbody variables
            m_myRigid = GetComponent<Rigidbody>();
            m_trans = transform;

            m_myRigid.mass = adjustableMass;
            m_startShipMass = adjustableMass;

            m_anim = GetComponent<Animator>();
            m_shipPartDestroy = GetComponent<ShipPartDestroy>();
            m_shipStallScript = GetComponent<AirshipStallingBehaviour>();
            m_shipStates = GetComponent<StateManager>();

            m_tray = GetComponentInChildren<PassengerTray>();
        }
コード例 #3
0
        void Awake()
        {
            m_trans = transform;
            m_rb = GetComponent<Rigidbody>();
            m_shipParts = GetComponent<ShipPartDestroy>();
            //m_broadSideWeapons = GetComponent<BroadsideWeaponsController>();
            m_camRotator = GetComponent<RotateCam>();

               // m_rouletteScript = GetComponent<RouletteBehaviour>();
            m_airshipScript = GetComponent<AirshipControlBehaviour>();
            m_dyingScript = GetComponent<AirshipDyingBehaviour>();
            m_stallingScript = GetComponent<AirshipStallingBehaviour>();
            m_suicideScript = GetComponent<AirshipSuicideBehaviour>();

            //m_inputManager = GetComponent<InputManager>();

            // World position & rotation
            m_worldStartPos = m_trans.position;
            m_worldStartRotation = m_trans.rotation;

            //get reference to audio source
            m_Audio = gameObject.GetComponent<AudioSource>();
        }