本文整理汇总了C++中CCScriptEngineProtocol::getScriptType方法的典型用法代码示例。如果您正苦于以下问题:C++ CCScriptEngineProtocol::getScriptType方法的具体用法?C++ CCScriptEngineProtocol::getScriptType怎么用?C++ CCScriptEngineProtocol::getScriptType使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CCScriptEngineProtocol
的用法示例。
在下文中一共展示了CCScriptEngineProtocol::getScriptType方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1:
CCObject::~CCObject(void)
{
// if the object is managed, we should remove it
// from pool manager
if (m_uAutoReleaseCount > 0)
{
CCPoolManager::sharedPoolManager()->removeObject(this);
}
// if the object is referenced by Lua engine, remove it
CCScriptEngineManager* scriptManager = CCScriptEngineManager::sharedManager();
if ( scriptManager )
{
if (m_nLuaID)
{
CCScriptEngineManager::sharedManager()->getScriptEngine()->removeScriptObjectByCCObject(this);
}
else
{
CCScriptEngineProtocol* pEngine = CCScriptEngineManager::sharedManager()->getScriptEngine();
if (pEngine != NULL && pEngine->getScriptType() == kScriptTypeJavascript)
{
pEngine->removeScriptObjectByCCObject(this);
}
}
}
}
示例2: CCComponentContainer
CCNode::CCNode(void)
: m_fRotationX(0.0f)
, m_fRotationY(0.0f)
, m_fScaleX(1.0f)
, m_fScaleY(1.0f)
, m_fVertexZ(0.0f)
, m_obPosition(CCPointZero)
, m_fSkewX(0.0f)
, m_fSkewY(0.0f)
, m_obAnchorPointInPoints(CCPointZero)
, m_obAnchorPoint(CCPointZero)
, m_obContentSize(CCSizeZero)
, m_sAdditionalTransform(CCAffineTransformMakeIdentity())
, m_pCamera(NULL)
// children (lazy allocs)
// lazy alloc
, m_pGrid(NULL)
, m_nZOrder(0)
, m_pChildren(NULL)
, m_pParent(NULL)
// "whole screen" objects. like Scenes and Layers, should set m_bIgnoreAnchorPointForPosition to true
, m_nTag(kCCNodeTagInvalid)
// userData is always inited as nil
, m_pUserData(NULL)
, m_pUserObject(NULL)
, m_pUserObjectNR(NULL)
, m_pShaderProgram(NULL)
, m_eGLServerState(ccGLServerState(0))
, m_uOrderOfArrival(0)
, m_bRunning(false)
, m_bTransformDirty(true)
, m_bInverseDirty(true)
, m_bAdditionalTransformDirty(false)
, m_bVisible(true)
, m_bIgnoreAnchorPointForPosition(false)
, m_bReorderChildDirty(false)
, m_pComponentContainer(NULL)
, m_bInformDetach(false)
{
// set default scheduler and actionManager
CCDirector *director = CCDirector::sharedDirector();
m_pActionManager = director->getActionManager();
CC_SAFE_RETAIN(m_pActionManager);
m_pScheduler = director->getScheduler();
CC_SAFE_RETAIN(m_pScheduler);
CCScriptEngineProtocol* pEngine = CCScriptEngineManager::sharedManager()->getScriptEngine();
m_eScriptType = pEngine != NULL ? pEngine->getScriptType() : kScriptTypeNone;
m_pComponentContainer = new CCComponentContainer(this);
memset(&m_nUpdateScriptHandler, 0, sizeof(ccScriptFunction));
memset(&m_nScriptHandler, 0, sizeof(ccScriptFunction));
}
示例3:
CAObject::~CAObject(void)
{
CAScheduler::unscheduleAllForTarget(this);
CC_SAFE_RELEASE(m_pUserObject);
if (m_uAutoReleaseCount > 0)
{
CAPoolManager::sharedPoolManager()->removeObject(this);
}
CCScriptEngineProtocol* pEngine = CCScriptEngineManager::sharedManager()->getScriptEngine();
if (pEngine != NULL && pEngine->getScriptType() == kScriptTypeJavascript)
{
pEngine->removeScriptObjectByCCObject(this);
}
}
示例4:
NS_CC_BEGIN
CCNode::CCNode(void)
: m_fRotation(0.0f)
, m_fScaleX(1.0f)
, m_fScaleY(1.0f)
, m_fPositionZ(0.0f)
, m_obPosition(CCPointZero)
, m_fSkewX(0.0f)
, m_fSkewY(0.0f)
, m_obAnchorPointInPoints(CCPointZero)
, m_obAnchorPoint(CCPointZero)
, m_obContentSize(CCSizeZero)
, m_pCamera(NULL)
// children (lazy allocs)
// lazy alloc
, m_pGrid(NULL)
, m_nZOrder(0)
, m_pChildren(NULL)
, m_pParent(NULL)
// "whole screen" objects. like Scenes and Layers, should set m_bIgnoreAnchorPointForPosition to false
, m_nTag(kCCNodeTagInvalid)
, m_pUserObject(NULL)
, m_pShaderProgram(NULL)
, m_eGLServerState(ccGLServerState(0))
, m_bRunning(false)
, m_bTransformDirty(true)
, m_bInverseDirty(true)
, m_bVisible(true)
, m_bIgnoreAnchorPointForPosition(false)
, m_bReorderChildDirty(false)
, m_nScriptHandler(0)
, m_nUpdateScriptHandler(0)
{
// set default scheduler and actionManager
CCDirector *director = CCDirector::sharedDirector();
m_pActionManager = director->getActionManager();
m_pActionManager->retain();
m_pScheduler = director->getScheduler();
m_pScheduler->retain();
CCScriptEngineProtocol* pEngine = CCScriptEngineManager::sharedManager()->getScriptEngine();
m_eScriptType = pEngine != NULL ? pEngine->getScriptType() : kScriptTypeNone;
}
示例5: CCComponentContainer
CCNode::CCNode(void)
: m_fRotationX(0.0f)
, m_fRotationY(0.0f)
, m_fScaleX(1.0f)
, m_fScaleY(1.0f)
, m_fVertexZ(0.0f)
, m_obPosition(CCPointZero)
, m_fSkewX(0.0f)
, m_fSkewY(0.0f)
, m_obAnchorPointInPoints(CCPointZero)
, m_obAnchorPoint(CCPointZero)
, m_obContentSize(CCSizeZero)
, m_sAdditionalTransform(CCAffineTransformMakeIdentity())
, m_pCamera(NULL)
// children (lazy allocs)
// lazy alloc
, m_pGrid(NULL)
, m_nZOrder(0)
, m_pChildren(NULL)
, m_pParent(NULL)
// "whole screen" objects. like Scenes and Layers, should set m_bIgnoreAnchorPointForPosition to true
, m_nTag(kCCNodeTagInvalid)
// userData is always inited as nil
, m_pUserData(NULL)
, m_pUserObject(NULL)
, m_pShaderProgram(NULL)
, m_eGLServerState(ccGLServerState(0))
, m_uOrderOfArrival(0)
, m_bRunning(false)
, m_bTransformDirty(true)
, m_bInverseDirty(true)
, m_bAdditionalTransformDirty(false)
, m_bVisible(true)
, m_bIgnoreAnchorPointForPosition(false)
, m_bReorderChildDirty(false)
, m_nScriptHandler(0)
, m_nUpdateScriptHandler(0)
, m_pComponentContainer(NULL)
, m_bClipEnabled(false)
, m_oClipRect(CCRectZero)
, m_bTouchEnabled(false)
, m_bTouchChildren(true)
, m_drawOrder(0)
, m_pScriptTouchHandlerEntry(NULL)
,_displayedOpacity(255)
, _realOpacity(255)
, _displayedColor(ccWHITE)
, _realColor(ccWHITE)
, _cascadeColorEnabled(true)
, _cascadeOpacityEnabled(true)
{
// set default scheduler and actionManager
CCDirector *director = CCDirector::sharedDirector();
m_pActionManager = director->getActionManager();
m_pActionManager->retain();
m_pScheduler = director->getScheduler();
m_pScheduler->retain();
CCScriptEngineProtocol* pEngine = CCScriptEngineManager::sharedManager()->getScriptEngine();
m_eScriptType = pEngine != NULL ? pEngine->getScriptType() : kScriptTypeNone;
m_pComponentContainer = new CCComponentContainer(this);
}