Ejemplo n.º 1
0
                public ObjEvent(EndianBinaryReader r)
                {
                    X         = r.ReadInt32();
                    Y         = r.ReadInt32();
                    Elevation = r.ReadByte();

                    Id           = r.ReadUInt16();
                    Sprite       = r.ReadStringNullTerminated();
                    MovementType = r.ReadEnum <ObjMovementType>();
                    MovementX    = r.ReadInt32();
                    MovementY    = r.ReadInt32();
                    TrainerType  = r.ReadEnum <TrainerType>();
                    TrainerSight = r.ReadByte();
                    Script       = r.ReadStringNullTerminated();
                    Flag         = r.ReadEnum <Flag>();
                }
Ejemplo n.º 2
0
 public EventObj(Map.Events.ObjEvent oe, Map map)
     : base(oe.Id, oe.Sprite, new Position(oe))
 {
     MovementType = oe.MovementType;
     InitMovementType();
     OriginX      = oe.X;
     MovementX    = oe.MovementX;
     OriginY      = oe.Y;
     MovementY    = oe.MovementY;
     TrainerType  = oe.TrainerType;
     TrainerSight = oe.TrainerSight;
     Script       = oe.Script;
     Flag         = oe.Flag;
     map.Objs.Add(this);
     Map = map;
 }
Ejemplo n.º 3
0
                public ObjEvent(JToken j)
                {
                    X         = j[nameof(X)].Value <int>();
                    Y         = j[nameof(Y)].Value <int>();
                    Elevation = j[nameof(Elevation)].Value <byte>();

                    Id           = j[nameof(Id)].Value <ushort>();
                    Sprite       = j[nameof(Sprite)].Value <string>();
                    MovementType = j[nameof(MovementType)].EnumValue <ObjMovementType>();
                    MovementX    = j[nameof(MovementX)].Value <int>();
                    MovementY    = j[nameof(MovementY)].Value <int>();
                    TrainerType  = j[nameof(TrainerType)].EnumValue <TrainerType>();
                    TrainerSight = j[nameof(TrainerSight)].Value <byte>();
                    Script       = j[nameof(Script)].Value <string>();
                    Flag         = j[nameof(Flag)].EnumValue <Flag>();
                }