public override void Process(EventConnection ps) { if (CheckClassType(ps)) { Functor.Dispatch(ps); } }
public override void Unpack(EventConnection ps, BitStream stream) { var gc = ps as GhostConnection; if (gc == null) { return; } if ((gc.DoesGhostTo() && RpcDirection == NetObjectRPCDirection.RPCToGhost) || (gc.DoesGhostFrom() && RpcDirection == NetObjectRPCDirection.RPCToGhostParent)) { if (stream.ReadFlag()) { var ghostIndex = (int)stream.ReadInt((byte)GhostConnection.GhostIdBitSize); base.Unpack(ps, stream); DestObject = RpcDirection == NetObjectRPCDirection.RPCToGhost ? gc.ResolveGhost(ghostIndex) : gc.ResolveGhostParent(ghostIndex); } } else { NetConnection.SetLastError("Invalid packet."); } }
public override void Process(EventConnection ps) { if (DestObject == null) { return; } if (!CheckClassType(DestObject)) { return; } NetObject.SetRPCSourceConnection(ps as GhostConnection); Functor.Dispatch(DestObject); NetObject.SetRPCSourceConnection(null); }
public override void Pack(EventConnection ps, BitStream stream) { var gc = ps as GhostConnection; if (gc == null) { return; } var ghostIndex = -1; if (DestObject != null) { ghostIndex = gc.GetGhostIndex(DestObject); } if (!stream.WriteFlag(ghostIndex != -1)) { return; } stream.WriteInt((uint)ghostIndex, (byte)GhostConnection.GhostIdBitSize); base.Pack(ps, stream); }
public virtual void NotifyDelivered(EventConnection ps, bool madeId) { }
public virtual void NotifySent(EventConnection ps) { }
public virtual void NotifyPosted(EventConnection ps) { }
public abstract void Process(EventConnection ps);
public abstract void Unpack(EventConnection ps, BitStream steam);
public override void Unpack(EventConnection ps, BitStream stream) { Functor.Read(stream); }
public override void Pack(EventConnection ps, BitStream stream) { Functor.Write(stream); }