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); }
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(); }
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; }