Draw lines between connections
This commit is contained in:
@@ -18,7 +18,9 @@
|
||||
(playState.entryGroup.add sprite)
|
||||
(dictSet sprites e.id sprite)))
|
||||
->[archive e pos e2 pos2 &opt ui]
|
||||
~"$e $e2"
|
||||
(let [o .origin (dictGet sprites e.id)
|
||||
o2 .origin (dictGet sprites e2.id)]
|
||||
(playState.debugLayer.drawLine (+ pos.x o.x) (+ pos.y o.y) (+ pos2.x o2.x) (+ pos2.y o2.y) FlxColor.LIME))
|
||||
->[archive e &opt ui]
|
||||
{
|
||||
(whenLet [sprite (dictGet sprites e.id)]
|
||||
@@ -31,6 +33,7 @@
|
||||
}))
|
||||
|
||||
(method &override :Void clear []
|
||||
(playState.debugLayer.clear)
|
||||
(sprites.clear)
|
||||
(playState.entryGroup.kill)
|
||||
(playState.entryGroup.clear)
|
||||
|
@@ -18,6 +18,7 @@ import flixel.math.FlxRect;
|
||||
import flixel.addons.plugin.FlxMouseControl;
|
||||
import flixel.input.mouse.FlxMouseEventManager;
|
||||
using StringTools;
|
||||
using kiss_flixel.DebugLayer;
|
||||
using kiss_flixel.CameraTools;
|
||||
import kiss_tools.KeyShortcutHandler;
|
||||
import kiss_tools.FlxKeyShortcutHandler;
|
||||
|
@@ -34,6 +34,9 @@
|
||||
(prop :FlxTypedGroup<EntrySprite> entryGroup (new FlxTypedGroup<EntrySprite>))
|
||||
(add entryGroup)
|
||||
|
||||
(prop debugLayer (new DebugLayer))
|
||||
(add debugLayer)
|
||||
|
||||
(prop uiCamera (new FlxCamera 0 0 FlxG.width FlxG.height))
|
||||
(set uiCamera.bgColor FlxColor.TRANSPARENT)
|
||||
(FlxG.cameras.add uiCamera false)
|
||||
|
Reference in New Issue
Block a user