Пример #1
0
        internal static bool ShipControllsInteract(On.ShipControlls.orig_Interact orig, ShipControlls self, Humanoid character, bool repeat)
        {
            PulleyControlls pulleyControlls = self as PulleyControlls;

            if (pulleyControlls && !pulleyControlls.m_ship)
            {
                character.Message(MessageHud.MessageType.Center, "$msg_pulley_is_not_connected");
                return(false);
            }
            return(orig(self, character, repeat));
        }
Пример #2
0
        public void Awake()
        {
            m_nview = GetComponent <ZNetView>();

            if (!m_nview || !m_nview.IsValid())
            {
                return;
            }
            WearNTear wearNTear = GetComponent <WearNTear>();

            wearNTear.m_onDestroyed += OnDestroyed;
            m_pulleyControlls        = transform.Find("wheel_collider").gameObject.AddComponent <PulleyControlls>();

            pivotLeft  = transform.Find("New/pivot_left");
            pivotRight = transform.Find("New/pivot_right");
            planet1    = pivotRight.Find("planet_1");
            planet2    = pivotRight.Find("planet_2");
            planet3    = pivotRight.Find("planet_3");
            planet4    = pivotRight.Find("planet_4");
            crank      = transform.Find("New/crank");

            m_controlGuiPos = transform.Find("ControlGui");
        }