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