From f97f5d4d82c176e638d02a6f8814a62efd37c3b3 Mon Sep 17 00:00:00 2001 From: Adam Saltsman Date: Sat, 30 Apr 2011 13:14:26 -0500 Subject: [PATCH] fixed bugs with plugin system and path debug draw --- org/flixel/FlxG.as | 2 +- org/flixel/FlxPath.as | 2 ++ org/flixel/plugin/DebugPathDisplay.as | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/org/flixel/FlxG.as b/org/flixel/FlxG.as index 8f50ca76..51cdcce1 100755 --- a/org/flixel/FlxG.as +++ b/org/flixel/FlxG.as @@ -977,7 +977,7 @@ package org.flixel var l:uint = pluginList.length; while(i < l) { - if(pluginList[i++] is ClassType) + if(pluginList[i] is ClassType) return plugins[i]; i++; } diff --git a/org/flixel/FlxPath.as b/org/flixel/FlxPath.as index f328ad4d..fb5e798b 100644 --- a/org/flixel/FlxPath.as +++ b/org/flixel/FlxPath.as @@ -31,6 +31,7 @@ package org.flixel /** * Setting this to true will prevent the object from appearing * when the visual debug mode in the debugger overlay is toggled on. + * @default false */ public var ignoreDrawDebug:Boolean; @@ -53,6 +54,7 @@ package org.flixel _point = new FlxPoint(); debugScrollFactor = new FlxPoint(1.0,1.0); debugColor = 0xffffff; + ignoreDrawDebug = false; var debugPathDisplay:DebugPathDisplay = manager; if(debugPathDisplay != null) diff --git a/org/flixel/plugin/DebugPathDisplay.as b/org/flixel/plugin/DebugPathDisplay.as index 3fe41f6a..920ee65c 100644 --- a/org/flixel/plugin/DebugPathDisplay.as +++ b/org/flixel/plugin/DebugPathDisplay.as @@ -37,7 +37,7 @@ package org.flixel.plugin override public function draw():void { if(!FlxG.visualDebug || ignoreDrawDebug) - return; + return; if(cameras == null) cameras = FlxG.cameras;