public override void packToString(GameRuleSerializer serializer)
 {
     //pack the condition type
     serializer.packByte(GAME_RULE_CONDITION_BIT_SIZE, GAME_RULE_EVENT_HAPPENED_CONDITION_BYTE_VAL);
     packToStringAsEventHappenedCondition(serializer);
 }
 public override void packToString(GameRuleSerializer serializer)
 {
     serializer.packByte(GAME_RULE_ACTION_BIT_SIZE, GAME_RULE_META_RULE_ACTION_BYTE_VAL);
     innerMetaRule.packToString(serializer);
 }
 public override void packToString(GameRuleSerializer serializer)
 {
     serializer.packByte(GAME_RULE_CONDITION_BIT_SIZE, GAME_RULE_ZONE_CONDITION_BYTE_VAL);
     serializer.packToString(zoneType, Zone.standardZoneTypes);
     selector.packToStringAsSourceSelector(serializer);
 }
 public override void packToString(GameRuleSerializer serializer)
 {
     serializer.packByte(GAME_RULE_SELECTOR_BIT_SIZE, GAME_RULE_BALL_SHOOTER_SELECTOR_BYTE_VAL);
 }
 public override void packToString(GameRuleSerializer serializer)
 {
     serializer.packByte(GAME_RULE_META_RULE_BIT_SIZE, GAME_RULE_PLAYER_SWAP_META_RULE_BYTE_VAL);
 }
 public override void packToString(GameRuleSerializer serializer)
 {
     serializer.packByte(GAME_RULE_EFFECT_BIT_SIZE, GAME_RULE_POINTS_PLAYER_EFFECT_BYTE_VAL);
     //we'll just save N bits of the points, so one of the (2^N) consecutive values <= POINTS_SERIALIZATION_MAX_VALUE
     serializer.packByte(POINTS_SERIALIZATION_BIT_COUNT, (byte)(pointsGiven & POINTS_SERIALIZATION_MASK));
 }
 public override void packToStringAsSourceSelector(GameRuleSerializer serializer)
 {
     serializer.packByte(GAME_RULE_SOURCE_SELECTOR_BIT_SIZE, GAME_RULE_BALL_SOURCE_SELECTOR_BYTE_VAL);
 }
 public override void packToString(GameRuleSerializer serializer)
 {
     serializer.packByte(GAME_RULE_EFFECT_BIT_SIZE, GAME_RULE_FREEZE_EFFECT_BYTE_VAL);
     base.packToString(serializer);
 }
 public override void packToString(GameRuleSerializer serializer)
 {
     serializer.packByte(GAME_RULE_ACTION_BIT_SIZE, GAME_RULE_EFFECT_ACTION_BYTE_VAL);
     selector.packToString(serializer);
     innerEffect.packToString(serializer);
 }
 public override void packToString(GameRuleSerializer serializer)
 {
     serializer.packByte(GAME_RULE_ACTION_DURATION_BIT_SIZE, GAME_RULE_ACTION_UNTIL_CONDITION_DURATION_BYTE_VAL);
     untilCondition.packToString(serializer);
 }
 public override void packToString(GameRuleSerializer serializer)
 {
     serializer.packByte(GAME_RULE_ACTION_DURATION_BIT_SIZE, GAME_RULE_ACTION_FIXED_DURATION_BYTE_VAL);
     //we'll just save N bits, so from 0 to (2^N-1)
     serializer.packByte(DURATION_SERIALIZATION_BIT_COUNT, (byte)(duration & DURATION_SERIALIZATION_MASK));
 }
 public override void packToString(GameRuleSerializer serializer)
 {
     serializer.packByte(GAME_RULE_ACTION_DURATION_BIT_SIZE, GAME_RULE_ACTION_UNTIL_CONDITION_DURATION_BYTE_VAL);
     triggerSelector.packToString(serializer);
     //this saves us a couple bits and a little time
     untilCondition.packToStringAsEventHappenedCondition(serializer);
 }