コード例 #1
0
ファイル: Slice.cs プロジェクト: mistajuliax/ChipmunkBinding
        public override void Draw(GameTime gameTime, IDebugDraw debugDraw)
        {
            base.Draw(gameTime, debugDraw);

            if (rightClick)
            {
                debugDraw.DrawSegment(sliceStart, ChipmunkDemoGame.ChipmunkDemoMouse, new DebugColor(1, 0, 0, 1));
            }
            if (pinching)
            {
                debugDraw.DrawSegment(sliceStart, sliceEnd, new DebugColor(1, 0, 0, 1));
            }
        }
コード例 #2
0
        private static void SpaceDebugDrawSegmentCallback(Vect a, Vect b, DebugColor color, voidptr_t data)
        {
            IDebugDraw debugDraw = NativeInterop.FromIntPtr <IDebugDraw>(data);

            debugDraw.DrawSegment(a, b, color);
        }