コード例 #1
0
        private void FarExplosion()
        {
            // MainShake
            MyScriptWrapper.IncreaseHeadShake(MyMwcUtils.GetRandomInt(7, 10));
            MyScriptWrapper.AddAudioImpShipQuake();

            // Register sub shakes
            MissionTimer.RegisterTimerAction(MyMwcUtils.GetRandomInt(200, 400), m_subShakeAction, false);
            MissionTimer.RegisterTimerAction(MyMwcUtils.GetRandomInt(600, 800), m_subShakeAction, false);
            MissionTimer.RegisterTimerAction(MyMwcUtils.GetRandomInt(800, 1200), m_subShakeAction, false);
            MissionTimer.RegisterTimerAction(MyMwcUtils.GetRandomInt(1200, 1400), m_subShakeAction, false);

            // Register next far explosion
            MissionTimer.RegisterTimerAction(MyMwcUtils.GetRandomInt(3000, 5000), m_shakeAction, false);
            //TODO add particle effect
        }