public abstract void packToString(GameRuleSerializer serializer);
Пример #2
0
 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);
 }
Пример #3
0
 public override void packToString(GameRuleSerializer serializer)
 {
     serializer.packByte(GAME_RULE_META_RULE_BIT_SIZE, GAME_RULE_PLAYER_SWAP_META_RULE_BYTE_VAL);
 }
Пример #4
0
 public override void packToString(GameRuleSerializer serializer)
 {
     serializer.packByte(GAME_RULE_ACTION_BIT_SIZE, GAME_RULE_META_RULE_ACTION_BYTE_VAL);
     innerMetaRule.packToString(serializer);
 }
Пример #5
0
 public override void packToString(GameRuleSerializer serializer)
 {
     serializer.packByte(GAME_RULE_SELECTOR_BIT_SIZE, GAME_RULE_BALL_SHOOTER_SELECTOR_BYTE_VAL);
 }
Пример #6
0
 public void packToString(GameRuleSerializer serializer)
 {
     condition.packToString(serializer);
     action.packToString(serializer);
 }
Пример #7
0
 public override void packToStringAsSourceSelector(GameRuleSerializer serializer)
 {
     serializer.packByte(GAME_RULE_SOURCE_SELECTOR_BIT_SIZE, GAME_RULE_BALL_SOURCE_SELECTOR_BYTE_VAL);
 }
Пример #8
0
 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));
 }
Пример #9
0
 public override void packToString(GameRuleSerializer serializer)
 {
     serializer.packByte(GAME_RULE_EFFECT_BIT_SIZE, GAME_RULE_FREEZE_EFFECT_BYTE_VAL);
     base.packToString(serializer);
 }
Пример #10
0
 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));
 }
Пример #11
0
 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);
 }
Пример #12
0
 public override void packToString(GameRuleSerializer serializer)
 {
     duration.packToString(serializer);
 }
Пример #13
0
 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)
 {
     //pack the condition type
     serializer.packByte(GAME_RULE_CONDITION_BIT_SIZE, GAME_RULE_EVENT_HAPPENED_CONDITION_BYTE_VAL);
     packToStringAsEventHappenedCondition(serializer);
 }
Пример #15
0
 public abstract void packToStringAsSourceSelector(GameRuleSerializer serializer);
 //until-condition durations know that their condition is an event, so we don't need to save the condition type
 public void packToStringAsEventHappenedCondition(GameRuleSerializer serializer)
 {
     //pack the event type
     serializer.packToString(eventType, GameRuleEvent.eventTypesList);
     //pack our source and target types
     serializer.packToString(sourceType, GameRuleEvent.eventTypeSourcesList[eventType]);
     serializer.packToString(targetType, GameRuleEvent.potentialEventsList[eventType][sourceType]);
     //pack the param if applicable
     if (targetType == typeof(FieldObject))
         serializer.packToString(param, FieldObject.standardFieldObjects);
 }
Пример #17
0
 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);
 }