Exemple #1
0
        public override AbstractMasterActorSerializable GetCombatReplayJSON(CombatReplayMap map)
        {
            PlayerSerializable aux = new PlayerSerializable
            {
                Group     = Group,
                Img       = CombatReplay.Icon,
                Type      = "Player",
                ID        = GetCombatReplayID(),
                Positions = new double[2 * CombatReplay.Positions.Count],
                Dead      = new long[2 * CombatReplay.Deads.Count],
                Down      = new long[2 * CombatReplay.Downs.Count]
            };
            int i = 0;

            foreach (Point3D pos in CombatReplay.Positions)
            {
                (double x, double y) = map.GetMapCoord(pos.X, pos.Y);
                aux.Positions[i++]   = x;
                aux.Positions[i++]   = y;
            }
            i = 0;
            foreach ((long start, long end) in CombatReplay.Deads)
            {
                aux.Dead[i++] = start;
                aux.Dead[i++] = end;
            }
            i = 0;
            foreach ((long start, long end) in CombatReplay.Downs)
            {
                aux.Down[i++] = start;
                aux.Down[i++] = end;
            }

            return(aux);
        }
 public override object GetConnectedTo(CombatReplayMap map)
 {
     (double x, double y) = map.GetMapCoord(Position.X, Position.Y);
     return(new double[2]
     {
         x,
         y
     });
 }
Exemple #3
0
        public override AbstractMasterActorSerializable GetCombatReplayJSON(CombatReplayMap map)
        {
            MobSerializable aux = new MobSerializable
            {
                Img       = CombatReplay.Icon,
                Type      = "Mob",
                Positions = new double[2 * CombatReplay.Positions.Count],
                Start     = CombatReplay.TimeOffsets.start,
                End       = CombatReplay.TimeOffsets.end,
                ID        = GetCombatReplayID()
            };
            int i = 0;

            foreach (Point3D pos in CombatReplay.Positions)
            {
                (double x, double y) = map.GetMapCoord(pos.X, pos.Y);
                aux.Positions[i++]   = x;
                aux.Positions[i++]   = y;
            }

            return(aux);
        }
 public override object GetConnectedTo(CombatReplayMap map)
 {
     return(_agent.GetCombatReplayID());
 }
Exemple #5
0
 public abstract AbstractMasterActorSerializable GetCombatReplayJSON(CombatReplayMap map);
Exemple #6
0
 public abstract object GetConnectedTo(CombatReplayMap map);