コード例 #1
0
ファイル: MyCockpit.cs プロジェクト: Rynchodon/SpaceEngineers
        public void AttachAutopilot(MyAutopilotBase newAutopilot, bool updateSync = true)
        {
            RemoveAutopilot();
            m_aiPilot = newAutopilot;
            m_aiPilot.AttachedToShipController(this);

            if (updateSync && Sync.IsServer)
            {
                MyMultiplayer.RaiseEvent(this, x => x.AttachAutopilot_message, newAutopilot.GetObjectBuilder());
            }

            NeedsUpdate |= MyEntityUpdateEnum.EACH_10TH_FRAME;
        }
コード例 #2
0
        public void AttachAutopilot(MyAutopilotBase newAutopilot, bool updateSync = true)
        {
            RemoveAutopilot();
            m_aiPilot = newAutopilot;
            m_aiPilot.AttachedToShipController(this);

            if (updateSync && Sync.IsServer)
            {
                SyncObject.SendAutopilotAttached(newAutopilot.GetObjectBuilder());
            }

            NeedsUpdate |= MyEntityUpdateEnum.EACH_10TH_FRAME;
        }