axmol/cocos2dx/extensions/CCControlExtension/CCInvocation.cpp

21 lines
358 B
C++
Raw Normal View History

2012-04-16 18:58:43 +08:00
#include "CCInvocation.h"
NS_CC_BEGIN
2012-04-16 18:58:43 +08:00
CCInvocation::CCInvocation(CCObject* target, SEL_MenuHandler action, CCControlEvent controlEvent)
{
m_target=target;
m_action=action;
m_controlEvent=controlEvent;
}
void CCInvocation::invoke(CCObject* sender)
{
if (m_target && m_action)
{
(m_target->*m_action)(sender);
}
}
NS_CC_END