Compare commits
2 Commits
bef95df6a1
...
level_pars
Author | SHA1 | Date | |
---|---|---|---|
b91ebeb775
|
|||
ab687f8f6d
|
@ -1179,8 +1179,6 @@ end
|
||||
-->8
|
||||
-- example level
|
||||
|
||||
|
||||
|
||||
function spawn_blocking_rnd_x(typ)
|
||||
freeze += 1
|
||||
s = typ.new{
|
||||
@ -1199,7 +1197,7 @@ function spawn_blocking_rnd_x(typ)
|
||||
end
|
||||
|
||||
function spawn_frownie()
|
||||
return spawn_rnd_x(frownie)
|
||||
return spawn_rnd(frownie)
|
||||
end
|
||||
|
||||
function spawn_blocking_frownie()
|
||||
@ -1207,19 +1205,19 @@ function spawn_blocking_frownie()
|
||||
end
|
||||
|
||||
function spawn_blocky()
|
||||
spawn_rnd_x(blocky)
|
||||
spawn_rnd(blocky)
|
||||
end
|
||||
|
||||
function spawn_blocking_blocky()
|
||||
spawn_blocking_rnd_x(blocky)
|
||||
spawn_rnd(blocky, 1)
|
||||
end
|
||||
|
||||
function spawn_spewy()
|
||||
return spawn_spewy_at(rnd(104), -7)
|
||||
return spawn_rnd(spewy)
|
||||
end
|
||||
|
||||
function spawn_chasey()
|
||||
return spawn_chasey_at(rnd(104), -7)
|
||||
return spawn_rnd(chasey)
|
||||
end
|
||||
|
||||
function spawn_blocking_spewy()
|
||||
@ -1264,15 +1262,7 @@ helpers = {
|
||||
}
|
||||
|
||||
function spawn_blocking_boss_chasey()
|
||||
freeze += 1
|
||||
local c = spawn_xl_chasey_at(44, -15)
|
||||
c.ice = 1
|
||||
c.die = function(self)
|
||||
freeze -= self.ice
|
||||
self.ice = 0
|
||||
chasey.die(self)
|
||||
end
|
||||
|
||||
local c = spawn_rnd(xl_chasey, 1)
|
||||
local nextspawn = lframe + 0x0.0080
|
||||
events:push_back{move=function()
|
||||
if lframe >= nextspawn then
|
||||
@ -1295,6 +1285,7 @@ end
|
||||
|
||||
-- blocking: 1 or 0
|
||||
function spawn_rnd(typ, blocking, goodie,altspr)
|
||||
blocking = blocking or 0
|
||||
freeze += blocking
|
||||
s = typ.new{
|
||||
x = rnd(104),
|
||||
@ -1323,13 +1314,13 @@ end
|
||||
function multi(times, interval, fnm, ...)
|
||||
local f,irm,vargs = _ENV[fnm],interval,pack(...)
|
||||
assert(type(f) == "function", fnm.." not a function")
|
||||
fnm(...)
|
||||
f(...)
|
||||
events:push_back{move=function()
|
||||
irm-=1
|
||||
if irm <= 0 then
|
||||
irm=interval
|
||||
times-=1
|
||||
fnm(unpack(vargs))
|
||||
f(unpack(vargs))
|
||||
return times <= 1
|
||||
end
|
||||
end}
|
||||
|
Reference in New Issue
Block a user