[game] Debug lines and whatnot for actor collision

I'm just leaving it on for now, I need to get text rendering working
for reals.
This commit is contained in:
John Doty 2023-08-27 09:29:30 -07:00
parent df49143885
commit 796c6cc2a4

View file

@ -1,7 +1,7 @@
import { load_texture } from "./assets";
import { btn, Button } from "./input";
import { Vec2, new_v2, vadd, vsub, vnorm, vmul } from "./vector";
import { spr, use_texture, Texture } from "./graphics";
import { color, stroke, circle, spr, use_texture, Texture } from "./graphics";
import { has_collision, Level } from "./level";
export interface ActorProps {
@ -192,9 +192,12 @@ export class Robo extends Actor {
const frame = (anim.start + ((clock / anim.speed) % anim.length)) >> 0;
spr(x, y, w, h, frame * w, 0, 32, 32);
// color(0, 0, 0, 0);
// stroke(0, 0, 0, 1);
// circle(this.props.position.x, this.props.position.y, 8, 1);
color(0, 0, 0, 0);
stroke(1, 0, 0, 1);
circle(this.props.position.x, this.props.position.y, 8, 1);
stroke(0, 1, 0, 1);
circle(this.props.position.x, this.props.position.y, 16, 1);
}
}
}