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