feat(zones): add setDebug and debugColour (#369)

This commit is contained in:
BerkieBb
2023-07-23 11:37:29 +02:00
committed by GitHub
parent 84b7f97a1c
commit 8f5880aad7
2 changed files with 42 additions and 21 deletions

View File

@@ -46,9 +46,11 @@ lib.zones = {
data.polygon = glm.polygon.new(points)
data.coords = data.polygon:centroid()
data.type = 'poly'
data.remove = removeZone
data.contains = contains
data.debug = nil
data.debugColour = nil
data.inside = nil
data.onEnter = nil
data.onExit = nil
@@ -70,9 +72,11 @@ lib.zones = {
vec3(-data.size.x, -data.size.y, 0),
vec3(data.size.x, -data.size.y, 0),
}) + data.coords)
data.type = 'box'
data.remove = removeZone
data.contains = contains
data.debug = nil
data.debugColour = nil
data.inside = nil
data.onEnter = nil
data.onExit = nil
@@ -86,9 +90,11 @@ lib.zones = {
data.id = #Zones + 1
data.coords = convertToVector(data.coords)
data.radius = (data.radius or 2) + 0.0
data.type = 'sphere'
data.remove = removeZone
data.contains = insideSphere
data.debug = nil
data.debugColour = nil
data.inside = nil
data.onEnter = nil
data.onExit = nil