1
0
Fork 0
mirror of https://github.com/notwa/mm synced 2024-11-05 03:29:02 -08:00

gotta go fast

This commit is contained in:
Connor Olding 2015-05-13 11:16:02 -07:00
parent c234d67c06
commit 92f5583a2d

View file

@ -26,6 +26,18 @@ function levitate:hold()
addrs.link_actor.y_vel(10) addrs.link_actor.y_vel(10)
end end
local supersonic = Passive()
function supersonic:tick()
if self.state then
if bit.band(addrs.buttons(), 0x8000) > 0 then
self:hold()
end
end
end
function supersonic:hold()
addrs.link_actor.lin_vel(20)
end
local everything = Callbacks() local everything = Callbacks()
function everything:on() function everything:on()
dofile("oneshot.lua") dofile("oneshot.lua")
@ -40,6 +52,7 @@ local main_menu = Menu{
Screen{ Screen{
Text("hey"), Text("hey"),
Toggle("L to Levitate", levitate), Toggle("L to Levitate", levitate),
Toggle("A to Run Fast", supersonic),
Hold("Levitate", levitate), Hold("Levitate", levitate),
Oneshot("100%", everything), Oneshot("100%", everything),
Back(), Back(),