mirror of
https://github.com/CommunityOx/ox_lib.git
synced 2026-08-18 15:36:02 +01:00
feat(zones): add setDebug and debugColour (#369)
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user