Code: Select all
//events
class EventR : public IEventReceiver
{
public:
virtual bool OnEvent(SEvent event)
{
if (event.EventType == EET_KEY_INPUT_EVENT)
{
if (event.KeyInput.Key == KEY_KEY_W)
{
walking = true;
}
} return false;
}
};
EventR receiver;
device->setEventReceiver(&receiver);
Thanks for any help.