예제 #1
0
        public override CCObject copyWithZone(CCZone zone)
        {
            CCZone     tmpZone = zone;
            CCBezierBy ret     = null;

            if (tmpZone != null && tmpZone.m_pCopyObject != null)
            {
                ret = tmpZone.m_pCopyObject as CCBezierBy;
                if (ret == null)
                {
                    return(null);
                }
            }
            else
            {
                ret     = new CCBezierBy();
                tmpZone = new CCZone(ret);
            }

            base.copyWithZone(tmpZone);

            ret.initWithDuration(m_fDuration, m_sConfig);

            return(ret);
        }
예제 #2
0
        public static CCBezierBy actionWithDuration(float t, ccBezierConfig c)
        {
            CCBezierBy ret = new CCBezierBy();

            ret.initWithDuration(t, c);

            return(ret);
        }
예제 #3
0
        public override CCFiniteTimeAction reverse()
        {
            ccBezierConfig r;

            r.endPosition    = CCPointExtension.ccpNeg(m_sConfig.endPosition);
            r.controlPoint_1 = CCPointExtension.ccpAdd(m_sConfig.controlPoint_2, CCPointExtension.ccpNeg(m_sConfig.endPosition));
            r.controlPoint_2 = CCPointExtension.ccpAdd(m_sConfig.controlPoint_1, CCPointExtension.ccpNeg(m_sConfig.endPosition));

            CCBezierBy action = CCBezierBy.actionWithDuration(m_fDuration, r);

            return(action);
        }