Expanded documentation and remove old log messages
This commit is contained in:
parent
8478003860
commit
6ed61c9174
@ -1,5 +1,5 @@
|
|||||||
-- set true to enable debug logging and show Physics.cast()
|
-- set true to enable debug logging and show Physics.cast()
|
||||||
local DEBUG = true
|
local DEBUG = false
|
||||||
|
|
||||||
-- we use this to turn off collision handling until onLoad() is complete
|
-- we use this to turn off collision handling until onLoad() is complete
|
||||||
local COLLISION_ENABLED = false
|
local COLLISION_ENABLED = false
|
||||||
@ -655,11 +655,6 @@ end
|
|||||||
-- @param matchTypes Boolean. Whether snap points should only snap for the matching card types.
|
-- @param matchTypes Boolean. Whether snap points should only snap for the matching card types.
|
||||||
function setLimitSnapsByType(params)
|
function setLimitSnapsByType(params)
|
||||||
local matchTypes = params.matchTypes
|
local matchTypes = params.matchTypes
|
||||||
if matchTypes then
|
|
||||||
log("Set true")
|
|
||||||
else
|
|
||||||
log("Set false")
|
|
||||||
end
|
|
||||||
local snaps = self.getSnapPoints()
|
local snaps = self.getSnapPoints()
|
||||||
for i, snap in ipairs(snaps) do
|
for i, snap in ipairs(snaps) do
|
||||||
local snapPos = snap.position
|
local snapPos = snap.position
|
||||||
@ -691,7 +686,12 @@ function setLimitSnapsByType(params)
|
|||||||
self.setSnapPoints(snaps)
|
self.setSnapPoints(snaps)
|
||||||
end
|
end
|
||||||
|
|
||||||
function inArea(point, bounds)
|
-- Simple method to check if the given point is in a specified area. Local use only,
|
||||||
|
-- @param point Vector. Point to check, only x and z values are relevant
|
||||||
|
-- @param bounds Table. Defined area to see if the point is within. See MAIN_PLAY_AREA for sample
|
||||||
|
-- bounds definition.
|
||||||
|
-- @return Boolean. True if the point is in the area defined by bounds
|
||||||
|
local function inArea(point, bounds)
|
||||||
return (point.x < bounds.upperLeft.x
|
return (point.x < bounds.upperLeft.x
|
||||||
and point.x > bounds.lowerRight.x
|
and point.x > bounds.lowerRight.x
|
||||||
and point.z < bounds.upperLeft.z
|
and point.z < bounds.upperLeft.z
|
||||||
|
@ -11,7 +11,8 @@ do
|
|||||||
-- matchTypes is true, the main card slot snap points will only snap assets, while the
|
-- matchTypes is true, the main card slot snap points will only snap assets, while the
|
||||||
-- investigator area point will only snap Investigators. If matchTypes is false, snap points will
|
-- investigator area point will only snap Investigators. If matchTypes is false, snap points will
|
||||||
-- be reset to snap all cards.
|
-- be reset to snap all cards.
|
||||||
-- @param matchTypes Boolean. Whether snap points should only snap for the matching card types.
|
-- @param matchCardTypes Boolean. Whether snap points should only snap for the matching card
|
||||||
|
-- types.
|
||||||
-- @param matColor String for one of the active player colors - White, Orange, Green, Red. Also
|
-- @param matColor String for one of the active player colors - White, Orange, Green, Red. Also
|
||||||
-- accepts "All" as a special value which will apply the setting to all four mats.
|
-- accepts "All" as a special value which will apply the setting to all four mats.
|
||||||
PlaymatApi.setLimitSnapsByType = function(matchCardTypes, matColor)
|
PlaymatApi.setLimitSnapsByType = function(matchCardTypes, matColor)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user