From 752f2180e9272173bd34ab87780bbccded8f63c4 Mon Sep 17 00:00:00 2001 From: Kienan Stewart Date: Sun, 3 Apr 2022 18:32:44 -0400 Subject: [PATCH] Visual indication when help text changes --- .gitignore | 1 + TODO.md | 3 +-- src/Game.gd | 4 ++++ src/Game.tscn | 1 + 4 files changed, 7 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 659f560..90ff853 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ build/ .import/ assets/export/*.import +*.import diff --git a/TODO.md b/TODO.md index 23b127e..be594ab 100644 --- a/TODO.md +++ b/TODO.md @@ -1,8 +1,7 @@ 1. Visual polish - * multiple square tiles to add variation - * make the help text indicate (flash, etc.) * visual indications when damage is done but a unit isn't killed * visual indication when a unit is stronger (eg. a little skull or star or something) + * multiple square tiles to add variation 2. Sound effects * on hit, especially when the unit isn't killed * if possible, a small bit of background music diff --git a/src/Game.gd b/src/Game.gd index 02158d4..d63897d 100644 --- a/src/Game.gd +++ b/src/Game.gd @@ -494,9 +494,13 @@ func _process(delta): if self.flash_help != null: if self.flash_help > 0: self.flash_help -= delta + get_node("BottomBar/Help").set_modulate( + lerp(Color(1, 1, 1, 1), Color(1, .63, .12, 1), self.flash_help) + ) else: self._reset_help() self.flash_help = null + get_node("BottomBar/Help").set_modulate(Color(1, 1, 1, 1)) var opponent_pieces = get_tree().get_nodes_in_group("opponent") if opponent_pieces.empty() or get_tree().get_nodes_in_group("player").empty() and self.current_state != 99: # The game is over diff --git a/src/Game.tscn b/src/Game.tscn index 96dbf2c..ea5fa21 100644 --- a/src/Game.tscn +++ b/src/Game.tscn @@ -21,6 +21,7 @@ [sub_resource type="DynamicFont" id=1] size = 24 +outline_color = Color( 1, 0.635294, 0.121569, 1 ) font_data = ExtResource( 4 ) [sub_resource type="DynamicFont" id=2]