Exemplo n.º 1
0
        public static CCCallFunc actionWithTarget(SelectorProtocol pSelectorTarget, SEL_CallFunc selector)
        {
            CCCallFunc pRet = new CCCallFunc();

            if (pRet != null && pRet.initWithTarget(pSelectorTarget))
            {
                pRet.m_pCallFunc = selector;
                return(pRet);
            }

            return(null);
        }
Exemplo n.º 2
0
        public override CCObject copyWithZone(CCZone pZone)
        {
            CCZone     pNewZone = null;
            CCCallFunc pRet     = null;

            if (pZone != null && pZone.m_pCopyObject != null)
            {
                //in case of being called at sub class
                pRet = (CCCallFunc)(pZone.m_pCopyObject);
            }
            else
            {
                pRet  = new CCCallFunc();
                pZone = pNewZone = new CCZone(pRet);
            }

            base.copyWithZone(pZone);
            pRet.initWithTarget(m_pSelectorTarget);
            pRet.m_pCallFunc      = m_pCallFunc;
            pRet.m_scriptFuncName = m_scriptFuncName;
            return(pRet);
        }