Exemple #1
0
        public override void UpdateBeforeSimulation10()
        {
            Receiver_IsPoweredChanged();
            base.UpdateBeforeSimulation10();

            Debug.Assert(WantsToDrill || Enabled);

            if (Parent == null || Parent.Physics == null)
            {
                return;
            }

            m_drillFrameCountdown -= 10;
            if (m_drillFrameCountdown > 0)
            {
                return;
            }
            m_drillFrameCountdown += MyDrillConstants.DRILL_UPDATE_INTERVAL_IN_FRAMES;
            m_drillBase.IgnoredEntities.Add(Parent);
            if (m_drillBase.Drill(Enabled || m_wantsToCollect, true))
            {
                foreach (MyCockpit cockpit in CubeGrid.GetFatBlocks <MyCockpit>())
                {
                    cockpit.AddShake(ShakeAmount);
                }
            }
        }