Beispiel #1
0
        public int CheckEvents(out Event @event)
        {
            CheckCreated();
            Native.ENetEvent nativeEvent;
            var ret = Native.enet_host_check_events(_host, out nativeEvent);

            if (ret <= 0)
            {
                @event = new Event();
                return(ret);
            }
            @event = new Event(nativeEvent);
            return(ret);
        }
Beispiel #2
0
        public int CheckEvents(out Event @event)
        {
            CheckCreated();


            int result = Native.enet_host_check_events(nativeHost, out ENetEvent nativeEvent);

            if (result <= 0)
            {
                @event = default;

                return(result);
            }

            @event = new Event(nativeEvent);

            return(result);
        }
Beispiel #3
0
        public int CheckEvents(out Event @event)
        {
            ThrowIfNotCreated();

            ENetEvent nativeEvent;

            var result = Native.enet_host_check_events(nativeHost, out nativeEvent);

            if (result <= 0)
            {
                @event = default(Event);

                return(result);
            }

            @event = new Event(nativeEvent);

            return(result);
        }