resolving comments
This commit is contained in:
parent
eac84f583d
commit
644025df7a
@ -165,11 +165,9 @@ do
|
||||
TokenManager.spawnCounterToken = function(card, tokenType, tokenValue, shiftDown)
|
||||
if tokenValue < 1 or tokenValue > 50 then return end
|
||||
|
||||
local pos = card.positionToWorld(card.positionToLocal(card.getPosition()) + Vector(0, 0.2, shiftDown))
|
||||
local pos = card.positionToWorld(Vector(0, 0.2, shiftDown))
|
||||
local rot = card.getRotation()
|
||||
TokenManager.spawnToken(pos, tokenType, rot, function(spawned)
|
||||
spawned.setState(tokenValue)
|
||||
end)
|
||||
TokenManager.spawnToken(pos, tokenType, rot, function(spawned) spawned.setState(tokenValue) end)
|
||||
end
|
||||
|
||||
-- Spawns a number of tokens.
|
||||
@ -230,10 +228,16 @@ do
|
||||
local tokenTemplate = tokenTemplates[tokenType]
|
||||
|
||||
-- Take ONLY the Y-value for rotation, so we don't flip the token coming out of the bag
|
||||
local rot = Vector(tokenTemplate.Transform.rotX,
|
||||
270,
|
||||
tokenTemplate.Transform.rotZ)
|
||||
if rotation ~= nil then
|
||||
rot.y = rotation.y
|
||||
end
|
||||
return spawnObjectData({
|
||||
data = tokenTemplate,
|
||||
position = position,
|
||||
rotation = Vector(tokenTemplate.Transform.rotX, rotation.y or 270, tokenTemplate.Transform.rotZ),
|
||||
rotation = rot,
|
||||
callback_function = callback
|
||||
})
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user