void HandleSpeedChange(GameSpeedMessageArgs args) { if (args.NewSpeedName == PAUSE_NAME) { _prePauseSpeedName = _currentSpeedName; } CurrentTimeScale = args.NewSpeedTimeScale; _currentSpeedName = args.NewSpeedName; }
void PostSpeedChange(string speed, float value) { var args = new GameSpeedMessageArgs() { PreviousSpeedTimeScale = CurrentTimeScale, PreviousSpeedName = _currentSpeedName, NewSpeedTimeScale = value, NewSpeedName = speed }; Locator.Get <IMessageHub>().QueueMessage(SpeedChangeMessageName, args); }