示例#1
0
        public override void UpdateBeforeSimulation()
        {
            if (SetupComplete == false)
            {
                SetupComplete = true;
                Setup();
                Logger.MsgDebug("MES API Registered: " + MESApi.MESApiReady.ToString(), DebugTypeEnum.General);
            }

            Ticks++;

            if (IsServer)
            {
                BehaviorManager.ProcessBehaviors();
            }

            if (EffectManager.SoundsPlaying)
            {
                EffectManager.ProcessAvatarDisplay();
            }

            if (Ticks % 10 == 0)
            {
                if (EffectManager.SoundsPending == true)
                {
                    EffectManager.ProcessPlayerSoundEffect();
                }
            }

            if (Ticks % 60 == 0)
            {
                Ticks = 0;
            }
        }
示例#2
0
        public override void UpdateBeforeSimulation()
        {
            if (!RivalAiEnabled)
            {
                MyAPIGateway.Utilities.InvokeOnGameThread(() => SetUpdateOrder(MyUpdateOrder.NoUpdate));
                return;
            }

            if (SetupComplete == false)
            {
                SetupComplete = true;
                Setup();
                Logger.MsgDebug("MES API Registered: " + MESApi.MESApiReady.ToString(), DebugTypeEnum.General);
            }

            Ticks++;

            if (IsServer)
            {
                BehaviorManager.ProcessBehaviors();
            }

            if (EffectManager.SoundsPlaying)
            {
                EffectManager.ProcessAvatarDisplay();
            }

            if (Ticks % 10 == 0)
            {
                if (EffectManager.SoundsPending == true)
                {
                    EffectManager.ProcessPlayerSoundEffect();
                }
            }

            if (Ticks % 60 == 0)
            {
                Ticks = 0;
            }
        }