Some stuff for freeplay
This commit is contained in:
parent
4868be724f
commit
d6520f8644
@ -5,14 +5,14 @@ return {
|
||||
},
|
||||
offsets = {
|
||||
bf = {
|
||||
["bf slide in"] = Vector2(695, 315),
|
||||
["bf cs idle"] = Vector2(700, 300),
|
||||
["bf cs confirm"] = Vector2(700, 300)
|
||||
["bf slide in"] = Vector2(625, 315),
|
||||
["bf cs idle"] = Vector2(730, 300),
|
||||
["bf cs confirm"] = Vector2(730, 300)
|
||||
},
|
||||
pico = {
|
||||
["pico slide in"] = Vector2(690, 320),
|
||||
["pico cs idle"] = Vector2(1150, 190),
|
||||
["pico cs confirm"] = Vector2(690, 320),
|
||||
["pico slide in"] = Vector2(760, 320),
|
||||
["pico cs idle"] = Vector2(1230, 190),
|
||||
["pico cs confirm"] = Vector2(760, 320),
|
||||
},
|
||||
},
|
||||
flips = {
|
||||
|
@ -100,14 +100,8 @@ return function()
|
||||
|
||||
local capsule = Sprite(string.format("images/freeplay/freeplayCapsule/capsule/freeplayCapsule_%s.png", curChar), string.format("images/freeplay/freeplayCapsule/capsule/freeplayCapsule_%s.json", curChar))
|
||||
capsule.position = Vector2()
|
||||
capsule.layer = 70
|
||||
capsule.layer = 10
|
||||
capsule:PlayAnimation("mp3 capsule w backing NOT SELECTED", 24, true)
|
||||
-- for index, anim in next, capsule.quads do
|
||||
-- for index, quad in next, anim do
|
||||
-- quad.resize = Vector2(0.8,0.8)
|
||||
-- quad.offset = Vector2(quad.offset.x * 0.8, quad.offset.y * 0.8)
|
||||
-- end
|
||||
-- end
|
||||
|
||||
capsules[song.name] = capsule
|
||||
|
||||
@ -117,7 +111,7 @@ return function()
|
||||
string.format("sprites/freeplay/icons/%s.json", icon))
|
||||
spriteicon:PlayAnimation("idle", .005, false)
|
||||
spriteicon.frame = 1
|
||||
spriteicon.layer = 10
|
||||
spriteicon.layer = 20
|
||||
for index, anim in next, spriteicon.quads do
|
||||
for index, quad in next, anim do
|
||||
quad.resize = Vector2(1.5,1.5)
|
||||
@ -134,7 +128,7 @@ return function()
|
||||
local lastChange = 0
|
||||
|
||||
bfAtlas = Atlas(string.format("sprites/freeplay/freeplay-%s", curChar))
|
||||
bfAtlas.layer = 20
|
||||
bfAtlas.layer = 5
|
||||
|
||||
local diffIMG
|
||||
local iconNum = math.random(1, 3)
|
||||
@ -252,24 +246,19 @@ return function()
|
||||
if bfAtlas.atlas.libraries and bfAtlas.atlas.frame >= bfAtlas.atlas:getTimelineLength(bfAtlas.atlas:getSymbolTimeline(bfAtlas.atlas.symbol)) then
|
||||
bfAtlas:PlayAnimation(animationAliases.idle)
|
||||
end
|
||||
bfAtlas.position = Vector2(animationPositions[bfAtlas.atlas.symbol].x, animationPositions[bfAtlas.atlas.symbol].y)
|
||||
bfAtlas.position = Vector2(animationPositions[bfAtlas.atlas.symbol].x + 30, animationPositions[bfAtlas.atlas.symbol].y)
|
||||
|
||||
for index, song in next, songs do
|
||||
local icon = icons[song.name]
|
||||
if icon then
|
||||
icon.position = Vector2(430 - (50 * math.abs(index - evilCurIndex)),
|
||||
love.graphics:getHeight() / 2 + (200 * (index - evilCurIndex - .5)))
|
||||
icon.position = Vector2(400 - (50 * math.abs(index - evilCurIndex)),
|
||||
love.graphics:getHeight() / 2 + (160 * (index - evilCurIndex - .5)))
|
||||
end
|
||||
icon.alpha = 1 - math.abs(index - evilCurIndex) / 15
|
||||
local capsule = capsules[song.name]
|
||||
capsule.position = Vector2(380 - (50 * math.abs(index - evilCurIndex)),
|
||||
love.graphics:getHeight() / 2 + (200 * (index - evilCurIndex - .5) - 25))
|
||||
|
||||
local button = songButtons[song.name]
|
||||
if button then
|
||||
button:SetPosition(Vector2(380 - (50 * math.abs(index - evilCurIndex)),
|
||||
love.graphics:getHeight() / 2 + (200 * (index - evilCurIndex - .5) - 25))
|
||||
)
|
||||
end
|
||||
capsule.position = Vector2(350 - (50 * math.abs(index - evilCurIndex)),
|
||||
love.graphics:getHeight() / 2 + (160 * (index - evilCurIndex - .5) - 25))
|
||||
capsule.alpha = 1 - math.abs(index - evilCurIndex) / 15
|
||||
end
|
||||
|
||||
render.cameraPosition = Vector2(0, 0)
|
||||
@ -285,8 +274,8 @@ return function()
|
||||
for index, song in next, songs do
|
||||
local color = index == curIndex and {chardata.colors[1] >= 0.1 and chardata.colors[1] - 0.1 or 0, chardata.colors[2] >= 0.1 and chardata.colors[2] - 0.1 or 0, chardata.colors[3] >= 0.1 and chardata.colors[3] - 0.1 or 0} or chardata.colors
|
||||
|
||||
love.graphics.print({ color, song.name }, font, 700 - (50 * math.abs(index - evilCurIndex)),
|
||||
love.graphics:getHeight() / 2 + (200 * (index - evilCurIndex - .5)), 0, 1, 1, 200)
|
||||
love.graphics.print({ color, song.name }, font, 670 - (50 * math.abs(index - evilCurIndex)),
|
||||
love.graphics:getHeight() / 2 + (160 * (index - evilCurIndex - .5)), 0, 1, 1, 200)
|
||||
end
|
||||
-- if bfAtlas.atlas.symbol == curChar .. " slide in" then
|
||||
-- bfAtlas:draw(curChar == "bf" and 695 or 690, curChar == "bf" and 315 or 320, 0, flip and -1 or 1, 1)
|
||||
@ -298,7 +287,7 @@ return function()
|
||||
local text = string.format("Accuracy: %s, Score: %s, Rank: %s",
|
||||
tostring(data.songs[curChar][curSong.name][curDiff].accuracy):sub(1, 5),
|
||||
data.songs[curChar][curSong.name][curDiff].score, data.songs[curChar][curSong.name][curDiff].rank)
|
||||
love.graphics.print({ { 1, 1, 1 }, text }, smallerFont, 1280 - text:len() * 10, 0)
|
||||
love.graphics.print({ { 1, 1, 1 }, text }, smallerFont, 1280 - smallerFont:getWidth(text), 0)
|
||||
end
|
||||
end
|
||||
|
||||
@ -366,6 +355,7 @@ return function()
|
||||
scroll:play()
|
||||
elseif key == "p" then --changes character to/from pico hopefully
|
||||
arrow:Destroy()
|
||||
arrow2:Destroy()
|
||||
-- flip = true
|
||||
curCharIndex, curChar = next(playables, curCharIndex)
|
||||
if not curCharIndex then
|
||||
@ -384,7 +374,7 @@ return function()
|
||||
bfAtlas:Destroy()
|
||||
bfAtlas = Atlas(string.format("sprites/freeplay/freeplay-%s", curChar))
|
||||
bfAtlas:PlayAnimation(animationAliases.intro)
|
||||
bfAtlas.layer = 20
|
||||
bfAtlas.layer = 5
|
||||
|
||||
arrow = Sprite(
|
||||
string.format("sprites/freeplay/freeplaySelector-%s.png", curChar),
|
||||
|
Loading…
x
Reference in New Issue
Block a user