added new tool, changed main debug
This commit is contained in:
14
tools.py
14
tools.py
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user