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; } }
public override void Grant(bool skipBase = false) { var state = zoneId.State(); state.Value.Byte += 1; state.Write(state.Value); base.Grant(skipBase); }
public static void Byte(UberId id, byte val) => id.State().Write(new UberValue(val));
public static void Float(UberId id, float val) => id.State().Write(new UberValue(val));
public static void Int(UberId id, int val) => id.State().Write(new UberValue(val));
public static void Bool(UberId id, bool val) => id.State().Write(new UberValue(val));