local myTypes = require("modules.types") local dancers = {} local curSong local shootingStar local shootingStarCountdown = love.math.random(20, 40) return { onCreate = function(song) curSong = song dancers = {} local sunset = myTypes.Image("images/limo/erect/limoSunset.png") sunset.position = myTypes.Vector2(-100, 0) sunset.resize = myTypes.Vector2(1, 1) sunset.modifier = 0.1 shootingStar = myTypes.Sprite("sprites/limo/erect/shooting star.png", "sprites/limo/erect/shooting star.json") shootingStar:PlayAnimation("shooting star idle", 24, true) shootingStar.position = myTypes.Vector2(200, 0) shootingStar.modifier = 0.12 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 --nevermind --[[local backFog = myTypes.Image("images/limo/erect/mistBack.png") backFog.position = myTypes.Vector2(-100, 0) backFog.modifier = 0.6]] local limobg = myTypes.Sprite("sprites/limo/erect/bgLimo.png", "sprites/limo/erect/bgLimo.json") limobg:PlayAnimation("background limo blue", 24, true) limobg.position = myTypes.Vector2(-100, 350) limobg.modifier = 0.6 local limoDriver = myTypes.Sprite("sprites/limo/erect/limoDrive.png", "sprites/limo/erect/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 % 2 == 0 then for index, dancer in next, dancers do dancer.allowedFrames = { 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15 } dancer.allowedFrame = 1 dancer:PlayAnimation("bg dancer sketch PINK", 24, false) end else for index, dancer in next, dancers do dancer.allowedFrames = { 16,17,18,19,20,21,22,23,24,25,26,27,28,29 } dancer.allowedFrame = 1 dancer:PlayAnimation("bg dancer sketch PINK", 24, false) end end shootingStarCountdown = shootingStarCountdown - 1 if shootingStarCountdown <=0 then shootingStar:PlayAnimation("shooting star", 24, false) shootingStarCountdown = love.math.random(20, 40) end end }