Ejemplo n.º 1
0
        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;
            }
        }
Ejemplo n.º 2
0
        public override void Grant(bool skipBase = false)
        {
            var state = zoneId.State();

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