void Start()
        {
            controller = CockpitStateController.instance;

            var rotationZeroPointObject = new GameObject("[RotationZeroPoint]");

            rotationZeroPoint = rotationZeroPointObject.transform;
            rotationZeroPoint.SetParent(transform);
            rotationZeroPoint.localPosition = Vector3.zero;
            rotationZeroPoint.localRotation = Quaternion.identity;

            var rotationPointObject = new GameObject("[RotationPoint]");

            rotationPoint = rotationPointObject.transform;
            rotationPoint.SetParent(rotationZeroPoint);
            rotationPoint.localPosition = Vector3.zero;
            rotationPoint.localRotation = Quaternion.identity;

            var translationZeroPointObject = new GameObject("[TranslationZeroPoint]");

            translationZeroPoint = translationZeroPointObject.transform;
            translationZeroPoint.SetParent(transform);
            translationZeroPoint.localPosition = Vector3.zero;
            translationZeroPoint.localRotation = Quaternion.identity;

            var translationPointObject = new GameObject("[TranslationPoint]");

            translationPoint = translationPointObject.transform;
            translationPoint.SetParent(translationZeroPoint);
            translationPoint.localPosition = Vector3.zero;
            translationPoint.localRotation = Quaternion.identity;
        }
 override protected void OnEnable()
 {
     base.OnEnable();
     controller = CockpitStateController.instance;
     CockpitStateController.EditLockedStateChanged.Listen(OnEditLockStateChanged);
 }
        void Start()
        {
            controller = CockpitStateController.instance;

            Refresh();
        }
Beispiel #4
0
 void Start()
 {
     controller = CockpitStateController.instance;
 }
 override protected void OnEnable()
 {
     base.OnEnable();
     controller = CockpitStateController.instance;
     CockpitStateController.MenuModeStateChanged.Listen(OnMenuModStateChanged);
 }