diff --git a/Source/Editor.lua b/Source/Editor.lua index e229eb0..ca0a964 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"} +local editorSongs = {"song1","song2","song5", "song6", "song7"} local selSong = "song2" local songIndexSel = 10 diff --git a/Source/Map.lua b/Source/Map.lua index 2d34d3d..dc8828c 100644 --- a/Source/Map.lua +++ b/Source/Map.lua @@ -34,7 +34,7 @@ function addMap(_file, rs) tilemap:setTileAtPosition(level.tiles[i].x,level.tiles[i].y,level.tiles[i].t) end - --tiles = gfx.sprite.addWallSprites(tilemap, {0,1,7,8,9,10,11,12,13,14,15,16}) + tiles = gfx.sprite.addWallSprites(tilemap, {0,1,7,8,9,10,11,12,13,14,15,16}) song:stop() if level.song then diff --git a/Source/Menu.lua b/Source/Menu.lua index ee0f69f..fbfbf2c 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"} +songlist = {"BACK","POV: YOU ARE A ROCKET","A LONELY, LOST SHIP", "LEVEL COMPLETE", "GAME COMPLETE", "CHIPVIBE2", "ORANGER CHIP","WACKMAN"} songlist[0] = "musicbox" function menuButtonPress(name, index) diff --git a/Source/Saws.lua b/Source/Saws.lua index 1331158..c0c9e8c 100644 --- a/Source/Saws.lua +++ b/Source/Saws.lua @@ -55,10 +55,11 @@ function loadSpins(_spins) s.middle:setZIndex(1) s.middle:add() - local sb = {speed=s.speed,arms=s.arms,armlen=s.armlen,saws = {},arcs = {},time=0} + local sb = {speed=s.speed,arms={},mid=s.middle,time=0} + --local sb = {speed=s.speed,arms=s.arms,armlen=s.armlen,saws = {},arcs = {},time=0} - for len = 1, s.armlen, 1 do - local arc = playdate.geometry.arc.new(s.x,s.y, 20 * len, 0, 540) + --[[for len = 1, s.armlen, 1 do + local arc = playdate.geometry.arc.new(s.x,s.y, 20 * len, -720, 720) for arm = 1, s.arms, 1 do local saw = gfx.sprite.new(loopSaws:image()) @@ -71,9 +72,9 @@ function loadSpins(_spins) end sb.arcs[#sb.arcs+1] = arc - end + end]] - --[[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 @@ -85,7 +86,7 @@ function loadSpins(_spins) sb.arms[i][p]:setZIndex(1) sb.arms[i][p]:add() end - end]] + end spinblades[#spinblades+1] = sb end end @@ -139,7 +140,7 @@ function updateSaws() end --{speed=s.speed,arms=s.arms,armlen=s.armlen,saws = {},arcs = {},time=0} - for spinner = 1, #spinblades, 1 do + --[[for spinner = 1, #spinblades, 1 do local s = spinblades[spinner] s.time += s.speed @@ -149,13 +150,14 @@ function updateSaws() local arc = s.arcs[len] for arm = 1, s.arms, 1 do - local sawPos = arc:pointOnArc((arc:length()-360) / s.arms * arm + (s.time * len)) + local sawPos = arc:pointOnArc(arc:length() / 4 / s.arms * arm + (s.time * len)) + if s.time > 125 * s.arms or s.time < -125 * s.arms then s.time = 0 end - s.saws[len + ((arm-1)*s.arms)]:moveTo(sawPos.x,sawPos.y) + s.saws[arm+((len)*(arm-1))]: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 @@ -169,7 +171,7 @@ function updateSaws() spinblades[spinner].arms[arm][blade]:moveTo(spinblades[spinner].mid.x + position.x, spinblades[spinner].mid.y + position.y) end end - end]] + end end function killBlades() diff --git a/Source/sfx/song6.wav b/Source/sfx/song6.wav index ca17599..a0682da 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 new file mode 100644 index 0000000..d582097 Binary files /dev/null and b/Source/sfx/song7.wav differ