kinda works

This commit is contained in:
PossiblyAxolotl 2022-07-10 14:43:15 -06:00
parent 4b68a6ff67
commit 9528c9987e
6 changed files with 19 additions and 16 deletions

View file

@ -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

View file

@ -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)

View file

@ -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

Binary file not shown.

Binary file not shown.

BIN
Source/sfx/song8.wav Normal file

Binary file not shown.