Skip to content

Instantly share code, notes, and snippets.

@dpasca
Created August 17, 2015 08:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dpasca/c307559aed3c66b0d8e9 to your computer and use it in GitHub Desktop.
Save dpasca/c307559aed3c66b0d8e9 to your computer and use it in GitHub Desktop.
Event recording
// sure cost
void GameMain::UIInputTouchBegan( void *id, float x, float y )
{
DASSERT( !mEventLock ); mEventLock = true;
mEventData.WriteValue<u_int>( EVT_TOUCH_BEGAN );
mEventData.WriteValue<void *>( id );
mEventData.WriteValue<float>( x );
mEventData.WriteValue<float>( y );
mEventLock = false;
}
// not sure cost
void GameMain::UIInputTouchEnded( void *id, float x, float y )
{
mEventList.push_back([=](){ _UIInputTouchEnded(id,x,y); });
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment