Example #1
0
        void HandleSpeedChange(GameSpeedMessageArgs args)
        {
            if (args.NewSpeedName == PAUSE_NAME)
            {
                _prePauseSpeedName = _currentSpeedName;
            }

            CurrentTimeScale  = args.NewSpeedTimeScale;
            _currentSpeedName = args.NewSpeedName;
        }
Example #2
0
        void PostSpeedChange(string speed, float value)
        {
            var args = new GameSpeedMessageArgs()
            {
                PreviousSpeedTimeScale = CurrentTimeScale,
                PreviousSpeedName      = _currentSpeedName,
                NewSpeedTimeScale      = value,
                NewSpeedName           = speed
            };

            Locator.Get <IMessageHub>().QueueMessage(SpeedChangeMessageName, args);
        }