public override void Grant(bool skipBase = false)
        {
            var state = targetState.State();

            switch (type)
            {
            case SysCommandType.StopIfEqual:
                if (state.ValueAsInt() == targetValue)
                {
                    throw new DoneWithThis();
                }
                break;

            case SysCommandType.StopIfGreater:
                if (state.ValueAsInt() > targetValue)
                {
                    throw new DoneWithThis();
                }
                break;

            case SysCommandType.StopIfLess:
                if (state.ValueAsInt() < targetValue)
                {
                    throw new DoneWithThis();
                }
                break;
            }
        }
Example #2
0
        public override void Grant(bool skipBase = false)
        {
            var state = zoneId.State();

            state.Value.Byte += 1;
            state.Write(state.Value);
            base.Grant(skipBase);
        }
Example #3
0
 public static void Byte(UberId id, byte val) => id.State().Write(new UberValue(val));
Example #4
0
 public static void Float(UberId id, float val) => id.State().Write(new UberValue(val));
Example #5
0
 public static void Int(UberId id, int val) => id.State().Write(new UberValue(val));
Example #6
0
 public static void Bool(UberId id, bool val) => id.State().Write(new UberValue(val));