强化水印&系统优化

This commit is contained in:
MrZ_26
2020-07-09 19:39:06 +08:00
parent a3302ab2bc
commit 3d22f5d8ca
11 changed files with 90 additions and 87 deletions

View File

@@ -128,7 +128,9 @@ local keyDown,keyUp={},{}
local gamepadDown,gamepadUp={},{}
function keyDown.load(k)
if k=="s"then
if k=="a"then
sceneTemp.skip=true
elseif k=="s"then
marking=nil
sceneTemp.skip=true
end

View File

@@ -2,7 +2,7 @@ local langList={
{
anykey="按任意键继续",
newVersion="检测到更新!存档格式可能更新,设置已重置",
marking="游戏作者:MrZ_26\n出现此水印则为非法录屏上传",
marking="游戏作者:MrZ_26\n任何视频不得出现此水印",
lang="中文",
atkModeName={"随机","徽章","击杀","反击"},
royale_remain=function(n)return"剩余 "..n.." 名玩家"end,
@@ -430,7 +430,7 @@ local langList={
{
anykey="按任意键继续",
newVersion="检测到更新!存档格式可能更新,设置已重置",
marking="游戏作者:MrZ_26\n出现此水印则为非法录屏上传",
marking="游戏作者:MrZ_26\n任何视频不得出现此水印",
lang="全中文",
atkModeName={"随机","徽章","击杀","反击"},
royale_remain=function(n)return"剩余 "..n.." 名玩家"end,

View File

@@ -357,6 +357,12 @@ function Pnt.draw()
end
end
function Pnt.play()
if marking then
setFont(36)
local x=game.frame*2%1800-260
gc.setColor(1,1,1,abs(0.26*(1-x/640))-0.0626)
mStr(text.marking,x,260+62*sin(Timer()))
end
for p=1,#players do
players[p]:draw()
end
@@ -465,7 +471,7 @@ function Pnt.pause()
mText(game.result and drawableText[game.result]or drawableText.pause,640,50-10*(5-sceneTemp.timer*.1)^1.5)
--Infos
if frame>180 then
if game.frame>180 then
_=S.list
setFont(26)
for i=1,10 do
@@ -475,7 +481,7 @@ function Pnt.pause()
end
--Radar Chart
if T>.5 and frame>180 then
if T>.5 and game.frame>180 then
T=T*2-1
gc.setLineWidth(2)
gc.push("transform")

View File

@@ -158,7 +158,7 @@ function Tmr.draw()
if sceneTemp.sure>0 then sceneTemp.sure=sceneTemp.sure-1 end
end
function Tmr.play(dt)
frame=frame+1
game.frame=game.frame+1
stat.time=stat.time+dt
local P1=players[1]
for i=#FX_attack,1,-1 do
@@ -199,10 +199,10 @@ function Tmr.play(dt)
end
end
if frame<180 then
if frame==179 then
if game.frame<180 then
if game.frame==179 then
gameStart()
elseif frame==60 or frame==120 then
elseif game.frame==60 or game.frame==120 then
SFX.play("ready")
end
for p=1,#players do
@@ -232,14 +232,11 @@ function Tmr.play(dt)
local P=players[p]
P:update(dt)
end
if frame%120==0 then
if game.frame%120==0 then
if modeEnv.royaleMode then freshMostDangerous()end
if marking and rnd()<.2 then
TEXT.show(text.marking,rnd(162,scr.w-162),rnd(126,scr.h-200),40,"mark",.626)
end--mark 2s each 10s
end
if P1.alive then
if frame%26==0 and setting.warn then
if game.frame%26==0 and setting.warn then
local F=P1.field
local M=#F
local height=0

View File

@@ -218,6 +218,9 @@ function WIDGET.press(x,y)
local W=WIDGET.sel
if not W then return end
if W.type=="button"then
for k,v in next,W do
print(k,v)
end
W.code()
W:FX()
SFX.play("button")

View File

@@ -155,10 +155,10 @@ local Widgets={
back= newButton(1200, 640,120,120,C.white, 35,BACK),
},
play={
pause= newButton(1235,45,80,80,C.white,25,pauseGame),
pause= newButton(1235,45,80,80,C.white,25,function()pauseGame()end),
},
pause={
resume= newButton(640,290,240,100,C.white,30,resumeGame),
resume= newButton(640,290,240,100,C.white,30,function()resumeGame()end),
restart=newButton(640,445,240,100,C.white,33,function()
TASK.clear("play")
mergeStat(stat,players[1].stat)