Ejemplo n.º 1
0
        public void OnMapUpdate(MapSettingEvent @event)
        {
            switch (@event.Setting)
            {
            case MapSettings.ApproachRate:
                @event.Value    = (float)ApproachRateModValue;
                @event.Canceled = !ApproachRateModEnabled;
                break;

            case MapSettings.CircleSize:
                @event.Value    = (float)CircleSizeModValue;
                @event.Canceled = !CircleSizeModEnabled;
                break;

            case MapSettings.OverallDifficulty:
                @event.Value    = (float)OverallDifficultyModValue;
                @event.Canceled = !OverallDifficulyModEnabled;
                break;

            case MapSettings.DoubletimeSpeed:
                @event.Canceled = true;
                break;

            default:
                throw new ArgumentOutOfRangeException();
            }
        }
Ejemplo n.º 2
0
        private static float GetWithEvent(MapSettings setting, float value)
        {
            var _event = new MapSettingEvent(setting, value);

            EventManager.Invoke(_event);

            return(_event.Canceled ? value : _event.Value);
        }