add alt view angle for sideways decks
This commit is contained in:
parent
9e434ca9a5
commit
5963904091
@ -37,7 +37,7 @@ Spawner.spawnCards = function(cardList, pos, rot, sort, callback)
|
|||||||
-- Spawn each of the three types individually. Each Y position shift accounts for the thickness
|
-- Spawn each of the three types individually. Each Y position shift accounts for the thickness
|
||||||
-- of the spawned deck
|
-- of the spawned deck
|
||||||
local position = { x = pos.x, y = pos.y, z = pos.z }
|
local position = { x = pos.x, y = pos.y, z = pos.z }
|
||||||
Spawner.spawn(investigatorCards, position, { rot.x, rot.y - 90, rot.z}, callback)
|
Spawner.spawn(investigatorCards, position, { rot.x, rot.y - 90, rot.z }, callback, true)
|
||||||
|
|
||||||
position.y = position.y + (#investigatorCards + #standardCards) * 0.07
|
position.y = position.y + (#investigatorCards + #standardCards) * 0.07
|
||||||
Spawner.spawn(standardCards, position, rot, callback)
|
Spawner.spawn(standardCards, position, rot, callback)
|
||||||
@ -82,7 +82,7 @@ end
|
|||||||
-- @param pos Position table where the cards should be spawned (global)
|
-- @param pos Position table where the cards should be spawned (global)
|
||||||
-- @param rot Rotation table for the orientation of the spawned cards (global)
|
-- @param rot Rotation table for the orientation of the spawned cards (global)
|
||||||
-- @param callback Function, callback to be called after the card/deck spawns.
|
-- @param callback Function, callback to be called after the card/deck spawns.
|
||||||
Spawner.spawn = function(cardList, pos, rot, callback)
|
Spawner.spawn = function(cardList, pos, rot, callback, sidewaysDeck)
|
||||||
if (#cardList == 0) then
|
if (#cardList == 0) then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
@ -105,6 +105,10 @@ Spawner.spawn = function(cardList, pos, rot, callback)
|
|||||||
scaleY = 1,
|
scaleY = 1,
|
||||||
scaleZ = cardList[1].data.Transform.scaleZ,
|
scaleZ = cardList[1].data.Transform.scaleZ,
|
||||||
}
|
}
|
||||||
|
-- set the alt view angle for sideway decks
|
||||||
|
if sidewaysDeck then
|
||||||
|
deck.AltLookAngle = { x = 0, y = 180, z = 90 }
|
||||||
|
end
|
||||||
for _, spawnCard in ipairs(cardList) do
|
for _, spawnCard in ipairs(cardList) do
|
||||||
Spawner.addCardToDeck(deck, spawnCard.data)
|
Spawner.addCardToDeck(deck, spawnCard.data)
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user