Skip to content

Commit 687633a

Browse files
committed
Better entity marker
1 parent 32fabac commit 687633a

File tree

1 file changed

+15
-3
lines changed

1 file changed

+15
-3
lines changed

src/game/Fx.hx

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,10 +62,22 @@ class Fx extends GameChildProcess {
6262
public inline function allocMain_normal(id,x,y) return pool.alloc(main_normal, Assets.tiles.getTileRandom(id), x, y);
6363

6464

65-
public inline function markerEntity(e:Entity, c:Col=Pink, short=false) {
65+
public inline function markerEntity(e:Entity, c:Col=Pink, sec=3.0) {
6666
#if debug
67-
if( e!=null && e.isAlive() )
68-
markerCase(e.cx, e.cy, short?0.03:3, c);
67+
if( e!=null && e.isAlive() ) {
68+
var p = allocMain_add(D.tiles.fxCircle15, e.attachX, e.attachY);
69+
p.setCenterRatio(e.pivotX, e.pivotY);
70+
p.scaleTo(e.wid, e.hei);
71+
p.setFadeS(1, 0, 0.06);
72+
p.colorize(c);
73+
p.lifeS = sec;
74+
75+
var p = allocMain_add(D.tiles.pixel, e.attachX, e.attachY);
76+
p.setFadeS(1, 0, 0.06);
77+
p.colorize(c);
78+
p.setScale(2);
79+
p.lifeS = sec;
80+
}
6981
#end
7082
}
7183

0 commit comments

Comments
 (0)