Exemplo n.º 1
0
        public void Mutate(GamePropertyMutation mutation, string value)
        {
            switch (mutation)
            {
            case GamePropertyMutation.Reset:
                SetValue(_value);
                break;

            case GamePropertyMutation.Set:
                SetValue(value);
                break;

            default:
                throw new NotSupportedException("effect cannot be applied to boolean quality");
            }
        }
Exemplo n.º 2
0
        public void Mutate(GamePropertyMutation mutation, int value)
        {
            switch (mutation)
            {
            case GamePropertyMutation.Reset:
                SetValue(_value);
                break;

            case GamePropertyMutation.Set:
                SetValue(value);
                break;

            case GamePropertyMutation.Add:
                SetValue(_currentValue + value);
                break;

            case GamePropertyMutation.Subtract:
                SetValue(_currentValue - value);
                break;
            }
        }