コード例 #1
0
        public override void Draw()
        {
            base.Draw();

            // move to 50,50 since the "by" path will start at 50,50
            CCDrawManager.PushMatrix();
            CCDrawManager.Translate(50, 50, 0);
            CCDrawingPrimitives.DrawCatmullRom(m_pArray, 50);
            CCDrawManager.PopMatrix();

            CCDrawingPrimitives.DrawCatmullRom(m_pArray2, 50);
        }
コード例 #2
0
        public override void Draw()
        {
            base.Draw();

            // move to 50,50 since the "by" path will start at 50,50
            CCDrawManager.PushMatrix();
            CCDrawManager.Translate(50, 50, 0);
            CCDrawingPrimitives.DrawCardinalSpline(m_pArray, 0, 100);
            CCDrawManager.PopMatrix();

            var s = CCDirector.SharedDirector.WinSize;

            CCDrawManager.PushMatrix();
            CCDrawManager.Translate(s.Width / 2, 50, 0);
            CCDrawingPrimitives.DrawCardinalSpline(m_pArray, 1, 100);
            CCDrawManager.PopMatrix();
        }
コード例 #3
0
        internal void RenderCustomCommand(CCDrawManager drawManager)
        {
            bool originalDepthTestState = drawManager.DepthTest;
            drawManager.DepthTest = UsingDepthTest;

            drawManager.PushMatrix();
            drawManager.SetIdentityMatrix();

            if (WorldTransform != CCAffineTransform.Identity)
            {
                var worldTrans = WorldTransform.XnaMatrix;
                drawManager.MultMatrix(ref worldTrans);
            }
            Action();

            drawManager.PopMatrix();

            drawManager.DepthTest = originalDepthTestState;
        }