//ResourceEntityPacket private static void HandlePacket(ResourceEntityPacket packet) { var en = Globals.GetEntity(packet.EntityId, EntityTypes.Resource); if (en != null) { en.Load(packet); } else { Globals.Entities.Add(packet.EntityId, new Resource(packet.EntityId, packet)); } }
public override EntityPacket EntityPacket(EntityPacket packet = null, Player forPlayer = null) { if (packet == null) { packet = new ResourceEntityPacket(); } packet = base.EntityPacket(packet, forPlayer); var pkt = (ResourceEntityPacket)packet; pkt.ResourceId = Base.Id; pkt.IsDead = IsDead; return(pkt); }
public Resource(Guid id, ResourceEntityPacket packet) : base(id, packet) { mRenderPriority = 0; }