| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647 |
- namespace ENet
- {
- public class Event
- {
- private readonly Host host;
- private readonly ENetEvent ev;
- public Event(Host host, ENetEvent ev)
- {
- this.host = host;
- this.ev = ev;
- }
- public ENetEvent Ev
- {
- get
- {
- return this.ev;
- }
- }
- public Packet Packet
- {
- get
- {
- return new Packet(this.host, this.Ev.packet);
- }
- }
- public Peer Peer
- {
- get
- {
- Peer peer = this.host.PeersManager[this.Ev.peer];
- return peer;
- }
- }
- public EventType Type
- {
- get
- {
- return this.Ev.type;
- }
- }
- }
- }
|