From 796c6cc2a42eeb2f0db8986272f28bad428c7fd0 Mon Sep 17 00:00:00 2001 From: John Doty Date: Sun, 27 Aug 2023 09:29:30 -0700 Subject: [PATCH] [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. --- game/actor.ts | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/game/actor.ts b/game/actor.ts index fcaaeb19..8c2891fd 100644 --- a/game/actor.ts +++ b/game/actor.ts @@ -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); } } }