LTCatt 5 лет назад
Родитель
Сommit
f9fc3b7454

+ 1 - 1
data/old/lib/functions/tempo_block/block_exchange.mcfunction → data/lib/functions/tempo_block/block_exchange.mcfunction

@@ -2,6 +2,6 @@
 scoreboard players add $tempo_block mem 1
 execute if score $tempo_block mem matches 2.. run scoreboard players set $tempo_block mem 0
 
-# 调用对应颜色方块 0:blue 1:red
+# 切换对应颜色方块 0:蓝色 1:红色
 execute if score $tempo_block mem matches 0 run function lib:tempo_block/tempo_blue
 execute if score $tempo_block mem matches 1 run function lib:tempo_block/tempo_red

+ 5 - 0
data/lib/functions/tempo_block/tempo_blue.mcfunction

@@ -0,0 +1,5 @@
+# 调用其他模块
+execute if score $state mem matches 0 run function ltw:state/0/sp/tempo_block/tempo_blue
+
+# TODO: 未完成的重构
+# execute if score $state mem matches 5 if score $mini_type mem matches 1 run function mini:parkour/game/tempo_blue

+ 5 - 0
data/lib/functions/tempo_block/tempo_red.mcfunction

@@ -0,0 +1,5 @@
+# 调用其他模块
+execute if score $state mem matches 0 run function ltw:state/0/sp/tempo_block/tempo_red
+
+# TODO: 未完成的重构
+execute if score $state mem matches 5 if score $mini_type mem matches 1 run function mini:parkour/game/tempo_red

+ 5 - 0
data/lib/functions/tempo_block/tempo_sound.mcfunction

@@ -0,0 +1,5 @@
+# 调用其他模块(播放声音)
+execute if score $state mem matches 0 run function ltw:state/0/sp/tempo_block/tempo_sound
+
+# TODO: 未完成的重构
+execute if score $state mem matches 5 if score $mini_type mem matches 1 run function mini:parkour/game/tempo_sound

+ 9 - 0
data/lib/functions/tempo_block/tick5.mcfunction

@@ -0,0 +1,9 @@
+
+# 倒计时(后续为 0~5,即 1.5s 一轮)
+execute if score $countdown_tempo mem matches 0 run scoreboard players set $countdown_tempo mem 6
+execute if score $countdown_tempo mem matches 1.. run scoreboard players remove $countdown_tempo mem 1
+
+# 触发与音效
+execute if score $countdown_tempo mem matches 0 run function lib:tempo_block/block_exchange
+execute if score $countdown_tempo mem matches 2 run function lib:tempo_block/tempo_sound
+execute if score $countdown_tempo mem matches 4 run function lib:tempo_block/tempo_sound

+ 0 - 3
data/ltw/functions/clock/tick2.mcfunction

@@ -21,9 +21,6 @@ function item:tick2
 # # 特殊方块给予效果
 # function lib:effect/floating
 
-# # 调用节奏方块模块
-# execute if score $tempo_enable mem matches 1 run function lib:tempo_block/tick2
-
 # # 调用粒子模块
 # function item:particle/show_particle
 

+ 0 - 0
data/old/ltw/functions/state/0/parkour/tempo_block/marker_spawn.mcfunction → data/ltw/functions/state/0/sp/tempo_block/marker_spawn.mcfunction


+ 0 - 0
data/old/ltw/functions/state/0/parkour/tempo_block/tempo_blue.mcfunction → data/ltw/functions/state/0/sp/tempo_block/tempo_blue.mcfunction


+ 0 - 0
data/old/ltw/functions/state/0/parkour/tempo_block/tempo_red.mcfunction → data/ltw/functions/state/0/sp/tempo_block/tempo_red.mcfunction


+ 0 - 0
data/old/ltw/functions/state/0/parkour/tempo_block/tempo_sound.mcfunction → data/ltw/functions/state/0/sp/tempo_block/tempo_sound.mcfunction


+ 2 - 3
data/ltw/functions/state/0/state_enter.mcfunction

@@ -39,15 +39,14 @@ execute as @a[team=!debug] run function ltw:state/0/player_enter
 # 重置开始倒计时
 scoreboard players set $start_countdown mem 9999999
 
+# 初始化节奏方块
+function ltw:state/0/sp/tempo_block/marker_spawn
 
 
 
 
 # TODO: 未完成的重构
 
-# 启用节奏跑酷
-#scoreboard players set $tempo_enable mem 1
-#function ltw:state/0/parkour/tempo_block/marker_spawn
 # bossbar
 #scoreboard players set $bossbar_type mem 0
 #function lib:bossbar/show

+ 3 - 0
data/ltw/functions/state/0/tick5.mcfunction

@@ -3,6 +3,9 @@
 execute as @e[type=piglin,tag=shop_piglin_11,tag=lobby_entity] at @s if entity @a[distance=..5] run data modify entity @s CustomNameVisible set value true
 execute as @e[type=piglin,tag=shop_piglin_11,tag=lobby_entity] at @s unless entity @a[distance=..5] run data modify entity @s CustomNameVisible set value false
 
+# 调用节奏方块
+function lib:tempo_block/tick5
+
 # TODO: 未完成的重构
 
 ## 20s:提示未准备

+ 0 - 3
data/old/lib/functions/tempo_block/debug_sound.mcfunction

@@ -1,3 +0,0 @@
-# 跑酷Tempo音效
-function mini:parkour/game/tempo_sound
-function ltw:state/0/parkour/tempo_block/tempo_sound

+ 0 - 6
data/old/lib/functions/tempo_block/tempo_blue.mcfunction

@@ -1,6 +0,0 @@
-# 调用其他模块
-execute if score $state mem matches 0 run function ltw:state/0/parkour/tempo_block/tempo_blue
-execute if score $state mem matches 5 if score $mini_type mem matches 1 run function mini:parkour/game/tempo_blue
-
-# Debug调用
-execute if score $tempo_debug mem matches 1 run function lib:tempo_block/tempo_blue_debug

+ 0 - 2
data/old/lib/functions/tempo_block/tempo_blue_debug.mcfunction

@@ -1,2 +0,0 @@
-function ltw:state/0/parkour/tempo_block/tempo_blue
-function mini:parkour/game/tempo_blue

+ 0 - 6
data/old/lib/functions/tempo_block/tempo_red.mcfunction

@@ -1,6 +0,0 @@
-# 调用其他模块
-execute if score $state mem matches 0 run function ltw:state/0/parkour/tempo_block/tempo_red
-execute if score $state mem matches 5 if score $mini_type mem matches 1 run function mini:parkour/game/tempo_red
-
-# Debug调用
-execute if score $tempo_debug mem matches 1 run function lib:tempo_block/tempo_red_debug

+ 0 - 2
data/old/lib/functions/tempo_block/tempo_red_debug.mcfunction

@@ -1,2 +0,0 @@
-function ltw:state/0/parkour/tempo_block/tempo_red
-function mini:parkour/game/tempo_red

+ 0 - 6
data/old/lib/functions/tempo_block/tempo_sound.mcfunction

@@ -1,6 +0,0 @@
-# 调用其他模块(播放声音)
-execute if score $state mem matches 0 run function ltw:state/0/parkour/tempo_block/tempo_sound
-execute if score $state mem matches 5 if score $mini_type mem matches 1 run function mini:parkour/game/tempo_sound
-
-# Debug调用
-execute if score $tempo_debug mem matches 1 run function lib:tempo_block/debug_sound

+ 0 - 7
data/old/lib/functions/tempo_block/tick2.mcfunction

@@ -1,7 +0,0 @@
-# 节奏方块触发
-execute if score $countdown_fast mem matches 0 run function lib:tempo_block/block_exchange
-execute unless score $countdown_fast mem matches 1.. run scoreboard players set $countdown_fast mem 15
-
-# 播放音效
-execute if score $countdown_fast mem matches 5 run function lib:tempo_block/tempo_sound
-execute if score $countdown_fast mem matches 10 run function lib:tempo_block/tempo_sound