public void PostReceiveProgress(ReceivePacket entity, float progress) { ReceiveListener listener = mReceiveListener; if (listener != null && entity != null) { PostQueue(() => { listener.OnReceiveProgress(entity, progress); }); } }
public void Run() { if (listener != null) { if (progress > 0) { listener.OnReceiveProgress(entity, progress); } else if (isEnd) { listener.OnReceiveEnd(entity); } else { listener.OnReceiveStart(entity.GetPacketType(), entity.GetId()); } } entity = null; listener = null; }
public void Run() { listener.OnReceiveProgress(entity, progress); entity = null; listener = null; }