This is the basic airship control. It manages pitch, yaw, and roll. Syncs up to ship animations. In time this script will probably be changed a lot. Many of the movement features here were expanded upon and derived from the Unity Standard Vehicle Assets - Plane Controller. Unlike the old Storms Project, this game moves Non-Kinematic Rigidbodies through Physics (unlike Kinematic Rigidbody via direct control).
Inheritance: UnityEngine.MonoBehaviour
        Transform m_transform; // This gameObject's transform

        #endregion Fields

        #region Methods

        public void Awake()
        {
            m_airpshipControl   = GetComponentInParent<AirshipControlBehaviour>();
            m_transform         = transform;
        }
Esempio n. 2
0
 public void Awake()
 {
     m_standardControl   = GetComponent<AirshipControlBehaviour>();
     m_fireshipControl   = GetComponent<AirshipSuicideBehaviour>();
     m_rouletteControl   = GetComponent<RouletteBehaviour>();
     m_rotateCam         = GetComponent<RotateCam>();
     m_broadSideWeapons  = GetComponent<BroadsideWeaponsController>();
     m_countermeasures 	= GetComponent<Countermeasures> ();
     m_stateManager 		= GetComponent<StateManager>();
 }
Esempio n. 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>();
        }