added new tool, changed main debug

This commit is contained in:
=
2026-03-12 13:48:12 -04:00
parent 152e509dec
commit 6f1c50185a
2 changed files with 21 additions and 5 deletions

View File

@@ -1,7 +1,6 @@
import pygame as pg
from queue import Queue
def _debug(fn):
def wrapper(self: 'Debug', *args, **kwargs):
if not self.enabled: return
@@ -48,4 +47,17 @@ class Debug:
self._debug_queue.put(_draw_lines)
@_debug
def draw_collider(self, collider, t):
def _draw_collider():
h = collider.hull(t)
pg.draw.lines(
self._screen,
color=(0,255,255),
points=[v for v in h.vertices()],
closed=True
)
self._debug_queue.put(_draw_collider)
debug = Debug()