Image class, Sprite/Image parallax, proper stages
@ -194,8 +194,8 @@
|
||||
209
|
||||
],
|
||||
"camera_position": [
|
||||
-300,
|
||||
40
|
||||
-400,
|
||||
-90
|
||||
],
|
||||
"sing_duration": 4,
|
||||
"scale": 1
|
||||
|
@ -4172,7 +4172,7 @@
|
||||
"gfVersion": "gf",
|
||||
"song": "High Erect",
|
||||
"needsVoices": true,
|
||||
"stage": "stage",
|
||||
"stage": "limo",
|
||||
"validScore": true,
|
||||
"bpm": 125,
|
||||
"speed": 2.4
|
||||
|
@ -2,7 +2,7 @@
|
||||
"song": {
|
||||
"player1": "bf-car",
|
||||
"events": [],
|
||||
"gfVersion": "gf",
|
||||
"gfVersion": "gf-car",
|
||||
"notes": [
|
||||
{
|
||||
"sectionNotes": [],
|
||||
|
BIN
images/limo/fastCar.png
Normal file
After Width: | Height: | Size: 303 KiB |
BIN
images/limo/limoSunset.png
Normal file
After Width: | Height: | Size: 924 KiB |
BIN
images/stage/spotlight.png
Normal file
After Width: | Height: | Size: 12 KiB |
BIN
images/stage/stage_light.png
Normal file
After Width: | Height: | Size: 12 KiB |
BIN
images/stage/stageback.png
Normal file
After Width: | Height: | Size: 316 KiB |
BIN
images/stage/stagecurtains.png
Normal file
After Width: | Height: | Size: 151 KiB |
BIN
images/stage/stagefront.png
Normal file
After Width: | Height: | Size: 140 KiB |
@ -33,12 +33,13 @@ local function state(songName, songDifficulty)
|
||||
local beat = 0
|
||||
|
||||
local zoom = 1
|
||||
|
||||
local volume = 100
|
||||
|
||||
local modules = {}
|
||||
|
||||
local playing = false
|
||||
|
||||
local stage = json.parse(files.read_file("stages/stage.json"))
|
||||
local stage = json.parse(files.read_file(string.format("stages/%s.json", chart.stage)))
|
||||
|
||||
local unspawnedNotes = {}
|
||||
local notes = {}
|
||||
@ -171,11 +172,11 @@ local function state(songName, songDifficulty)
|
||||
for name, character in next, characters do
|
||||
if not character.singing then
|
||||
if name == "gf" then
|
||||
if beat % character.beats == 0 then
|
||||
character:PlayAnimation("danceLeft")
|
||||
end
|
||||
if beat % character.beats == 0 then
|
||||
character:PlayAnimation("danceLeft")
|
||||
end
|
||||
else
|
||||
character:PlayAnimation("idle")
|
||||
character:PlayAnimation("idle")
|
||||
end
|
||||
end
|
||||
end
|
||||
@ -183,6 +184,12 @@ local function state(songName, songDifficulty)
|
||||
zoom = zoom + .1
|
||||
end
|
||||
end
|
||||
|
||||
for index, module in next, modules do
|
||||
if module.onBeat then
|
||||
module.onBeat(beat)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
local section = chart.notes[math.floor(step / 16) + 1]
|
||||
@ -247,19 +254,20 @@ local function state(songName, songDifficulty)
|
||||
end
|
||||
end
|
||||
|
||||
if inst and not inst:isPlaying() then
|
||||
quit()
|
||||
end
|
||||
|
||||
zoom = myMath.lerp(zoom, 1, .05)
|
||||
|
||||
fps = 1000 / dt
|
||||
|
||||
if inst:getVolume() ~= volume / 100 then
|
||||
if inst and inst:getVolume() ~= volume / 100 then
|
||||
inst:setVolume(volume / 100)
|
||||
voices:setVolume(volume / 100)
|
||||
end
|
||||
|
||||
if inst and not inst:isPlaying() then
|
||||
quit()
|
||||
end
|
||||
|
||||
::continue::
|
||||
end
|
||||
|
||||
@ -287,6 +295,22 @@ local function state(songName, songDifficulty)
|
||||
love.window.setMode(1280, 720, { fullscreen = false , resizable = false})
|
||||
|
||||
function state.load()
|
||||
|
||||
local stageScript = "stages/"..chart.stage..".lua"
|
||||
|
||||
local stageModule
|
||||
|
||||
local opened = io.open(stageScript)
|
||||
if opened then
|
||||
opened:close()
|
||||
stageModule = require("stages."..chart.stage)
|
||||
modules[#modules+1] = stageModule
|
||||
end
|
||||
|
||||
if stageModule and stageModule.onCreate then
|
||||
stageModule.onCreate(chart.song)
|
||||
end
|
||||
|
||||
-- GF first so she is below other chars
|
||||
if chart.gfVersion ~= "none" then
|
||||
characters.gf = myTypes.character(chart.gfVersion)
|
||||
|
@ -13,10 +13,14 @@ Vector2.__index = Vector2
|
||||
local Sprite = {}
|
||||
Sprite.__index = Sprite
|
||||
|
||||
local Image = {}
|
||||
Image.__index = Image
|
||||
|
||||
local cachedQuads = {}
|
||||
|
||||
local Sprites = {}
|
||||
local Rects = {}
|
||||
local Images = {}
|
||||
|
||||
function Vector2:Lerp(newVector2, position)
|
||||
return module.Vector2(myMath.lerp(self.x, newVector2.x, position), myMath.lerp(self.y, newVector2.y, position))
|
||||
@ -63,7 +67,8 @@ function module.Sprite(image, sheet)
|
||||
position = module.Vector2(200, 100), -- changeable
|
||||
looping = false,
|
||||
extraOffset = module.Vector2(0,0),
|
||||
rect = false
|
||||
rect = false,
|
||||
modifier = 1
|
||||
}, Sprite)
|
||||
|
||||
for index, sprite in next, atlas do
|
||||
@ -104,7 +109,8 @@ function module.Sprite(image, sheet)
|
||||
position = module.Vector2(200, 100), -- changeable
|
||||
looping = false,
|
||||
extraOffset = module.Vector2(0,0),
|
||||
rect = false
|
||||
rect = false,
|
||||
modifier = 1
|
||||
}, Sprite)
|
||||
|
||||
Sprites[#Sprites+1] = newSprite
|
||||
@ -149,6 +155,15 @@ function Sprite:Destroy()
|
||||
end
|
||||
end
|
||||
|
||||
function Image:Destroy()
|
||||
for index, image in next, Images do
|
||||
if image == self then
|
||||
Images[index] = nil
|
||||
end
|
||||
end
|
||||
self = nil
|
||||
end
|
||||
|
||||
function module.updateSprites(dt)
|
||||
for index, sprite in next, Sprites do
|
||||
if not sprite.animation or not sprite.quads[sprite.animation] then goto continue end
|
||||
@ -178,6 +193,13 @@ function module.updateSprites(dt)
|
||||
end
|
||||
|
||||
function module.drawSprites()
|
||||
for index, image in next, Images do
|
||||
if not image.ui then
|
||||
local cameraOffset = module.cameraPosition
|
||||
love.graphics.draw(image.image, image.position.x + cameraOffset.x * image.modifier , image.position.y + cameraOffset.y * image.modifier, image.rotation, image.resize.x * (image.flipX and -1 or 1), image.resize.y)
|
||||
end
|
||||
end
|
||||
|
||||
for index, sprite in next, Sprites do
|
||||
if sprite.animation and sprite.quads and sprite.quads[sprite.animation] then
|
||||
local quad = sprite.quads[sprite.animation][sprite.frame] or sprite.quads[sprite.animation][0]
|
||||
@ -187,13 +209,13 @@ function module.drawSprites()
|
||||
quad.offset.y = sprite.quads[sprite.animation][0].offset.y
|
||||
end
|
||||
if sprite.flipX and not quad.flipped then
|
||||
quad.flipped = true
|
||||
quad.offset.x = -quad.offset.x
|
||||
quad.flipped = true
|
||||
quad.offset.x = -quad.offset.x
|
||||
end
|
||||
|
||||
local cameraOffset = sprite.ui and module.Vector2() or module.cameraPosition or module.Vector2()
|
||||
|
||||
love.graphics.draw(sprite.image, quad.quad, (sprite.position.x + (sprite.position.x - quad.offset.x - sprite.extraOffset.x) + cameraOffset.x), (sprite.position.y + (sprite.position.y - quad.offset.y - sprite.extraOffset.y) + cameraOffset.y), 0, quad.resize.x * (sprite.flipX and -1 or 1), quad.resize.y)
|
||||
love.graphics.draw(sprite.image, quad.quad, (sprite.position.x + (sprite.position.x - quad.offset.x - sprite.extraOffset.x) + cameraOffset.x * sprite.modifier), (sprite.position.y + (sprite.position.y - quad.offset.y - sprite.extraOffset.y) + cameraOffset.y * sprite.modifier), 0, quad.resize.x * (sprite.flipX and -1 or 1), quad.resize.y)
|
||||
end
|
||||
end
|
||||
end
|
||||
@ -208,7 +230,15 @@ function module.drawSprites()
|
||||
|
||||
local cameraOffset = rect.ui and module.Vector2() or module.cameraPosition or module.Vector2()
|
||||
|
||||
love.graphics.draw(rect.image, quad.quad, (rect.position.x + (rect.position.x - quad.offset.x - rect.extraOffset.x) + cameraOffset.x), (rect.position.y + (rect.position.y - quad.offset.y - rect.extraOffset.y) + cameraOffset.y), 0, quad.resize.x * (rect.flipX and -1 or 1), quad.resize.y)
|
||||
love.graphics.draw(rect.image, quad.quad, (rect.position.x + (rect.position.x - quad.offset.x - rect.extraOffset.x) + cameraOffset.x * rect.modifier), (rect.position.y + (rect.position.y - quad.offset.y - rect.extraOffset.y) + cameraOffset.y * rect.modifier), 0, quad.resize.x * (rect.flipX and -1 or 1), quad.resize.y)
|
||||
end
|
||||
end
|
||||
|
||||
for index, image in next, Images do
|
||||
if image.ui then
|
||||
local cameraOffset = image.ui and module.Vector2()
|
||||
|
||||
love.graphics.draw(image.image, (image.position.x) + cameraOffset.x, image.position.y + cameraOffset.y, image.rotation, image.resize.x * (image.flipX and -1 or 1), image.resize.y)
|
||||
end
|
||||
end
|
||||
end
|
||||
@ -235,7 +265,8 @@ function module.Rect(image, sheet)
|
||||
position = module.Vector2(200, 100), -- changeable
|
||||
looping = false,
|
||||
extraOffset = module.Vector2(0,0),
|
||||
rect = false
|
||||
rect = false,
|
||||
modifier = 1
|
||||
}, Sprite)
|
||||
|
||||
for index, sprite in next, atlas do
|
||||
@ -276,7 +307,8 @@ function module.Rect(image, sheet)
|
||||
position = module.Vector2(200, 100), -- changeable
|
||||
looping = false,
|
||||
extraOffset = module.Vector2(0,0),
|
||||
rect = false
|
||||
rect = false,
|
||||
modifier = 1
|
||||
}, Sprite)
|
||||
|
||||
Sprites[#Sprites+1] = newSprite
|
||||
@ -299,6 +331,56 @@ module.character = characterclass.character
|
||||
function module.destroyAllSprites()
|
||||
Sprites = {}
|
||||
Rects = {}
|
||||
Images = {}
|
||||
end
|
||||
|
||||
function module.Image(path, scrollFactor)
|
||||
local newImage = setmetatable({
|
||||
image = love.graphics.newImage(path),
|
||||
resize = module.Vector2(1,1),
|
||||
position = module.Vector2(),
|
||||
modifier = scrollFactor or 1,
|
||||
rotation = 0
|
||||
}, Image)
|
||||
|
||||
Images[#Images+1] = newImage
|
||||
|
||||
return newImage
|
||||
end
|
||||
|
||||
function module.preLoad(imagePath, sheetPath)
|
||||
local sheetString = files.read_file(sheetPath)
|
||||
if not sheetString then
|
||||
error("Failed to load", sheetPath)
|
||||
end
|
||||
|
||||
local atlas = json.parse(sheetString).TextureAtlas.SubTexture
|
||||
|
||||
local quads = {}
|
||||
|
||||
local image = love.graphics.newImage(imagePath)
|
||||
|
||||
for index, sprite in next, atlas do
|
||||
local x = sprite._x
|
||||
local y = sprite._y
|
||||
local width = sprite._width
|
||||
local height = sprite._height
|
||||
local frameX = sprite._frameX
|
||||
local frameY = sprite._frameY
|
||||
local frameW = sprite._frameWidth
|
||||
local frameH = sprite._frameHeight
|
||||
|
||||
local name = sprite._name
|
||||
|
||||
local num = tonumber(string.sub(name, name:len() - 3, name:len()))
|
||||
|
||||
if not quads[name:sub(0, name:len() - 4)] then
|
||||
quads[name:sub(0, name:len() - 4)] = {}
|
||||
end
|
||||
quads[name:sub(0, name:len() - 4)][num] = {quad = love.graphics.newQuad(x, y, width, height, image), offset = module.Vector2(frameX or 0, frameY or 0), resize = module.Vector2(1,1)}
|
||||
end
|
||||
|
||||
cachedQuads[sheetPath] = {quads = quads, image = image}
|
||||
end
|
||||
|
||||
return module
|
||||
|
337
sprites/gfCar.json
Normal file
@ -0,0 +1,337 @@
|
||||
{
|
||||
"TextureAtlas": {
|
||||
"SubTexture": [
|
||||
{
|
||||
"_name": "GF Dancing Beat Hair blowing CAR0000",
|
||||
"_x": "0",
|
||||
"_y": "0",
|
||||
"_width": "699",
|
||||
"_height": "634",
|
||||
"_frameX": "-2",
|
||||
"_frameY": "-15",
|
||||
"_frameWidth": "774",
|
||||
"_frameHeight": "649"
|
||||
},
|
||||
{
|
||||
"_name": "GF Dancing Beat Hair blowing CAR0001",
|
||||
"_x": "709",
|
||||
"_y": "0",
|
||||
"_width": "703",
|
||||
"_height": "634",
|
||||
"_frameX": "0",
|
||||
"_frameY": "-15",
|
||||
"_frameWidth": "774",
|
||||
"_frameHeight": "649"
|
||||
},
|
||||
{
|
||||
"_name": "GF Dancing Beat Hair blowing CAR0002",
|
||||
"_x": "1422",
|
||||
"_y": "0",
|
||||
"_width": "728",
|
||||
"_height": "626",
|
||||
"_frameX": "0",
|
||||
"_frameY": "-23",
|
||||
"_frameWidth": "774",
|
||||
"_frameHeight": "649"
|
||||
},
|
||||
{
|
||||
"_name": "GF Dancing Beat Hair blowing CAR0003",
|
||||
"_x": "2160",
|
||||
"_y": "0",
|
||||
"_width": "699",
|
||||
"_height": "625",
|
||||
"_frameX": "-2",
|
||||
"_frameY": "-24",
|
||||
"_frameWidth": "774",
|
||||
"_frameHeight": "649"
|
||||
},
|
||||
{
|
||||
"_name": "GF Dancing Beat Hair blowing CAR0004",
|
||||
"_x": "2869",
|
||||
"_y": "0",
|
||||
"_width": "699",
|
||||
"_height": "638",
|
||||
"_frameX": "-2",
|
||||
"_frameY": "-11",
|
||||
"_frameWidth": "774",
|
||||
"_frameHeight": "649"
|
||||
},
|
||||
{
|
||||
"_name": "GF Dancing Beat Hair blowing CAR0005",
|
||||
"_x": "0",
|
||||
"_y": "648",
|
||||
"_width": "699",
|
||||
"_height": "638",
|
||||
"_frameX": "-2",
|
||||
"_frameY": "-11",
|
||||
"_frameWidth": "774",
|
||||
"_frameHeight": "649"
|
||||
},
|
||||
{
|
||||
"_name": "GF Dancing Beat Hair blowing CAR0006",
|
||||
"_x": "709",
|
||||
"_y": "648",
|
||||
"_width": "727",
|
||||
"_height": "636",
|
||||
"_frameX": "-2",
|
||||
"_frameY": "-13",
|
||||
"_frameWidth": "774",
|
||||
"_frameHeight": "649"
|
||||
},
|
||||
{
|
||||
"_name": "GF Dancing Beat Hair blowing CAR0007",
|
||||
"_x": "1446",
|
||||
"_y": "648",
|
||||
"_width": "702",
|
||||
"_height": "647",
|
||||
"_frameX": "-2",
|
||||
"_frameY": "-2",
|
||||
"_frameWidth": "774",
|
||||
"_frameHeight": "649"
|
||||
},
|
||||
{
|
||||
"_name": "GF Dancing Beat Hair blowing CAR0008",
|
||||
"_x": "2158",
|
||||
"_y": "648",
|
||||
"_width": "749",
|
||||
"_height": "639",
|
||||
"_frameX": "-2",
|
||||
"_frameY": "-10",
|
||||
"_frameWidth": "774",
|
||||
"_frameHeight": "649"
|
||||
},
|
||||
{
|
||||
"_name": "GF Dancing Beat Hair blowing CAR0009",
|
||||
"_x": "2917",
|
||||
"_y": "648",
|
||||
"_width": "699",
|
||||
"_height": "638",
|
||||
"_frameX": "-2",
|
||||
"_frameY": "-11",
|
||||
"_frameWidth": "774",
|
||||
"_frameHeight": "649"
|
||||
},
|
||||
{
|
||||
"_name": "GF Dancing Beat Hair blowing CAR0010",
|
||||
"_x": "0",
|
||||
"_y": "1305",
|
||||
"_width": "712",
|
||||
"_height": "649",
|
||||
"_frameX": "-2",
|
||||
"_frameY": "0",
|
||||
"_frameWidth": "774",
|
||||
"_frameHeight": "649"
|
||||
},
|
||||
{
|
||||
"_name": "GF Dancing Beat Hair blowing CAR0011",
|
||||
"_x": "0",
|
||||
"_y": "1305",
|
||||
"_width": "712",
|
||||
"_height": "649",
|
||||
"_frameX": "-2",
|
||||
"_frameY": "0",
|
||||
"_frameWidth": "774",
|
||||
"_frameHeight": "649"
|
||||
},
|
||||
{
|
||||
"_name": "GF Dancing Beat Hair blowing CAR0012",
|
||||
"_x": "722",
|
||||
"_y": "1305",
|
||||
"_width": "757",
|
||||
"_height": "641",
|
||||
"_frameX": "-2",
|
||||
"_frameY": "-8",
|
||||
"_frameWidth": "774",
|
||||
"_frameHeight": "649"
|
||||
},
|
||||
{
|
||||
"_name": "GF Dancing Beat Hair blowing CAR0013",
|
||||
"_x": "1489",
|
||||
"_y": "1305",
|
||||
"_width": "711",
|
||||
"_height": "648",
|
||||
"_frameX": "-2",
|
||||
"_frameY": "-1",
|
||||
"_frameWidth": "774",
|
||||
"_frameHeight": "649"
|
||||
},
|
||||
{
|
||||
"_name": "GF Dancing Beat Hair blowing CAR0014",
|
||||
"_x": "2210",
|
||||
"_y": "1305",
|
||||
"_width": "755",
|
||||
"_height": "640",
|
||||
"_frameX": "-2",
|
||||
"_frameY": "-9",
|
||||
"_frameWidth": "774",
|
||||
"_frameHeight": "649"
|
||||
},
|
||||
{
|
||||
"_name": "GF Dancing Beat Hair blowing CAR0015",
|
||||
"_x": "2975",
|
||||
"_y": "1305",
|
||||
"_width": "712",
|
||||
"_height": "625",
|
||||
"_frameX": "-2",
|
||||
"_frameY": "-24",
|
||||
"_frameWidth": "774",
|
||||
"_frameHeight": "649"
|
||||
},
|
||||
{
|
||||
"_name": "GF Dancing Beat Hair blowing CAR0016",
|
||||
"_x": "0",
|
||||
"_y": "1964",
|
||||
"_width": "729",
|
||||
"_height": "634",
|
||||
"_frameX": "0",
|
||||
"_frameY": "-15",
|
||||
"_frameWidth": "774",
|
||||
"_frameHeight": "649"
|
||||
},
|
||||
{
|
||||
"_name": "GF Dancing Beat Hair blowing CAR0017",
|
||||
"_x": "739",
|
||||
"_y": "1964",
|
||||
"_width": "722",
|
||||
"_height": "631",
|
||||
"_frameX": "0",
|
||||
"_frameY": "-18",
|
||||
"_frameWidth": "774",
|
||||
"_frameHeight": "649"
|
||||
},
|
||||
{
|
||||
"_name": "GF Dancing Beat Hair blowing CAR0018",
|
||||
"_x": "1471",
|
||||
"_y": "1964",
|
||||
"_width": "766",
|
||||
"_height": "623",
|
||||
"_frameX": "-2",
|
||||
"_frameY": "-26",
|
||||
"_frameWidth": "774",
|
||||
"_frameHeight": "649"
|
||||
},
|
||||
{
|
||||
"_name": "GF Dancing Beat Hair blowing CAR0019",
|
||||
"_x": "2247",
|
||||
"_y": "1964",
|
||||
"_width": "721",
|
||||
"_height": "634",
|
||||
"_frameX": "-2",
|
||||
"_frameY": "-15",
|
||||
"_frameWidth": "774",
|
||||
"_frameHeight": "649"
|
||||
},
|
||||
{
|
||||
"_name": "GF Dancing Beat Hair blowing CAR0020",
|
||||
"_x": "2978",
|
||||
"_y": "1964",
|
||||
"_width": "766",
|
||||
"_height": "626",
|
||||
"_frameX": "-2",
|
||||
"_frameY": "-23",
|
||||
"_frameWidth": "774",
|
||||
"_frameHeight": "649"
|
||||
},
|
||||
{
|
||||
"_name": "GF Dancing Beat Hair blowing CAR0021",
|
||||
"_x": "0",
|
||||
"_y": "2608",
|
||||
"_width": "707",
|
||||
"_height": "630",
|
||||
"_frameX": "-2",
|
||||
"_frameY": "-19",
|
||||
"_frameWidth": "774",
|
||||
"_frameHeight": "649"
|
||||
},
|
||||
{
|
||||
"_name": "GF Dancing Beat Hair blowing CAR0022",
|
||||
"_x": "717",
|
||||
"_y": "2608",
|
||||
"_width": "716",
|
||||
"_height": "646",
|
||||
"_frameX": "-2",
|
||||
"_frameY": "-3",
|
||||
"_frameWidth": "774",
|
||||
"_frameHeight": "649"
|
||||
},
|
||||
{
|
||||
"_name": "GF Dancing Beat Hair blowing CAR0023",
|
||||
"_x": "717",
|
||||
"_y": "2608",
|
||||
"_width": "716",
|
||||
"_height": "646",
|
||||
"_frameX": "-2",
|
||||
"_frameY": "-3",
|
||||
"_frameWidth": "774",
|
||||
"_frameHeight": "649"
|
||||
},
|
||||
{
|
||||
"_name": "GF Dancing Beat Hair blowing CAR0024",
|
||||
"_x": "1443",
|
||||
"_y": "2608",
|
||||
"_width": "759",
|
||||
"_height": "638",
|
||||
"_frameX": "-2",
|
||||
"_frameY": "-11",
|
||||
"_frameWidth": "774",
|
||||
"_frameHeight": "649"
|
||||
},
|
||||
{
|
||||
"_name": "GF Dancing Beat Hair blowing CAR0025",
|
||||
"_x": "2212",
|
||||
"_y": "2608",
|
||||
"_width": "714",
|
||||
"_height": "647",
|
||||
"_frameX": "-2",
|
||||
"_frameY": "-2",
|
||||
"_frameWidth": "774",
|
||||
"_frameHeight": "649"
|
||||
},
|
||||
{
|
||||
"_name": "GF Dancing Beat Hair blowing CAR0026",
|
||||
"_x": "2936",
|
||||
"_y": "2608",
|
||||
"_width": "756",
|
||||
"_height": "639",
|
||||
"_frameX": "-2",
|
||||
"_frameY": "-10",
|
||||
"_frameWidth": "774",
|
||||
"_frameHeight": "649"
|
||||
},
|
||||
{
|
||||
"_name": "GF Dancing Beat Hair blowing CAR0027",
|
||||
"_x": "0",
|
||||
"_y": "3265",
|
||||
"_width": "699",
|
||||
"_height": "638",
|
||||
"_frameX": "-2",
|
||||
"_frameY": "-11",
|
||||
"_frameWidth": "774",
|
||||
"_frameHeight": "649"
|
||||
},
|
||||
{
|
||||
"_name": "GF Dancing Beat Hair blowing CAR0028",
|
||||
"_x": "709",
|
||||
"_y": "3265",
|
||||
"_width": "712",
|
||||
"_height": "646",
|
||||
"_frameX": "-2",
|
||||
"_frameY": "-3",
|
||||
"_frameWidth": "774",
|
||||
"_frameHeight": "649"
|
||||
},
|
||||
{
|
||||
"_name": "GF Dancing Beat Hair blowing CAR0029",
|
||||
"_x": "709",
|
||||
"_y": "3265",
|
||||
"_width": "712",
|
||||
"_height": "646",
|
||||
"_frameX": "-2",
|
||||
"_frameY": "-3",
|
||||
"_frameWidth": "774",
|
||||
"_frameHeight": "649"
|
||||
}
|
||||
],
|
||||
"_imagePath": "gfCar.png"
|
||||
}
|
||||
}
|
BIN
sprites/gfCar.png
Normal file
After Width: | Height: | Size: 1.9 MiB |
51
sprites/limo/bgLimo.json
Normal file
@ -0,0 +1,51 @@
|
||||
{
|
||||
"TextureAtlas": {
|
||||
"SubTexture": [
|
||||
{
|
||||
"_name": "background limo pink0000",
|
||||
"_x": "0",
|
||||
"_y": "0",
|
||||
"_width": "2199",
|
||||
"_height": "379",
|
||||
"_frameX": "-19",
|
||||
"_frameY": "-5",
|
||||
"_frameWidth": "2218",
|
||||
"_frameHeight": "384"
|
||||
},
|
||||
{
|
||||
"_name": "background limo pink0001",
|
||||
"_x": "0",
|
||||
"_y": "389",
|
||||
"_width": "2218",
|
||||
"_height": "380",
|
||||
"_frameX": "0",
|
||||
"_frameY": "-4",
|
||||
"_frameWidth": "2218",
|
||||
"_frameHeight": "384"
|
||||
},
|
||||
{
|
||||
"_name": "background limo pink0002",
|
||||
"_x": "0",
|
||||
"_y": "779",
|
||||
"_width": "2199",
|
||||
"_height": "384",
|
||||
"_frameX": "-19",
|
||||
"_frameY": "0",
|
||||
"_frameWidth": "2218",
|
||||
"_frameHeight": "384"
|
||||
},
|
||||
{
|
||||
"_name": "background limo pink0003",
|
||||
"_x": "0",
|
||||
"_y": "1173",
|
||||
"_width": "2199",
|
||||
"_height": "384",
|
||||
"_frameX": "-19",
|
||||
"_frameY": "0",
|
||||
"_frameWidth": "2218",
|
||||
"_frameHeight": "384"
|
||||
}
|
||||
],
|
||||
"_imagePath": "bgLimo.png"
|
||||
}
|
||||
}
|
BIN
sprites/limo/bgLimo.png
Normal file
After Width: | Height: | Size: 839 KiB |
337
sprites/limo/limoDancer.json
Normal file
@ -0,0 +1,337 @@
|
||||
{
|
||||
"TextureAtlas": {
|
||||
"SubTexture": [
|
||||
{
|
||||
"_name": "bg dancer sketch PINK0000",
|
||||
"_x": "0",
|
||||
"_y": "0",
|
||||
"_width": "394",
|
||||
"_height": "394",
|
||||
"_frameX": "0",
|
||||
"_frameY": "-15",
|
||||
"_frameWidth": "517",
|
||||
"_frameHeight": "410"
|
||||
},
|
||||
{
|
||||
"_name": "bg dancer sketch PINK0001",
|
||||
"_x": "0",
|
||||
"_y": "0",
|
||||
"_width": "394",
|
||||
"_height": "394",
|
||||
"_frameX": "0",
|
||||
"_frameY": "-15",
|
||||
"_frameWidth": "517",
|
||||
"_frameHeight": "410"
|
||||
},
|
||||
{
|
||||
"_name": "bg dancer sketch PINK0002",
|
||||
"_x": "404",
|
||||
"_y": "0",
|
||||
"_width": "394",
|
||||
"_height": "391",
|
||||
"_frameX": "0",
|
||||
"_frameY": "-18",
|
||||
"_frameWidth": "517",
|
||||
"_frameHeight": "410"
|
||||
},
|
||||
{
|
||||
"_name": "bg dancer sketch PINK0003",
|
||||
"_x": "404",
|
||||
"_y": "0",
|
||||
"_width": "394",
|
||||
"_height": "391",
|
||||
"_frameX": "0",
|
||||
"_frameY": "-18",
|
||||
"_frameWidth": "517",
|
||||
"_frameHeight": "410"
|
||||
},
|
||||
{
|
||||
"_name": "bg dancer sketch PINK0004",
|
||||
"_x": "404",
|
||||
"_y": "0",
|
||||
"_width": "394",
|
||||
"_height": "391",
|
||||
"_frameX": "0",
|
||||
"_frameY": "-18",
|
||||
"_frameWidth": "517",
|
||||
"_frameHeight": "410"
|
||||
},
|
||||
{
|
||||
"_name": "bg dancer sketch PINK0005",
|
||||
"_x": "808",
|
||||
"_y": "0",
|
||||
"_width": "395",
|
||||
"_height": "390",
|
||||
"_frameX": "0",
|
||||
"_frameY": "-19",
|
||||
"_frameWidth": "517",
|
||||
"_frameHeight": "410"
|
||||
},
|
||||
{
|
||||
"_name": "bg dancer sketch PINK0006",
|
||||
"_x": "808",
|
||||
"_y": "0",
|
||||
"_width": "395",
|
||||
"_height": "390",
|
||||
"_frameX": "0",
|
||||
"_frameY": "-19",
|
||||
"_frameWidth": "517",
|
||||
"_frameHeight": "410"
|
||||
},
|
||||
{
|
||||
"_name": "bg dancer sketch PINK0007",
|
||||
"_x": "1213",
|
||||
"_y": "0",
|
||||
"_width": "389",
|
||||
"_height": "385",
|
||||
"_frameX": "-6",
|
||||
"_frameY": "-24",
|
||||
"_frameWidth": "517",
|
||||
"_frameHeight": "410"
|
||||
},
|
||||
{
|
||||
"_name": "bg dancer sketch PINK0008",
|
||||
"_x": "1213",
|
||||
"_y": "0",
|
||||
"_width": "389",
|
||||
"_height": "385",
|
||||
"_frameX": "-6",
|
||||
"_frameY": "-24",
|
||||
"_frameWidth": "517",
|
||||
"_frameHeight": "410"
|
||||
},
|
||||
{
|
||||
"_name": "bg dancer sketch PINK0009",
|
||||
"_x": "1612",
|
||||
"_y": "0",
|
||||
"_width": "249",
|
||||
"_height": "358",
|
||||
"_frameX": "-123",
|
||||
"_frameY": "-52",
|
||||
"_frameWidth": "517",
|
||||
"_frameHeight": "410"
|
||||
},
|
||||
{
|
||||
"_name": "bg dancer sketch PINK0010",
|
||||
"_x": "1612",
|
||||
"_y": "0",
|
||||
"_width": "249",
|
||||
"_height": "358",
|
||||
"_frameX": "-123",
|
||||
"_frameY": "-52",
|
||||
"_frameWidth": "517",
|
||||
"_frameHeight": "410"
|
||||
},
|
||||
{
|
||||
"_name": "bg dancer sketch PINK0011",
|
||||
"_x": "0",
|
||||
"_y": "404",
|
||||
"_width": "251",
|
||||
"_height": "362",
|
||||
"_frameX": "-121",
|
||||
"_frameY": "-48",
|
||||
"_frameWidth": "517",
|
||||
"_frameHeight": "410"
|
||||
},
|
||||
{
|
||||
"_name": "bg dancer sketch PINK0012",
|
||||
"_x": "0",
|
||||
"_y": "404",
|
||||
"_width": "251",
|
||||
"_height": "362",
|
||||
"_frameX": "-121",
|
||||
"_frameY": "-48",
|
||||
"_frameWidth": "517",
|
||||
"_frameHeight": "410"
|
||||
},
|
||||
{
|
||||
"_name": "bg dancer sketch PINK0013",
|
||||
"_x": "0",
|
||||
"_y": "404",
|
||||
"_width": "251",
|
||||
"_height": "362",
|
||||
"_frameX": "-121",
|
||||
"_frameY": "-48",
|
||||
"_frameWidth": "517",
|
||||
"_frameHeight": "410"
|
||||
},
|
||||
{
|
||||
"_name": "bg dancer sketch PINK0014",
|
||||
"_x": "0",
|
||||
"_y": "404",
|
||||
"_width": "251",
|
||||
"_height": "362",
|
||||
"_frameX": "-121",
|
||||
"_frameY": "-48",
|
||||
"_frameWidth": "517",
|
||||
"_frameHeight": "410"
|
||||
},
|
||||
{
|
||||
"_name": "bg dancer sketch PINK0015",
|
||||
"_x": "261",
|
||||
"_y": "404",
|
||||
"_width": "404",
|
||||
"_height": "410",
|
||||
"_frameX": "-113",
|
||||
"_frameY": "0",
|
||||
"_frameWidth": "517",
|
||||
"_frameHeight": "410"
|
||||
},
|
||||
{
|
||||
"_name": "bg dancer sketch PINK0016",
|
||||
"_x": "261",
|
||||
"_y": "404",
|
||||
"_width": "404",
|
||||
"_height": "410",
|
||||
"_frameX": "-113",
|
||||
"_frameY": "0",
|
||||
"_frameWidth": "517",
|
||||
"_frameHeight": "410"
|
||||
},
|
||||
{
|
||||
"_name": "bg dancer sketch PINK0017",
|
||||
"_x": "675",
|
||||
"_y": "404",
|
||||
"_width": "394",
|
||||
"_height": "404",
|
||||
"_frameX": "-120",
|
||||
"_frameY": "-5",
|
||||
"_frameWidth": "517",
|
||||
"_frameHeight": "410"
|
||||
},
|
||||
{
|
||||
"_name": "bg dancer sketch PINK0018",
|
||||
"_x": "675",
|
||||
"_y": "404",
|
||||
"_width": "394",
|
||||
"_height": "404",
|
||||
"_frameX": "-120",
|
||||
"_frameY": "-5",
|
||||
"_frameWidth": "517",
|
||||
"_frameHeight": "410"
|
||||
},
|
||||
{
|
||||
"_name": "bg dancer sketch PINK0019",
|
||||
"_x": "675",
|
||||
"_y": "404",
|
||||
"_width": "394",
|
||||
"_height": "404",
|
||||
"_frameX": "-120",
|
||||
"_frameY": "-5",
|
||||
"_frameWidth": "517",
|
||||
"_frameHeight": "410"
|
||||
},
|
||||
{
|
||||
"_name": "bg dancer sketch PINK0020",
|
||||
"_x": "1079",
|
||||
"_y": "404",
|
||||
"_width": "395",
|
||||
"_height": "404",
|
||||
"_frameX": "-119",
|
||||
"_frameY": "-5",
|
||||
"_frameWidth": "517",
|
||||
"_frameHeight": "410"
|
||||
},
|
||||
{
|
||||
"_name": "bg dancer sketch PINK0021",
|
||||
"_x": "1079",
|
||||
"_y": "404",
|
||||
"_width": "395",
|
||||
"_height": "404",
|
||||
"_frameX": "-119",
|
||||
"_frameY": "-5",
|
||||
"_frameWidth": "517",
|
||||
"_frameHeight": "410"
|
||||
},
|
||||
{
|
||||
"_name": "bg dancer sketch PINK0022",
|
||||
"_x": "1484",
|
||||
"_y": "404",
|
||||
"_width": "395",
|
||||
"_height": "402",
|
||||
"_frameX": "-119",
|
||||
"_frameY": "-7",
|
||||
"_frameWidth": "517",
|
||||
"_frameHeight": "410"
|
||||
},
|
||||
{
|
||||
"_name": "bg dancer sketch PINK0023",
|
||||
"_x": "1484",
|
||||
"_y": "404",
|
||||
"_width": "395",
|
||||
"_height": "402",
|
||||
"_frameX": "-119",
|
||||
"_frameY": "-7",
|
||||
"_frameWidth": "517",
|
||||
"_frameHeight": "410"
|
||||
},
|
||||
{
|
||||
"_name": "bg dancer sketch PINK0024",
|
||||
"_x": "0",
|
||||
"_y": "824",
|
||||
"_width": "254",
|
||||
"_height": "361",
|
||||
"_frameX": "-141",
|
||||
"_frameY": "-49",
|
||||
"_frameWidth": "517",
|
||||
"_frameHeight": "410"
|
||||
},
|
||||
{
|
||||
"_name": "bg dancer sketch PINK0025",
|
||||
"_x": "0",
|
||||
"_y": "824",
|
||||
"_width": "254",
|
||||
"_height": "361",
|
||||
"_frameX": "-141",
|
||||
"_frameY": "-49",
|
||||
"_frameWidth": "517",
|
||||
"_frameHeight": "410"
|
||||
},
|
||||
{
|
||||
"_name": "bg dancer sketch PINK0026",
|
||||
"_x": "264",
|
||||
"_y": "824",
|
||||
"_width": "254",
|
||||
"_height": "361",
|
||||
"_frameX": "-139",
|
||||
"_frameY": "-49",
|
||||
"_frameWidth": "517",
|
||||
"_frameHeight": "410"
|
||||
},
|
||||
{
|
||||
"_name": "bg dancer sketch PINK0027",
|
||||
"_x": "264",
|
||||
"_y": "824",
|
||||
"_width": "254",
|
||||
"_height": "361",
|
||||
"_frameX": "-139",
|
||||
"_frameY": "-49",
|
||||
"_frameWidth": "517",
|
||||
"_frameHeight": "410"
|
||||
},
|
||||
{
|
||||
"_name": "bg dancer sketch PINK0028",
|
||||
"_x": "264",
|
||||
"_y": "824",
|
||||
"_width": "254",
|
||||
"_height": "361",
|
||||
"_frameX": "-139",
|
||||
"_frameY": "-49",
|
||||
"_frameWidth": "517",
|
||||
"_frameHeight": "410"
|
||||
},
|
||||
{
|
||||
"_name": "bg dancer sketch PINK0029",
|
||||
"_x": "264",
|
||||
"_y": "824",
|
||||
"_width": "254",
|
||||
"_height": "361",
|
||||
"_frameX": "-139",
|
||||
"_frameY": "-49",
|
||||
"_frameWidth": "517",
|
||||
"_frameHeight": "410"
|
||||
}
|
||||
],
|
||||
"_imagePath": "limoDancer.png"
|
||||
}
|
||||
}
|
BIN
sprites/limo/limoDancer.png
Normal file
After Width: | Height: | Size: 628 KiB |
35
sprites/limo/limoDrive.json
Normal file
@ -0,0 +1,35 @@
|
||||
{
|
||||
"TextureAtlas": {
|
||||
"SubTexture": [
|
||||
{
|
||||
"_name": "Limo stage0000",
|
||||
"_x": "0",
|
||||
"_y": "0",
|
||||
"_width": "2048",
|
||||
"_height": "646"
|
||||
},
|
||||
{
|
||||
"_name": "Limo stage0001",
|
||||
"_x": "0",
|
||||
"_y": "656",
|
||||
"_width": "2048",
|
||||
"_height": "646"
|
||||
},
|
||||
{
|
||||
"_name": "Limo stage0002",
|
||||
"_x": "0",
|
||||
"_y": "1312",
|
||||
"_width": "2048",
|
||||
"_height": "646"
|
||||
},
|
||||
{
|
||||
"_name": "Limo stage0003",
|
||||
"_x": "0",
|
||||
"_y": "0",
|
||||
"_width": "2048",
|
||||
"_height": "646"
|
||||
}
|
||||
],
|
||||
"_imagePath": "limoDrive.png"
|
||||
}
|
||||
}
|
BIN
sprites/limo/limoDrive.png
Normal file
After Width: | Height: | Size: 593 KiB |
51
sprites/limo/limoRoad.json
Normal file
@ -0,0 +1,51 @@
|
||||
{
|
||||
"TextureAtlas": {
|
||||
"SubTexture": [
|
||||
{
|
||||
"_name": "COOLROAD0000",
|
||||
"_x": "0",
|
||||
"_y": "0",
|
||||
"_width": "2347",
|
||||
"_height": "342",
|
||||
"_frameX": "-7",
|
||||
"_frameY": "-425",
|
||||
"_frameWidth": "2396",
|
||||
"_frameHeight": "848"
|
||||
},
|
||||
{
|
||||
"_name": "COOLROAD0001",
|
||||
"_x": "0",
|
||||
"_y": "342",
|
||||
"_width": "2345",
|
||||
"_height": "342",
|
||||
"_frameX": "-9",
|
||||
"_frameY": "-425",
|
||||
"_frameWidth": "2396",
|
||||
"_frameHeight": "848"
|
||||
},
|
||||
{
|
||||
"_name": "COOLROAD0002",
|
||||
"_x": "2347",
|
||||
"_y": "0",
|
||||
"_width": "2354",
|
||||
"_height": "342",
|
||||
"_frameX": "0",
|
||||
"_frameY": "-425",
|
||||
"_frameWidth": "2396",
|
||||
"_frameHeight": "848"
|
||||
},
|
||||
{
|
||||
"_name": "COOLROAD0003",
|
||||
"_x": "2347",
|
||||
"_y": "342",
|
||||
"_width": "2345",
|
||||
"_height": "342",
|
||||
"_frameX": "-9",
|
||||
"_frameY": "-425",
|
||||
"_frameWidth": "2396",
|
||||
"_frameHeight": "848"
|
||||
}
|
||||
],
|
||||
"_imagePath": "limoRoad.png"
|
||||
}
|
||||
}
|
BIN
sprites/limo/limoRoad.png
Normal file
After Width: | Height: | Size: 72 KiB |
15
stages/limo.json
Normal file
@ -0,0 +1,15 @@
|
||||
{
|
||||
"directory": "week4",
|
||||
"defaultZoom": 0.7,
|
||||
"isPixelStage": false,
|
||||
|
||||
"boyfriend": [500, -140],
|
||||
"girlfriend": [470, -50],
|
||||
"opponent": [100, 100],
|
||||
"hide_girlfriend": false,
|
||||
|
||||
"camera_boyfriend": [-200, 0],
|
||||
"camera_opponent": [0, 0],
|
||||
"camera_girlfriend": [0, 0],
|
||||
"camera_speed": 1
|
||||
}
|
44
stages/limo.lua
Normal file
@ -0,0 +1,44 @@
|
||||
local myTypes = require("modules.types")
|
||||
|
||||
local dancers = {}
|
||||
|
||||
return {
|
||||
onCreate = function(song)
|
||||
dancers = {}
|
||||
|
||||
local sunset = myTypes.Image("images/limo/limoSunset.png", .2)
|
||||
sunset.position = myTypes.Vector2(-1000, -100)
|
||||
sunset.resize = myTypes.Vector2(1.5, 1.5)
|
||||
|
||||
local road = myTypes.Sprite("sprites/limo/limoRoad.png", "sprites/limo/limoRoad.json")
|
||||
road:PlayAnimation("COOLROAD", 24, true)
|
||||
road.position = myTypes.Vector2(-300, 230)
|
||||
road.modifier = 0.6
|
||||
|
||||
local limobg = myTypes.Sprite("sprites/limo/bgLimo.png", "sprites/limo/bgLimo.json")
|
||||
limobg:PlayAnimation("background limo pink", 24, true)
|
||||
limobg.position = myTypes.Vector2(-100, 350)
|
||||
limobg.modifier = .6
|
||||
|
||||
local limoDriver = myTypes.Sprite("sprites/limo/limoDrive.png", "sprites/limo/limoDrive.json")
|
||||
limoDriver:PlayAnimation("Limo stage", 24, true)
|
||||
limoDriver.position = myTypes.Vector2(-300, 450)
|
||||
|
||||
for i = 1, 5 do
|
||||
local dancer = myTypes.Sprite("sprites/limo/limoDancer.png", "sprites/limo/limoDancer.json")
|
||||
dancer.modifier = .6
|
||||
dancer:PlayAnimation("bg dancer sketch PINK", 24, false)
|
||||
dancer.position = myTypes.Vector2(-10 + i * 150, 155)
|
||||
|
||||
dancers[i] = dancer
|
||||
end
|
||||
end,
|
||||
|
||||
onBeat = function(beat)
|
||||
if beat % 4 == 0 then
|
||||
for index, dancer in next, dancers do
|
||||
dancer:PlayAnimation("bg dancer sketch PINK", 24, false)
|
||||
end
|
||||
end
|
||||
end
|
||||
}
|
@ -4,7 +4,7 @@
|
||||
"isPixelStage": false,
|
||||
|
||||
"boyfriend": [700, 100],
|
||||
"girlfriend": [50, 100],
|
||||
"girlfriend": [-50, 100],
|
||||
"opponent": [0, 100],
|
||||
"hide_girlfriend": false,
|
||||
|
||||
|
14
stages/stage.lua
Normal file
@ -0,0 +1,14 @@
|
||||
local myTypes = require("modules.types")
|
||||
|
||||
return {
|
||||
onCreate = function(song)
|
||||
local back = myTypes.Image("images/stage/stageback.png")
|
||||
back.position = myTypes.Vector2(-1000, 50)
|
||||
|
||||
local front = myTypes.Image("images/stage/stagefront.png")
|
||||
front.position = myTypes.Vector2(-900, 1000)
|
||||
|
||||
local curtains = myTypes.Image("images/stage/stagecurtains.png")
|
||||
curtains.position = myTypes.Vector2(-1000, 50)
|
||||
end
|
||||
}
|