From ddbcd54013ac76016c39f76394654c4d1451c662 Mon Sep 17 00:00:00 2001 From: David Date: Sun, 17 Jul 2022 15:58:16 +0200 Subject: display buff text --- godot/scenes/Die.gd | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'godot/scenes/Die.gd') diff --git a/godot/scenes/Die.gd b/godot/scenes/Die.gd index 121f27d..b6b9b9e 100644 --- a/godot/scenes/Die.gd +++ b/godot/scenes/Die.gd @@ -240,9 +240,20 @@ func ball_revert(): $BallShape.set_process(false) $BallShape.disabled = true - +func buff_text(): + match curr_buff: + buff.ball: + return "" + buff.bounce: + return "You're bouncy!" + buff.phase: + return "WooOOoOO you can phase through walls" + buff.gravity: + return "Warning, Low gravity!" + return "" func revert_current_buff(): + $PowerUI/LabelBuff.text = "" match curr_buff: buff.ball: ball_revert() @@ -254,6 +265,7 @@ func revert_current_buff(): low_gravity_revert() func apply_buff(): + $PowerUI/LabelBuff.text = buff_text() match curr_buff: buff.ball: ball() -- cgit