kinda works
This commit is contained in:
parent
4b68a6ff67
commit
9528c9987e
6 changed files with 19 additions and 16 deletions
|
@ -27,7 +27,7 @@ local pos1 = {x,y}
|
||||||
|
|
||||||
local editor = "main"
|
local editor = "main"
|
||||||
|
|
||||||
local editorSongs = {"song1","song2","song5", "song6", "song7"}
|
local editorSongs = {"song1","song2","song5", "song6", "song7", "song8"}
|
||||||
local selSong = "song2"
|
local selSong = "song2"
|
||||||
local songIndexSel = 10
|
local songIndexSel = 10
|
||||||
|
|
||||||
|
|
|
@ -180,7 +180,7 @@ function editLoad()
|
||||||
createMenu(m)
|
createMenu(m)
|
||||||
end
|
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"
|
songlist[0] = "musicbox"
|
||||||
|
|
||||||
function menuButtonPress(name, index)
|
function menuButtonPress(name, index)
|
||||||
|
|
|
@ -55,8 +55,8 @@ function loadSpins(_spins)
|
||||||
s.middle:setZIndex(1)
|
s.middle:setZIndex(1)
|
||||||
s.middle:add()
|
s.middle:add()
|
||||||
|
|
||||||
local sb = {speed=s.speed,arms={},mid=s.middle,time=0}
|
--local sb = {speed=s.speed,arms={},mid=s.middle,time=0}
|
||||||
--[[local sb = {speed=s.speed,layers={},time=0}
|
local sb = {speed=s.speed,layers={},time=0,mid=s.middle}
|
||||||
|
|
||||||
for len = 1, s.armlen, 1 do
|
for len = 1, s.armlen, 1 do
|
||||||
local arc = playdate.geometry.arc.new(s.x,s.y, 20 * len, -720, 720)
|
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)
|
local sawPos = arc:pointOnArc(360 / s.arms * arm)
|
||||||
|
|
||||||
saw:moveTo(sawPos.x,sawPos.y)
|
saw:moveTo(sawPos.x,sawPos.y)
|
||||||
|
saw:setCollideRect(0,0,16,16)
|
||||||
|
saw:setZIndex(1)
|
||||||
saw:add()
|
saw:add()
|
||||||
|
|
||||||
sb.layers[#sb.layers].saws[#sb.layers[#sb.layers].saws+1] = saw
|
sb.layers[#sb.layers].saws[#sb.layers[#sb.layers].saws+1] = saw
|
||||||
end
|
end
|
||||||
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] = {}
|
sb.arms[i] = {}
|
||||||
for p = 1, s.armlen, 1 do
|
for p = 1, s.armlen, 1 do
|
||||||
local degrees = (360 / s.arms) * i
|
local degrees = (360 / s.arms) * i
|
||||||
|
@ -90,7 +92,7 @@ function loadSpins(_spins)
|
||||||
sb.arms[i][p]:add()
|
sb.arms[i][p]:add()
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
spinblades[#spinblades+1] = sb
|
spinblades[#spinblades+1] = sb]]
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -142,8 +144,8 @@ function updateSaws()
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
--{speed=s.speed,arms=s.arms,armlen=s.armlen,saws = {},arcs = {},time=0}
|
--{speed=s.speed,layers={},time=0}
|
||||||
--[[for spinner = 1, #spinblades, 1 do
|
for spinner = 1, #spinblades, 1 do
|
||||||
local s = spinblades[spinner]
|
local s = spinblades[spinner]
|
||||||
|
|
||||||
s.time += s.speed
|
s.time += s.speed
|
||||||
|
@ -154,13 +156,13 @@ function updateSaws()
|
||||||
|
|
||||||
for arm = 1, #s.layers[len].saws, 1 do
|
for arm = 1, #s.layers[len].saws, 1 do
|
||||||
local sawPos = arc:pointOnArc(arc:length() / 4 / #s.layers[len].saws * arm + (s.time * len))
|
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)
|
s.layers[len].saws[arm]:moveTo(sawPos.x,sawPos.y)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end]]
|
end
|
||||||
for spinner = 1, #spinblades, 1 do
|
--[[for spinner = 1, #spinblades, 1 do
|
||||||
for arm = 1, #spinblades[spinner].arms do
|
for arm = 1, #spinblades[spinner].arms do
|
||||||
for blade = 1, #spinblades[spinner].arms[arm] 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)
|
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
|
end]]
|
||||||
end
|
end
|
||||||
|
|
||||||
function killBlades()
|
function killBlades()
|
||||||
|
@ -189,11 +191,12 @@ function killBlades()
|
||||||
end
|
end
|
||||||
blades = {}
|
blades = {}
|
||||||
|
|
||||||
|
--{speed=s.speed,layers={},time=0}
|
||||||
for i = 1, #spinblades, 1 do
|
for i = 1, #spinblades, 1 do
|
||||||
spinblades[i].mid:remove()
|
spinblades[i].mid:remove()
|
||||||
for arm = 1, #spinblades[i].arms do
|
for layer = 1, #spinblades[i].layers do
|
||||||
for blade = 1, #spinblades[i].arms[arm] do
|
for blade = 1, #spinblades[i].layers[layer].saws do
|
||||||
spinblades[i].arms[arm][blade]:remove()
|
spinblades[i].layers[layer].saws[blade]:remove()
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Binary file not shown.
Binary file not shown.
BIN
Source/sfx/song8.wav
Normal file
BIN
Source/sfx/song8.wav
Normal file
Binary file not shown.
Loading…
Reference in a new issue