Ejemplo n.º 1
0
        public virtual void addChild(CCNode child, uint z, CCPoint parallaxRatio, CCPoint positionOffset)
        {
            CCPointObject.pointWithCCPoint(parallaxRatio, positionOffset).Child = child;
            CCPoint mTPosition = this.m_tPosition;

            mTPosition.x   = mTPosition.x * parallaxRatio.x + positionOffset.x;
            mTPosition.y   = mTPosition.y * parallaxRatio.y + positionOffset.y;
            child.position = mTPosition;
            base.addChild(child, (int)z, child.tag);
        }
Ejemplo n.º 2
0
        public virtual void addChild(CCNode child, UInt32 z, CCPoint parallaxRatio, CCPoint positionOffset)
        {
            Debug.Assert(child != null, "Argument must be non-nil");
            CCPointObject obj = CCPointObject.pointWithCCPoint(parallaxRatio, positionOffset);

            obj.Child = child;
            //ccCArray.ccArrayAppendObjectWithResize(m_pParallaxArray, (CCObject)obj);

            CCPoint pos = m_tPosition;

            pos.x          = pos.x * parallaxRatio.x + positionOffset.x;
            pos.y          = pos.y * parallaxRatio.y + positionOffset.y;
            child.position = pos;

            base.addChild(child, (int)z, child.tag);
        }