public void OnEntityEmerge(ViIStream IS) { if (!OtherEntityShow) { return; } ViEntityID entityID; IS.Read(out entityID); ViEntityTypeID typeID = ViEntityType.Type(entityID); ViEntityType type; if (ViEntityCreator.List.TryGetValue(typeID, out type)) { ViRPCExecer execer = type.Create(); _execerList[entityID] = execer; UInt16 channelMask = OTHER_PROPERTY_MASK; execer.Start(entityID, EntityManager, channelMask, IS); execer.Entity.RPC.Net = _net; if (OnEntityEnterExecer != null) { OnEntityEnterExecer(execer); } } }
public void OnSelfEntity(UInt16 funcID, ViIStream IS) { ViEntityID entityID; IS.Read(out entityID); ViEntityTypeID typeID = ViEntityType.Type(entityID); ViEntityType type; if (ViEntityCreator.List.TryGetValue(typeID, out type)) { ViRPCExecer execer = type.Create(); _execerList[entityID] = execer; UInt16 channelMask = SELF_PROPERTY_MASK; execer.Start(entityID, EntityManager, channelMask, IS); execer.Entity.RPC.Net = _net; ViDebuger.AssertError(OnSelfCreatedExecer != null); OnSelfCreatedExecer(execer); } }