public override void EnterState(GameManager owner) { _statePreparators = ServiceLocator.ResolveList <StatePreparator>(); if (_statePreparators.Count != 0) { foreach (var sp in _statePreparators) { sp.DisableComponents(); } } _valuePreserver = ServiceLocator.Resolve <ValuePreserver>(); _valuePreserver?.PreserveValue(); Time.timeScale = 0; _clipLength = 5f; if (audioSource.IsNotNull()) { _clipLength = audioSource.clip.length; } }
public void RegisterPreservable() => ValuePreserver.RegisterPerservable(this);