aaa undid math added 2 songs
This commit is contained in:
parent
4475ddfb54
commit
b21e47bcf5
6 changed files with 17 additions and 15 deletions
|
@ -27,7 +27,7 @@ local pos1 = {x,y}
|
||||||
|
|
||||||
local editor = "main"
|
local editor = "main"
|
||||||
|
|
||||||
local editorSongs = {"song1","song2","song5", "song6"}
|
local editorSongs = {"song1","song2","song5", "song6", "song7"}
|
||||||
local selSong = "song2"
|
local selSong = "song2"
|
||||||
local songIndexSel = 10
|
local songIndexSel = 10
|
||||||
|
|
||||||
|
|
|
@ -34,7 +34,7 @@ function addMap(_file, rs)
|
||||||
tilemap:setTileAtPosition(level.tiles[i].x,level.tiles[i].y,level.tiles[i].t)
|
tilemap:setTileAtPosition(level.tiles[i].x,level.tiles[i].y,level.tiles[i].t)
|
||||||
end
|
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()
|
song:stop()
|
||||||
if level.song then
|
if level.song then
|
||||||
|
|
|
@ -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"}
|
songlist = {"BACK","POV: YOU ARE A ROCKET","A LONELY, LOST SHIP", "LEVEL COMPLETE", "GAME COMPLETE", "CHIPVIBE2", "ORANGER CHIP","WACKMAN"}
|
||||||
songlist[0] = "musicbox"
|
songlist[0] = "musicbox"
|
||||||
|
|
||||||
function menuButtonPress(name, index)
|
function menuButtonPress(name, index)
|
||||||
|
|
|
@ -55,10 +55,11 @@ function loadSpins(_spins)
|
||||||
s.middle:setZIndex(1)
|
s.middle:setZIndex(1)
|
||||||
s.middle:add()
|
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
|
--[[for len = 1, s.armlen, 1 do
|
||||||
local arc = playdate.geometry.arc.new(s.x,s.y, 20 * len, 0, 540)
|
local arc = playdate.geometry.arc.new(s.x,s.y, 20 * len, -720, 720)
|
||||||
|
|
||||||
for arm = 1, s.arms, 1 do
|
for arm = 1, s.arms, 1 do
|
||||||
local saw = gfx.sprite.new(loopSaws:image())
|
local saw = gfx.sprite.new(loopSaws:image())
|
||||||
|
@ -71,9 +72,9 @@ function loadSpins(_spins)
|
||||||
end
|
end
|
||||||
|
|
||||||
sb.arcs[#sb.arcs+1] = arc
|
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] = {}
|
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
|
||||||
|
@ -85,7 +86,7 @@ function loadSpins(_spins)
|
||||||
sb.arms[i][p]:setZIndex(1)
|
sb.arms[i][p]:setZIndex(1)
|
||||||
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
|
||||||
|
@ -139,7 +140,7 @@ function updateSaws()
|
||||||
end
|
end
|
||||||
|
|
||||||
--{speed=s.speed,arms=s.arms,armlen=s.armlen,saws = {},arcs = {},time=0}
|
--{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]
|
local s = spinblades[spinner]
|
||||||
|
|
||||||
s.time += s.speed
|
s.time += s.speed
|
||||||
|
@ -149,13 +150,14 @@ function updateSaws()
|
||||||
local arc = s.arcs[len]
|
local arc = s.arcs[len]
|
||||||
|
|
||||||
for arm = 1, s.arms, 1 do
|
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
|
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
|
||||||
|
|
||||||
|
@ -169,7 +171,7 @@ function updateSaws()
|
||||||
spinblades[spinner].arms[arm][blade]:moveTo(spinblades[spinner].mid.x + position.x, spinblades[spinner].mid.y + position.y)
|
spinblades[spinner].arms[arm][blade]:moveTo(spinblades[spinner].mid.x + position.x, spinblades[spinner].mid.y + position.y)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end]]
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
function killBlades()
|
function killBlades()
|
||||||
|
|
Binary file not shown.
BIN
Source/sfx/song7.wav
Normal file
BIN
Source/sfx/song7.wav
Normal file
Binary file not shown.
Loading…
Reference in a new issue