From dcc119015ef4745d2c477dacfb85a1eed00098f8 Mon Sep 17 00:00:00 2001 From: MrZ626 <1046101471@qq.com> Date: Sun, 20 Sep 2020 18:53:14 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BB=BB=E5=8A=A1=E5=88=97=E8=A1=A8=E6=98=BE?= =?UTF-8?q?=E7=A4=BA=E5=9C=A8hold=E4=B8=8B=E6=96=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- parts/player.lua | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/parts/player.lua b/parts/player.lua index b42ffa6e..e3f363f0 100644 --- a/parts/player.lua +++ b/parts/player.lua @@ -913,6 +913,34 @@ do--function Pdraw_norm(P) curMode.mesDisp(P) end + --Missions + if P.missionProgress then + local missionEnum=missionEnum + local L=ENV.mission + + --Draw current mission + setFont(35) + if ENV.missionKill then + gc.setColor(1,.7+.2*sin(Timer()*3),.4) + else + gc.setColor(1,1,1) + end + gc.print(missionEnum[L[P.missionProgress+1]],85,180) + + --Draw next mission + gc.setColor(1,1,1) + setFont(17) + for i=2,4 do + local t=L[P.missionProgress+i] + if t then + t=missionEnum[t] + gc.print(t,113-26*i,187) + else + break + end + end + end + --Draw starting counter gc.setColor(1,1,1) if game.frame<180 then @@ -2442,6 +2470,7 @@ do--player.drop(P)--Place piece SFX.play("reach") if P.missionProgress==#P.gameEnv.mission then P:win() + P.missionProgress=nil end elseif P.gameEnv.missionKill then P:showText(text.missionFailed,0,140,40,"flicker",.5)