diff --git a/Source/Editor.lua b/Source/Editor.lua index 1e96f8c..e317ae3 100644 --- a/Source/Editor.lua +++ b/Source/Editor.lua @@ -27,7 +27,7 @@ local pos1 = {x,y} local editor = "main" -local editorSongs = {"song1","song2","song5", "song6", "song7"} +local editorSongs = {"song1","song2","song5", "song6", "song7", "song8"} local selSong = "song2" local songIndexSel = 10 diff --git a/Source/Menu.lua b/Source/Menu.lua index fbfbf2c..9b64420 100644 --- a/Source/Menu.lua +++ b/Source/Menu.lua @@ -180,7 +180,7 @@ function editLoad() createMenu(m) end -songlist = {"BACK","POV: YOU ARE A ROCKET","A LONELY, LOST SHIP", "LEVEL COMPLETE", "GAME COMPLETE", "CHIPVIBE2", "ORANGER CHIP","WACKMAN"} +songlist = {"BACK","POV: YOU ARE A ROCKET","A LONELY, LOST SHIP", "LEVEL COMPLETE", "GAME COMPLETE", "CHIPVIBE2", "ORANGER CHIP","WACKMAN","HAUNTED HOUS"} songlist[0] = "musicbox" function menuButtonPress(name, index) diff --git a/Source/Saws.lua b/Source/Saws.lua index abcf205..5ae26cb 100644 --- a/Source/Saws.lua +++ b/Source/Saws.lua @@ -55,8 +55,8 @@ function loadSpins(_spins) s.middle:setZIndex(1) s.middle:add() - local sb = {speed=s.speed,arms={},mid=s.middle,time=0} - --[[local sb = {speed=s.speed,layers={},time=0} + --local sb = {speed=s.speed,arms={},mid=s.middle,time=0} + local sb = {speed=s.speed,layers={},time=0,mid=s.middle} for len = 1, s.armlen, 1 do local arc = playdate.geometry.arc.new(s.x,s.y, 20 * len, -720, 720) @@ -68,16 +68,18 @@ function loadSpins(_spins) local sawPos = arc:pointOnArc(360 / s.arms * arm) saw:moveTo(sawPos.x,sawPos.y) + saw:setCollideRect(0,0,16,16) + saw:setZIndex(1) saw:add() sb.layers[#sb.layers].saws[#sb.layers[#sb.layers].saws+1] = saw end end - spinblades[#spinblades+1] = sb]] + spinblades[#spinblades+1] = sb - for i = 1, s.arms, 1 do + --[[for i = 1, s.arms, 1 do sb.arms[i] = {} for p = 1, s.armlen, 1 do local degrees = (360 / s.arms) * i @@ -90,7 +92,7 @@ function loadSpins(_spins) sb.arms[i][p]:add() end end - spinblades[#spinblades+1] = sb + spinblades[#spinblades+1] = sb]] end end @@ -142,8 +144,8 @@ function updateSaws() end end - --{speed=s.speed,arms=s.arms,armlen=s.armlen,saws = {},arcs = {},time=0} - --[[for spinner = 1, #spinblades, 1 do + --{speed=s.speed,layers={},time=0} + for spinner = 1, #spinblades, 1 do local s = spinblades[spinner] s.time += s.speed @@ -154,13 +156,13 @@ function updateSaws() for arm = 1, #s.layers[len].saws, 1 do local sawPos = arc:pointOnArc(arc:length() / 4 / #s.layers[len].saws * arm + (s.time * len)) - if s.time > 125 * #s.layers[len].saws or s.time < -125 * #s.layers[len].saws then s.time = 0 end + if s.time > arc:length() / 4 or s.time < -arc:length() / 4 then s.time = 0 end s.layers[len].saws[arm]:moveTo(sawPos.x,sawPos.y) end end - end]] - for spinner = 1, #spinblades, 1 do + end + --[[for spinner = 1, #spinblades, 1 do for arm = 1, #spinblades[spinner].arms do for blade = 1, #spinblades[spinner].arms[arm] do @@ -173,7 +175,7 @@ function updateSaws() spinblades[spinner].arms[arm][blade]:moveTo(spinblades[spinner].mid.x + math.sin(math.rad(degrees)) * 20 * blade, spinblades[spinner].mid.y + math.cos(math.rad(degrees)) * 20 * blade) end end - end + end]] end function killBlades() @@ -189,11 +191,12 @@ function killBlades() end blades = {} + --{speed=s.speed,layers={},time=0} for i = 1, #spinblades, 1 do spinblades[i].mid:remove() - for arm = 1, #spinblades[i].arms do - for blade = 1, #spinblades[i].arms[arm] do - spinblades[i].arms[arm][blade]:remove() + for layer = 1, #spinblades[i].layers do + for blade = 1, #spinblades[i].layers[layer].saws do + spinblades[i].layers[layer].saws[blade]:remove() end end end diff --git a/Source/sfx/song6.wav b/Source/sfx/song6.wav index a0682da..e5057af 100644 Binary files a/Source/sfx/song6.wav and b/Source/sfx/song6.wav differ diff --git a/Source/sfx/song7.wav b/Source/sfx/song7.wav index d582097..6546ca2 100644 Binary files a/Source/sfx/song7.wav and b/Source/sfx/song7.wav differ diff --git a/Source/sfx/song8.wav b/Source/sfx/song8.wav new file mode 100644 index 0000000..97a0bbd Binary files /dev/null and b/Source/sfx/song8.wav differ