aboutsummaryrefslogtreecommitdiff
path: root/client/game.gd
diff options
context:
space:
mode:
authornokoe <nokoe@mailbox.org>2024-06-26 01:06:37 +0200
committernokoe <nokoe@mailbox.org>2024-06-26 01:07:20 +0200
commitc126d3d3e84fe3b24b42afc7f68f05342988c8c9 (patch)
tree96f50b02f83852fcf3dd53e5f48ff24526d2666f /client/game.gd
parent6b40114823cac61a92756af55e06a645a3847426 (diff)
downloadhurrycurry-c126d3d3e84fe3b24b42afc7f68f05342988c8c9.tar
hurrycurry-c126d3d3e84fe3b24b42afc7f68f05342988c8c9.tar.bz2
hurrycurry-c126d3d3e84fe3b24b42afc7f68f05342988c8c9.tar.zst
add chat bubble, replace textmesh with label3d
Diffstat (limited to 'client/game.gd')
-rw-r--r--client/game.gd16
1 files changed, 16 insertions, 0 deletions
diff --git a/client/game.gd b/client/game.gd
index 7e954857..16522706 100644
--- a/client/game.gd
+++ b/client/game.gd
@@ -138,6 +138,22 @@ func _ready():
var t: Tile = tile_by_pos[str(tile)][1]
t.finish(warn)
)
+
+ mp.text_message.connect(func(player: int, text: String):
+ var p: Player = players[player]
+ p.bubble.set_text(text)
+ )
+
+ mp.clear_message.connect(func(player: int):
+ var p: Player = players[player]
+ p.bubble.remove_text()
+ )
+
+ mp.item_message.connect(func(player: int, item: int):
+ var p: Player = players[player]
+ p.bubble.set_text(item_names[item])
+ )
+
mp.send_join(Global.username, Global.character)
func _process(delta):