Kaynağa Gözat

Merge branch 'master' of github.com:LTCatt/LTW3

HerobrineXia 6 yıl önce
ebeveyn
işleme
b072d3c834

+ 5 - 0
data/ltw/functions/init.mcfunction

@@ -35,3 +35,8 @@ function mini:main/init
 
 # 状态
 function ltw:state/0/state_enter
+<<<<<<< HEAD
+=======
+
+# TODO 让玩家离开时触发 ltw:main/player_leave
+>>>>>>> a4700e93d99ee964f1df5fbe0fae9d37e1f01760

+ 8 - 1
data/ltw/functions/main/player_enter.mcfunction

@@ -1 +1,8 @@
-say Hello!
+# 当玩家加入游戏时触发
+
+# 如果未开始游戏,拖回等待大厅
+execute if score $state mem matches 0 run function ltw:state/0/player_enter
+
+# 如果已开始游戏
+#   如果玩家是旁观者
+#     如果

+ 1 - 1
data/ltw/functions/main/tick4.mcfunction

@@ -1,4 +1,4 @@
 # 离开次数为不存在,则为第一次加入游戏
-# 离开次数不为0,则离开过游戏
+# 离开次数不为 0,则离开过游戏
 execute as @a unless score @s leave_game matches 0 run function ltw:main/player_enter
 execute as @a unless score @s leave_game matches 0 run scoreboard players set @s leave_game 0

+ 2 - 2
data/ltw/functions/state/7/state_enter.mcfunction

@@ -13,5 +13,5 @@ setblock 0 10 2000 minecraft:structure_block{mode:"LOAD",name:"ltw:select"}
 setblock 0 11 2000 minecraft:redstone_block
 
 # 判断进入下一轮小游戏或结束
-# execute if score $game_type mem matches 1 if score $round mem matches ..3 run function ltw:state/7/continue_gameparty
-# execute if score $game_type mem matches 1 if score $round mem matches 4.. run function ltw:main/game_end
+execute if score $game_type mem matches 1 if score $round mem matches ..3 run function ltw:state/7/continue_gameparty
+execute if score $game_type mem matches 1 if score $round mem matches 4.. run function ltw:main/game_end