Skip to content

Commit

Permalink
添加一个场地边框向外冒粒子的效果
Browse files Browse the repository at this point in the history
stack规则开启期间会使用它
  • Loading branch information
MrZ626 committed Oct 14, 2023
1 parent 36c828f commit 9e00af2
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 3 deletions.
1 change: 1 addition & 0 deletions assets/game/classes.lua
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
--- @field rectShade love.ParticleSystem
--- @field spinArrow table
--- @field star love.ParticleSystem
--- @field boardSmoke love.ParticleSystem
--- @field line love.ParticleSystem
--- @field hitSparkle love.ParticleSystem
--- @field cornerCheck love.ParticleSystem
Expand Down
2 changes: 2 additions & 0 deletions assets/game/mechanicLib/mino/stack.lua
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ function stack.switch(P)
md.stack_lockDelay=P.settings.lockDelay
P.settings.dropDelay,P.settings.lockDelay=1e99,1e99

P.particles.boardSmoke:start()
BGM.set('all','highgain',.626,.26)
else
if md.stack_lines>0 then
Expand Down Expand Up @@ -115,6 +116,7 @@ function stack.switch(P)
P.settings.lockDelay=md.stack_lockDelay
md.stack_dropDelay,md.stack_lockDelay=nil,nil

P.particles.boardSmoke:pause()
BGM.set('all','highgain',1,.1)
end
end
Expand Down
3 changes: 2 additions & 1 deletion assets/game/minoPlayer.lua
Original file line number Diff line number Diff line change
Expand Up @@ -220,8 +220,8 @@ function MP:createHoldEffect(ifInit)
end
function MP:createFrenzyEffect(amount)
local p=self.particles.star
p:setParticleLifetime(.626,1.6)
p:setEmissionArea('uniform',200,400,0,true)
p:setParticleLifetime(.626,1.6)
p:setPosition(200,-400)
p:emit(amount)
end
Expand Down Expand Up @@ -1760,6 +1760,7 @@ function MP:render()
GC.stc_stop()

gc_setColor(1,1,1)
gc_draw(self.particles.boardSmoke)
gc_draw(self.particles.star)
gc_draw(self.particles.line)

Expand Down
19 changes: 17 additions & 2 deletions assets/game/particleSystemTemplate.lua
Original file line number Diff line number Diff line change
Expand Up @@ -58,13 +58,28 @@ do -- Clearing
{'line',0,3.5,6.5,3.5},
{'line',3.5,0,3.5,6.5},
{'fRect',2,2,3,3},
},2600)
p:setSizes(.26,1,.8,.6,.4,.2,0)
},2260)
p:setSpread(MATH.tau)
p:setSizes(.26,1,.8,.6,.4,.2,0)
p:setSpeed(0,20)
ps.star=p
end

do -- Fever State
local p=love.graphics.newParticleSystem(GC.load{1,1,
{'clear',1,1,1},
},2600)
p:setSpread(.26)
p:setPosition(200,-400)
p:setEmissionArea('borderrectangle',200,400,0,true)
p:setParticleLifetime(.42,1)
p:setSizes(8,5,3,2,0)
p:setSpeed(26,126)
p:setEmissionRate(620)
p:pause()
ps.boardSmoke=p
end

do -- Rotate
local p=love.graphics.newParticleSystem(GC.load{10,3,
{'clear',1,1,1,1},
Expand Down

0 comments on commit 9e00af2

Please sign in to comment.