فهرست منبع

优化音效与计时

LTCatt 6 سال پیش
والد
کامیت
f6bf412951

+ 1 - 0
data/lib/functions/sounds/hit2.mcfunction

@@ -0,0 +1 @@
+playsound minecraft:entity.arrow.hit_player block @s ~ ~ ~ 1 0.5

+ 3 - 2
data/mini/functions/colormatch/game/remove_ground.mcfunction

@@ -2,10 +2,11 @@
 execute positioned 1001 11 4000 run clone ~ ~ ~ ~24 ~ ~24 1050 15 4000
 
 # 告知玩家
-# tellraw @a [{"text":">> ","color":"gold","bold": true},{"text":"时间到!","color":"white","bold": false}]
-execute as @a at @s run function lib:sounds/hit
+execute as @a at @s run function lib:sounds/hit2
+
 # 重置分数
 scoreboard players set $countdown_fast mem 30
+scoreboard players operation $countdown_fast mem < $color_match_time mem
 scoreboard players set $color_match_type mem 1
 
 # 预备下一轮

+ 3 - 4
data/mini/functions/colormatch/game/start_new_round.mcfunction

@@ -4,10 +4,9 @@ function mini:colormatch/game/replace_wall
 execute positioned 1001 10 4000 run clone ~ ~ ~ ~24 ~ ~24 1050 15 4000
 
 # 设置倒计时
-execute if score $color_match_time mem matches 70.. run scoreboard players remove $color_match_time mem 10
-execute if score $color_match_time mem matches 40..69 run scoreboard players remove $color_match_time mem 5
-execute if score $color_match_time mem matches 25..39 run scoreboard players remove $color_match_time mem 2
-execute if score $color_match_time mem matches 15..20 run scoreboard players remove $color_match_time mem 1
+execute if score $color_match_time mem matches 40.. run scoreboard players remove $color_match_time mem 5
+execute if score $color_match_time mem matches 30..39 run scoreboard players remove $color_match_time mem 2
+execute if score $color_match_time mem matches 15..29 run scoreboard players remove $color_match_time mem 1
 scoreboard players operation $countdown_fast mem = $color_match_time mem
 
 # 重置分数

+ 1 - 1
data/mini/functions/colormatch/game_init.mcfunction

@@ -10,7 +10,7 @@ fill 1049 11 4025 1075 40 4025 stone
 fill 1074 30 4024 1050 30 4000 barrier
 
 # 设置分数
-scoreboard players set $color_match_time mem 100
+scoreboard players set $color_match_time mem 80
 
 # 设置模式为地板消失
 scoreboard players set $color_match_type mem 0