eengine.cpp:
bool EGame::OnEvent(SEvent event)
{
if (event.EventType == irr::EET_KEY_INPUT_EVENT&&
!event.KeyInput.PressedDown)
{
switch(event.KeyInput.Key)
{
case KEY_KEY_W:
case KEY_KEY_S:
{
device->drop();
}
return true;
}
}
}
eengine.h:
class EGame : public IEventReceiver
{
public:
EGame();
virtual bool OnEvent(SEvent event);
private:
ISceneManager* smgr;
IrrlichtDevice* device;
video::IVideoDriver* driver;
};
obv i cut out the irrelivent bits, any help would be greatly appriciated