Long notes (not done), animation indices

This commit is contained in:
entar 2025-06-04 18:38:37 +07:00
parent 53cf12b7a1
commit c729c1c0ed
27 changed files with 164 additions and 6633 deletions

Binary file not shown.

View File

@ -1,97 +0,0 @@
-- RANK ONLY UP TILL 20, 0 MINIMUM, CHANGE THIS TO SUGGEST HOW HARD THE SONG IS, BY MARKEDAMAN
function onCreate()
if difficulty == 0 then -- easy
rank = 2
elseif difficulty == 1 then -- normal
rank = 3
elseif difficulty == 2 then -- hard
rank = 4
elseif difficulty == 3 then -- erect
rank = 8
elseif difficulty == 4 then -- nightmare
rank = 9
end
end
function onCreatePost()
if not hideHud then
if rank > 10 then
makeLuaSprite('star', 'star2', 1070, 590)
makeAnimatedLuaSprite('starFlame', 'starFlame', 1030, 440)
addAnimationByPrefix('starFlame', 'starFlame', 'fire loop full instance', 24, true)
setProperty('starFlame.alpha', 0)
scaleObject('starFlame', 1.5, 1.5)
setObjectCamera('starFlame', 'hud')
addLuaSprite('starFlame', true)
elseif rank <= 10 then
makeLuaSprite('star', 'star1', 1070, 590)
end
scaleObject('star', 0.9, 0.9)
setObjectCamera('star', 'hud')
setObjectOrder('star', getObjectOrder('starFlame') + 1)
setProperty('star.alpha', 0)
addLuaSprite('star')
makeLuaText('difficulty', ''.. rank ..'', 2230 , 0, 620)
setTextSize('difficulty', 37)
setTextFont('difficulty', 'combo.ttf')
setProperty('difficulty.alpha', 0)
addLuaText('difficulty', false)
setObjectOrder('difficulty', getObjectOrder('star') + 1)
if downscroll then
setProperty('difficulty.y', 70)
setProperty('star.y', 40)
setProperty('starFlame.y', -5)
setProperty('starFlame.angle', 190)
end
if rank > 10 then
setTextColor('difficulty', 'ffffff')
setTextBorder('difficulty', 2, '00AEFF')
elseif rank <= 10 then
setTextColor('difficulty', '000000')
setTextBorder('difficulty', 3, 'FFFFFF')
end
runTimer('ready', 0.5) -- star fade in
runTimer('wait', 8) -- star fade out
runTimer('wait2', 7.5) -- difficulty fade out
if rank > 10 then
runTimer('pausefire', 2) -- difficulty fade in
elseif rank <=10 then
runTimer('pause', 2)
end
end
end
function onTimerCompleted(tag)
if not hideHud then
if tag == 'ready' then
doTweenAlpha('hi', 'star', 1, 0.5,'linear')
end
if tag == 'wait' then
doTweenAlpha('gone', 'star', 0, 0.5,'linear')
doTweenAlpha('fireout', 'starFlame', 0, 0.5,'linear')
end
if tag == 'wait2' then
doTweenAlpha('bye', 'difficulty', 0, 0.5,'linear')
end
if tag == 'pause' then
doTweenAlpha('hi2', 'difficulty', 1, 0.5,'linear')
end
if tag == 'pausefire' then
setProperty('difficulty.alpha', 1)
setProperty('starFlame.alpha', 1)
playSound('light', 0.7)
end
end
end

View File

@ -1,4 +0,0 @@
function onCreate()
setTextFont('scoreTxt', 'vcr.ttf')
setTextFont('timeTxt','timer.ttf')
end

View File

@ -1,121 +0,0 @@
{
"song": {
"events": [
[
48960,
[
[
"Camera Follow Pos",
"800",
"1300"
]
]
],
[
49440,
[
[
"Camera Follow Pos",
"",
""
]
]
],
[
49920,
[
[
"bgchange",
"cloud",
"c"
],
[
"Camera Flash",
"1",
""
],
[
"Set Cam Zoom",
"0.55",
""
]
]
],
[
57600,
[
[
"Set Cam Zoom",
"0.7",
""
]
]
],
[
64560,
[
[
"Camera Follow Pos",
"800",
"-700"
]
]
],
[
65160,
[
[
"Camera Follow Pos",
"",
""
]
]
],
[
65280,
[
[
"Set Cam Zoom",
"0.7",
"0.5"
],
[
"bgremove",
"c",
""
],
[
"Camera Flash",
"0.5",
""
],
[
"Kill Henchmen",
"",
""
]
]
],
[
80640,
[
[
"Kill Henchmen",
"",
""
]
]
],
[
88320,
[
[
"Kill Henchmen",
"",
""
]
]
]
]
}
}

File diff suppressed because one or more lines are too long

View File

@ -1,19 +0,0 @@
local stop_countdown = true
function onCreatePost()
if stop_countdown == true then
stop_countdown = false
playSound("traffic", 0.5)
return Function_Stop
end
return Function_Continue
end
-- crash prevention
function onUpdate() end
function onUpdatePost() end

Binary file not shown.

View File

@ -1,97 +0,0 @@
-- RANK ONLY UP TILL 20, 0 MINIMUM, CHANGE THIS TO SUGGEST HOW HARD THE SONG IS, BY MARKEDAMAN
function onCreate()
if difficulty == 0 then -- easy
rank = 3
elseif difficulty == 1 then -- normal
rank = 4
elseif difficulty == 2 then -- hard
rank = 5
elseif difficulty == 3 then -- erect
rank = 0
elseif difficulty == 4 then -- nightmare
rank = 0
end
end
function onCreatePost()
if not hideHud then
if rank > 10 then
makeLuaSprite('star', 'star2', 1070, 590)
makeAnimatedLuaSprite('starFlame', 'starFlame', 1030, 440)
addAnimationByPrefix('starFlame', 'starFlame', 'fire loop full instance', 24, true)
setProperty('starFlame.alpha', 0)
scaleObject('starFlame', 1.5, 1.5)
setObjectCamera('starFlame', 'hud')
addLuaSprite('starFlame', true)
elseif rank <= 10 then
makeLuaSprite('star', 'star1', 1070, 590)
end
scaleObject('star', 0.9, 0.9)
setObjectCamera('star', 'hud')
setObjectOrder('star', getObjectOrder('starFlame') + 1)
setProperty('star.alpha', 0)
addLuaSprite('star')
makeLuaText('difficulty', ''.. rank ..'', 2230 , 0, 620)
setTextSize('difficulty', 37)
setTextFont('difficulty', 'combo.ttf')
setProperty('difficulty.alpha', 0)
addLuaText('difficulty', false)
setObjectOrder('difficulty', getObjectOrder('star') + 1)
if downscroll then
setProperty('difficulty.y', 70)
setProperty('star.y', 40)
setProperty('starFlame.y', -5)
setProperty('starFlame.angle', 190)
end
if rank > 10 then
setTextColor('difficulty', 'ffffff')
setTextBorder('difficulty', 2, '00AEFF')
elseif rank <= 10 then
setTextColor('difficulty', '000000')
setTextBorder('difficulty', 3, 'FFFFFF')
end
runTimer('ready', 0.5) -- star fade in
runTimer('wait', 8) -- star fade out
runTimer('wait2', 7.5) -- difficulty fade out
if rank > 10 then
runTimer('pausefire', 2) -- difficulty fade in
elseif rank <=10 then
runTimer('pause', 2)
end
end
end
function onTimerCompleted(tag)
if not hideHud then
if tag == 'ready' then
doTweenAlpha('hi', 'star', 1, 0.5,'linear')
end
if tag == 'wait' then
doTweenAlpha('gone', 'star', 0, 0.5,'linear')
doTweenAlpha('fireout', 'starFlame', 0, 0.5,'linear')
end
if tag == 'wait2' then
doTweenAlpha('bye', 'difficulty', 0, 0.5,'linear')
end
if tag == 'pause' then
doTweenAlpha('hi2', 'difficulty', 1, 0.5,'linear')
end
if tag == 'pausefire' then
setProperty('difficulty.alpha', 1)
setProperty('starFlame.alpha', 1)
playSound('light', 0.7)
end
end
end

View File

@ -1,4 +0,0 @@
function onCreate()
setTextFont('scoreTxt', 'vcr.ttf')
setTextFont('timeTxt','timer.ttf')
end

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

View File

@ -1,19 +0,0 @@
local stop_countdown = true
function onCreatePost()
if stop_countdown == true then
stop_countdown = false
playSound("traffic", 0.5)
return Function_Stop
end
return Function_Continue
end
-- crash prevention
function onUpdate() end
function onUpdatePost() end

View File

@ -1,29 +0,0 @@
{
"high": [
"erect"
],
"tutorial": [
"hard"
],
"bopeebo": ["hard"],
"fresh": ["hard"],
"dad-battle": [
"easy",
"normal",
"hard",
"erect",
"nightmare"
],
"south": ["hard"],
"stress": [
"easy",
"normal",
"hard"
],
"milf": [
"hard"
],
"eggnog": [
"hard"
]
}

50
charts/songs.lua Normal file
View File

@ -0,0 +1,50 @@
return {
{
name = "tutorial",
difficulties = {
"hard"
},
},
{
name = "bopeebo",
difficulties = {
"hard"
},
},
{
name = "fresh",
difficulties = {
"hard"
},
},
{
name = "dad-battle",
difficulties = {
"easy",
"normal",
"hard",
"erect"
},
},
{
name = "south",
difficulties = {
"hard"
},
},
{
name = "high",
difficulties = {
"erect",
"nightmare"
},
},
{
name = "milf",
difficulties = {
"easy",
"normal",
"hard"
},
},
}

0
linux.sh Normal file → Executable file
View File

View File

@ -6,17 +6,13 @@ local files = require("modules.files")
local json = require("modules.json")
local logging = require("modules.logging")
local songs = json.parse(files.read_file("charts/songs.json"))
local songs = require("charts.songs")
local curSong = "dad-battle"
local curDiffList = {
"easy",
"normal",
"hard",
"erect"
}
local curSong = songs[1]
local curIndex = 1
local curDiffList = songs[1].difficulties
local curDiff = "erect"
local curDiff = songs[1].difficulties[1]
local curDiffInd = 1
local curState = nil
@ -55,7 +51,7 @@ function love.draw()
curState.draw()
else
myTypes.drawSprites()
love.graphics.print(string.format("Song: %s, Difficulty: %s, List: %s", curSong, curDiff, logging.dump(curDiffList)), font, love.graphics:getWidth()/2 - 20, love.graphics:getHeight()/2 + 150, 0, 1, 1, 200)
love.graphics.print(string.format("Song: %s, Difficulty: %s, List: %s", curSong.name, curDiff, logging.dump(curDiffList)), font, love.graphics:getWidth()/2 - 20, love.graphics:getHeight()/2 + 150, 0, 1, 1, 200)
love.graphics.print(
string.format("Left: %s, Down: %s, Up: %s, Right: %s \nDownscroll: %s",
keybinds[1],
@ -74,7 +70,7 @@ function love.keypressed(key, un, is)
else
if not gettingKey then
if key == "return" then
curState = state(curSong, curDiff)
curState = state(curSong.name, curDiff)
curState.quit = function()
curState = nil
stateLoaded = false
@ -82,12 +78,12 @@ function love.keypressed(key, un, is)
end
curState.load()
elseif key == "down" then
curSong = next(songs, curSong)
curIndex, curSong = next(songs, curIndex)
if not curSong then
curSong = next(songs)
curDiffList = songs[curSong]
curIndex, curSong = next(songs)
curDiffList = curSong.difficulties
else
curDiffList = songs[curSong]
curDiffList = curSong.difficulties
end
curDiff = curDiffList[1]
elseif key == "right" then

View File

@ -211,9 +211,7 @@ 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
character:PlayAnimation("danceLeft")
else
character:PlayAnimation("idle")
end
@ -222,6 +220,8 @@ local function state(songName, songDifficulty)
if beat % 4 == 0 then
zoom = zoom + .1
end
else
characters.gf:PlayAnimation("danceRight")
end
for index, module in next, modules do
@ -233,19 +233,21 @@ local function state(songName, songDifficulty)
local section = chart.notes[math.floor(step / 16) + 1]
if not section.gfSection then
if section.mustHitSection then
local currentSingVector = singVectors[characters.bf.animation] or myTypes.Vector2()
myTypes.cameraTarget = myTypes.Vector2(-stage.camera_boyfriend[1], -stage.camera_boyfriend[2]):Add(characters.bf.stageCamera:Negate()):Add(myTypes.Vector2(0, -200)):Add(currentSingVector)
else
if characters.dad then
local currentSingVector = singVectors[characters.dad.animation] or myTypes.Vector2()
myTypes.cameraTarget = myTypes.Vector2(stage.camera_opponent[1], stage.camera_opponent[2]):Add(characters.dad.stageCamera:Negate()):Add(myTypes.Vector2(0, -200)):Add(currentSingVector)
if section then
if not section.gfSection then
if section.mustHitSection then
local currentSingVector = singVectors[characters.bf.animation] or myTypes.Vector2()
myTypes.cameraTarget = myTypes.Vector2(-stage.camera_boyfriend[1], -stage.camera_boyfriend[2]):Add(characters.bf.stageCamera:Negate()):Add(myTypes.Vector2(0, -200)):Add(currentSingVector)
else
if characters.dad then
local currentSingVector = singVectors[characters.dad.animation] or myTypes.Vector2()
myTypes.cameraTarget = myTypes.Vector2(stage.camera_opponent[1], stage.camera_opponent[2]):Add(characters.dad.stageCamera:Negate()):Add(myTypes.Vector2(0, -200)):Add(currentSingVector)
end
end
else
local currentSingVector = singVectors[characters.gf.animation] or myTypes.Vector2()
myTypes.cameraTarget = myTypes.Vector2(stage.camera_girlfriend[1], stage.camera_ocamera_girlfriendponent[2]):Add(characters.gf.stageCamera:Negate()):Add(myTypes.Vector2(0, -200)):Add(currentSingVector)
end
else
local currentSingVector = singVectors[characters.gf.animation] or myTypes.Vector2()
myTypes.cameraTarget = myTypes.Vector2(stage.camera_girlfriend[1], stage.camera_ocamera_girlfriendponent[2]):Add(characters.gf.stageCamera:Negate()):Add(myTypes.Vector2(0, -200)):Add(currentSingVector)
end
myTypes.updateSprites(dt)
@ -258,6 +260,16 @@ local function state(songName, songDifficulty)
end
end
-- Spawn holds before normal notes so they are below them
for index, holdNote in next, unspawnedHoldNotes do
if (holdNote.position - elapsed) * speed < 600 then
holdNote:spawn()
unspawnedHoldNotes[index] = nil
holdNotes[#holdNotes+1] = holdNote
end
end
for index, note in next, unspawnedNotes do
if (note.position - elapsed) * speed < 600 then
note:spawn()
@ -266,13 +278,6 @@ local function state(songName, songDifficulty)
end
end
for index, holdNote in next, unspawnedHoldNotes do
if (holdNote.position - elapsed) * speed < 600 then
holdNote:spawn()
unspawnedHoldNotes[index] = nil
holdNotes[#notes+1] = holdNote
end
end
for index, note in next, notes do
if note.mustPress then
@ -310,13 +315,13 @@ local function state(songName, songDifficulty)
for index, hold in next, holdNotes do
if hold.mustPress then
hold.sprite.position = myTypes.Vector2(600 + (79 * (hold.direction - 1)), settings.Downscroll and 430 - (hold.position-elapsed) or hold.position - elapsed)
if hold.position - elapsed < 50 then
hold.sprite.position = myTypes.Vector2(625 + (79 * (hold.direction - 1)), settings.Downscroll and 430 - (hold.position-elapsed) * speed or (hold.position - elapsed) * speed)
if hold.position - elapsed + hold.sprite.extraOffset.y < 10 then
if love.keyboard.isDown(keyBinds[hold.direction]) then
if section.altAnim or hold.altAnim then
characters.dad:PlayAnimation("sing"..directions[hold.direction].."-alt")
characters.bf:PlayAnimation("sing"..directions[hold.direction].."-alt")
else
characters.dad:PlayAnimation("sing"..directions[hold.direction])
characters.bf:PlayAnimation("sing"..directions[hold.direction])
end
hold:destroy()
holdNotes[index] = nil
@ -329,6 +334,17 @@ local function state(songName, songDifficulty)
ratings.miss = ratings.miss + 1
end
end
else
hold.sprite.position = myTypes.Vector2(75 + (79 * (hold.direction - 1)), settings.Downscroll and 430 - (hold.position-elapsed) * speed or (hold.position - elapsed) * speed)
if hold.position - elapsed + hold.sprite.extraOffset.y < 10 then
if section.altAnim or hold.altAnim then
characters.dad:PlayAnimation("sing"..directions[hold.direction].."-alt")
else
characters.dad:PlayAnimation("sing"..directions[hold.direction])
end
hold:destroy()
holdNotes[index] = nil
end
end
end
@ -457,17 +473,21 @@ local function state(songName, songDifficulty)
local newNote = myTypes.note(note, section.mustHitSection)
unspawnedNotes[#unspawnedNotes+1] = newNote
-- if note[3] > 0 then
-- local length = note[3] / conductor.stepCrochet
if note[3] > 0 then
local length = note[3] / conductor.stepCrochet
-- for i = 0, length - 1, .1 do
-- local newHold = myTypes.note({note[1] + i * conductor.stepCrochet, note[2], note[3], note[4]}, section.mustHitSection, true)
-- unspawnedHoldNotes[#unspawnedHoldNotes+1] = newHold
-- end
-- local newHold = myTypes.note({note[1] + length * conductor.stepCrochet, note[2], note[3], note[4]}, section.mustHitSection, true, true)
-- unspawnedHoldNotes[#unspawnedHoldNotes+1] = newHold
-- end
-- not yet
for i = 0, length - 1, .1 do
local newHold = myTypes.note({note[1] + i * conductor.stepCrochet, note[2], note[3], note[4]}, section.mustHitSection, true)
unspawnedHoldNotes[#unspawnedHoldNotes+1] = newHold
end
local newHold = myTypes.note({note[1] + math.floor(length) * conductor.stepCrochet, note[2], note[3], note[4]}, section.mustHitSection, true, true)
unspawnedHoldNotes[#unspawnedHoldNotes+1] = newHold
newHold.holdEnd = true
if settings.Downscroll then
newHold.flipY = true
newHold.speed = speed
end
end
end
end

View File

@ -110,7 +110,8 @@ function module.Sprite(image, sheet)
looping = false,
extraOffset = module.Vector2(0,0),
rect = false,
modifier = 1
modifier = 1,
allowedFrame = 0
}, Sprite)
Sprites[#Sprites+1] = newSprite
@ -171,7 +172,12 @@ function module.updateSprites(dt)
sprite.elapsed = sprite.elapsed + dt
if sprite.elapsed > 1 / sprite.fps then
sprite.frame = sprite.quads[sprite.animation][sprite.frame + 1] and sprite.frame + 1 or sprite.looping and 1 or sprite.frame
if sprite.allowedFrames then
sprite.frame = sprite.quads[sprite.animation][sprite.allowedFrames[sprite.allowedFrame + 1]] and sprite.allowedFrames[sprite.allowedFrame + 1] or sprite.looping and sprite.allowedFrames[1] or sprite.allowedFrames[sprite.allowedFrame]
sprite.allowedFrame = sprite.allowedFrames[sprite.allowedFrame + 1] and sprite.allowedFrame + 1 or sprite.looping and 1 or #sprite.allowedFrames
else
sprite.frame = sprite.quads[sprite.animation][sprite.frame + 1] and sprite.frame + 1 or sprite.looping and 1 or sprite.frame
end
if not sprite.quads[sprite.animation][sprite.frame + 1] and not sprite.looping then
sprite.ended = true
@ -196,7 +202,7 @@ 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)
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 * (image.flipY and -1 or 1))
end
end
@ -215,7 +221,7 @@ function module.drawSprites()
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.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)
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* (sprite.flipY and -1 or 1))
end
end
end
@ -230,7 +236,7 @@ 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.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)
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* (rect.flipY and -1 or 1))
end
end

View File

@ -3,6 +3,7 @@ local module = {}
-- local myTypes = require("modules.types")
local files = require("modules.files")
local json = require("modules.json")
local logging = require("modules.logging")
local CharacterClass = {}
CharacterClass.__index = CharacterClass
@ -10,11 +11,17 @@ CharacterClass.__index = CharacterClass
function CharacterClass:PlayAnimation(name)
local animName = self.animations[name]
local reOffset = self.flipX and -1 or 1
if self.animInfo[name].random then
self.sprite.extraOffset = module.myTypes.Vector2(self.animInfo[name].offsets[1] - self.stagePosition.x, self.animInfo[name].offsets[2] - self.stagePosition.y)
self.sprite:PlayAnimation(animName..string.format("%s ", math.random(self.animInfo[name].random[1], self.animInfo[name].random[2])), self.animInfo[name].fps)
else
self.sprite.extraOffset = module.myTypes.Vector2(self.animInfo[name].offsets[1] - self.stagePosition.x, self.animInfo[name].offsets[2] - self.stagePosition.y)
self.sprite.allowedFrames = self.animInfo[name].indices and #self.animInfo[name].indices > 0 and self.animInfo[name].indices
self.sprite.allowedFrame = 1
self.sprite:PlayAnimation(animName, self.animInfo[name].fps)
end
self.singing = name ~= "idle" and name ~= "danceLeft" and name ~= "danceRight"
@ -47,7 +54,7 @@ function module.character(name)
stageCamera = module.myTypes.Vector2(parsed.camera_position[1], parsed.camera_position[2]),
flipX = parsed.flip_x,
beats = parsed.beats or 4,
animation = "idle"
animation = "idle",
}, CharacterClass)
for index, alias in next, parsed.animations do

View File

@ -32,9 +32,23 @@ function NoteClass:spawn()
self.sprite = sprite
local spriteFrame = self.hold and (self.holdEnd and sprites[self.direction].." hold end" or sprites[self.direction].." hold piece") or sprites[self.direction]
local spriteName
if self.hold then
if self.holdEnd then
spriteName = string.format("%s hold end", sprites[self.direction])
if self.flipY then
sprite.extraOffset = module.types.Vector2(0, -150 * self.speed * 2.5)
end
else
spriteName = string.format("%s hold piece", sprites[self.direction])
end
else
spriteName = sprites[self.direction]
end
sprite:Frame(spriteFrame, 0)
if self.flipY then sprite.flipY = true end
sprite:Frame(spriteName, 0)
sprite.ui = true -- so it doesnt move with the camera

View File

@ -39,8 +39,20 @@ return {
end,
onBeat = function(beat)
if beat % 4 == 0 then
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