Beispiel #1
0
        public static void LocalReset()
        {
            //AudioTrackService.ClearAllAudio();
            SFXService.ClearConstructed();
            Events.Event0.DestroyAll();
            ETime.Slowdown.RevokeAll(MultiOp.Priority.CLEAR_SCENE);
            ETime.Timer.DestroyAll();
            BehaviorEntity.DestroyAllSummons();
            PublicDataHoisting.DestroyAll();
            FiringCtx.ClearNames();
            ReflWrap.ClearWrappers();
            StateMachineManager.ClearCachedSMs();
            BulletManager.ClearPoolControls();
            BulletManager.ClearEmpty();
            BulletManager.ClearAllBullets();
            BulletManager.DestroyCopiedPools();
            InstanceData.CampaignDataUpdated.Proc();
#if UNITY_EDITOR || ALLOW_RELOAD
            Events.LocalReset.Proc();
#endif
            //Ordered last so cancellations from HardCancel will occur under old data
            Instance = new InstanceData(InstanceMode.NULL);
            Debug.Log($"Reloading level: {Difficulty.Describe()} is the current difficulty");
            UIManager.UpdateTags();
        }
Beispiel #2
0
 private static void ClearPhase()
 {
     BulletManager.ClearPoolControls(false);
     BulletManager.ClearEmpty();
     Events.Event0.Reset();
     ETime.Slowdown.RevokeAll(MultiOp.Priority.CLEAR_PHASE);
     ETime.Timer.ResetPhase();
     Events.ClearPhase.Proc();
     //Delay this so copy pools can be softculled correctly
     //TODO: can I remove this? might be permissible to keep copied pools throughout the scene
     ETime.QueueDelayedEOFInvoke(1, BulletManager.DestroyCopiedPools);
     //Delay this so that bullets referencing hosting data don't break down before
     //converting into softcull (note softcull bullets don't run velocity)
     ETime.QueueDelayedEOFInvoke(1, PublicDataHoisting.ClearValues);
 }