Why not add a function, e.g. isDown() to the Keystate object? It would make the code more readable to those unfamiliar with it.
Keystate@ state = keyboard.getKeystate("space");
// elsewhere...
if ( state.isDown() )
{
// key is down
}
Male
Posted by Andreas Jonsson
on 18 October 2012 - 01:13 PM
Keystate@ state = keyboard.getKeystate("space");
// elsewhere...
if ( state.isDown() )
{
// key is down
}
Posted by Andreas Jonsson
on 16 October 2012 - 08:15 PM
Posted by Andreas Jonsson
on 16 October 2012 - 07:52 PM
Posted by Andreas Jonsson
on 16 October 2012 - 07:32 AM
void derived_callMe(derived *obj)
{
obj->callMe();
}
engine->RegisterObjectMethod("derived", "void callMe()", asFUNCTION(derived_callMe), asCALL_CDECL_OBJLAST);
Posted by Andreas Jonsson
on 14 October 2012 - 05:30 PM
Posted by Andreas Jonsson
on 13 October 2012 - 11:24 AM
Posted by Andreas Jonsson
on 10 October 2012 - 06:54 PM
Posted by Andreas Jonsson
on 06 October 2012 - 09:47 AM
Posted by Andreas Jonsson
on 06 October 2012 - 09:15 AM
Posted by Andreas Jonsson
on 04 October 2012 - 07:28 PM
Posted by Andreas Jonsson
on 03 October 2012 - 07:14 PM
Posted by Andreas Jonsson
on 03 October 2012 - 06:53 PM
Posted by Andreas Jonsson
on 21 September 2012 - 09:17 PM
Posted by Andreas Jonsson
on 21 September 2012 - 11:15 AM
Posted by Andreas Jonsson
on 20 September 2012 - 10:21 AM
Find content