<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[GMan's Mods & Stuff — How to use SmoothEventReceiver (addon type)]]></title>
	<link rel="self" href="https://gprogs.com/extern.php?action=feed&amp;tid=351&amp;type=atom" />
	<updated>2008-12-07T15:58:40Z</updated>
	<generator>PunBB</generator>
	<id>https://gprogs.com/viewtopic.php?id=351</id>
		<entry>
			<title type="html"><![CDATA[Re: How to use SmoothEventReceiver (addon type)]]></title>
			<link rel="alternate" href="https://gprogs.com/viewtopic.php?pid=1333#p1333" />
			<content type="html"><![CDATA[<p>greetings Plash <img src="https://gprogs.com/img/smilies/smile.png" width="15" height="15" alt="smile" />&nbsp; my apologies on the delay but im a bit swamped in tasks at the momemt.&nbsp; the goal of the smooth event receiver is to create an event interface similar to B3Ds interface.&nbsp; so instead of having to create a custom event receiver in your game (or multiples) and override the OnEvent to handle what you want, you seteventreceiver to an instance of smootheventreceiver and then call the methods to check the input queue.</p><p>setup would look something like:<br /></p><div class="codebox"><pre><code>Local device:IrrlichtDevice = ..
    IrrlichtDevice.Create(EDT_BURNINGVIDEO, _DIMENSION2DI(640, 480), 16, ..
        False, False, False, Null)

Local events:SmoothEventReceiver = SmoothEventReceiver.createReceiver()

device.setEventReceiver(events)

&#039; check for key press
If events.IsKeyDown(EKEY_ESCAPE) Then .....</code></pre></div><p>i would recommend storing the instance of the SmoothEventReceiver either globally or somewhere in your game framework to prevent having to recast it everywhere when calling device.getEventReceiver().</p><p>hope this helps!</p>]]></content>
			<author>
				<name><![CDATA[gman]]></name>
				<uri>https://gprogs.com/profile.php?id=2</uri>
			</author>
			<updated>2008-12-07T15:58:40Z</updated>
			<id>https://gprogs.com/viewtopic.php?pid=1333#p1333</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[How to use SmoothEventReceiver (addon type)]]></title>
			<link rel="alternate" href="https://gprogs.com/viewtopic.php?pid=1332#p1332" />
			<content type="html"><![CDATA[<p>How exactly should we be using the SmoothEventReceiver type?<br />I can&#039;t figure out how to make it work in the Movement example, and, afaik, it is not used in any of the addon samples.</p>]]></content>
			<author>
				<name><![CDATA[plash]]></name>
				<uri>https://gprogs.com/profile.php?id=251</uri>
			</author>
			<updated>2008-12-02T21:56:12Z</updated>
			<id>https://gprogs.com/viewtopic.php?pid=1332#p1332</id>
		</entry>
</feed>
