| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859 |
- using System;
- using System.Runtime.InteropServices;
- namespace ENet
- {
- public struct Event
- {
- private readonly IntPtr e;
- public Event(IntPtr e)
- {
- this.e = e;
- }
- public ENetEvent Struct
- {
- get
- {
- return (ENetEvent)Marshal.PtrToStructure(this.e, typeof(ENetEvent));
- }
- set
- {
- Marshal.StructureToPtr(value, this.e, false);
- }
- }
- public IntPtr NativePtr
- {
- get
- {
- return e;
- }
- }
- public Packet Packet
- {
- get
- {
- return new Packet(this.Struct.packet);
- }
- }
- public Peer Peer
- {
- get
- {
- return new Peer(this.Struct.peer);
- }
- }
- public EventType Type
- {
- get
- {
- return this.Struct.type;
- }
- }
- }
- }
|