Files

25 lines
587 B
Haxe
Raw Permalink Normal View History

2026-05-06 17:52:45 -07:00
package lnx;
#if lnx_debug
import leenkx.trait.internal.DebugDraw;
#end
class MyTrait extends iron.Trait {
public function new() {
super();
notifyOnInit( () -> {
var plane = iron.Scene.active.getChild("Plane");
var suzanne = iron.Scene.active.getChild("Suzanne");
// To see debug drawing, `Leenkx Project - Debug Console` option has to be enabled
#if lnx_debug
DebugDraw.notifyOnRender( (draw:DebugDraw) -> {
if(plane != null) draw.bounds(plane.transform);
if(suzanne != null) draw.bounds(suzanne.transform);
// draw.line();
});
#end
});
}
}