diff --git a/assets/sprites/characters/chr_pawn_archer.png.import b/assets/sprites/characters/chr_pawn_archer.png.import index c7a23ad..35a5161 100644 --- a/assets/sprites/characters/chr_pawn_archer.png.import +++ b/assets/sprites/characters/chr_pawn_archer.png.import @@ -3,16 +3,16 @@ importer="texture" type="CompressedTexture2D" uid="uid://cjkpd4x507ra2" -path.etc2="res://.godot/imported/chr_pawn_archer.png-5b344ef7a373376638b1716671d15ca2.etc2.ctex" +path.s3tc="res://.godot/imported/chr_pawn_archer.png-5b344ef7a373376638b1716671d15ca2.s3tc.ctex" metadata={ -"imported_formats": ["etc2_astc"], +"imported_formats": ["s3tc_bptc"], "vram_texture": true } [deps] source_file="res://assets/sprites/characters/chr_pawn_archer.png" -dest_files=["res://.godot/imported/chr_pawn_archer.png-5b344ef7a373376638b1716671d15ca2.etc2.ctex"] +dest_files=["res://.godot/imported/chr_pawn_archer.png-5b344ef7a373376638b1716671d15ca2.s3tc.ctex"] [params] diff --git a/assets/sprites/characters/chr_pawn_chemist.png.import b/assets/sprites/characters/chr_pawn_chemist.png.import index 00b7c74..073db4b 100644 --- a/assets/sprites/characters/chr_pawn_chemist.png.import +++ b/assets/sprites/characters/chr_pawn_chemist.png.import @@ -3,16 +3,16 @@ importer="texture" type="CompressedTexture2D" uid="uid://brgrjjiidgxun" -path.etc2="res://.godot/imported/chr_pawn_chemist.png-9a30b9cb683733355e4ca530a1a2f3c8.etc2.ctex" +path.s3tc="res://.godot/imported/chr_pawn_chemist.png-9a30b9cb683733355e4ca530a1a2f3c8.s3tc.ctex" metadata={ -"imported_formats": ["etc2_astc"], +"imported_formats": ["s3tc_bptc"], "vram_texture": true } [deps] source_file="res://assets/sprites/characters/chr_pawn_chemist.png" -dest_files=["res://.godot/imported/chr_pawn_chemist.png-9a30b9cb683733355e4ca530a1a2f3c8.etc2.ctex"] +dest_files=["res://.godot/imported/chr_pawn_chemist.png-9a30b9cb683733355e4ca530a1a2f3c8.s3tc.ctex"] [params] diff --git a/assets/sprites/characters/chr_pawn_knight.png.import b/assets/sprites/characters/chr_pawn_knight.png.import index 7c386ee..03b725c 100644 --- a/assets/sprites/characters/chr_pawn_knight.png.import +++ b/assets/sprites/characters/chr_pawn_knight.png.import @@ -3,16 +3,16 @@ importer="texture" type="CompressedTexture2D" uid="uid://ewitxujpa3p3" -path.etc2="res://.godot/imported/chr_pawn_knight.png-622d737eb704ae4753cf69084d8a5a9f.etc2.ctex" +path.s3tc="res://.godot/imported/chr_pawn_knight.png-622d737eb704ae4753cf69084d8a5a9f.s3tc.ctex" metadata={ -"imported_formats": ["etc2_astc"], +"imported_formats": ["s3tc_bptc"], "vram_texture": true } [deps] source_file="res://assets/sprites/characters/chr_pawn_knight.png" -dest_files=["res://.godot/imported/chr_pawn_knight.png-622d737eb704ae4753cf69084d8a5a9f.etc2.ctex"] +dest_files=["res://.godot/imported/chr_pawn_knight.png-622d737eb704ae4753cf69084d8a5a9f.s3tc.ctex"] [params] diff --git a/assets/sprites/characters/chr_pawn_mage.png.import b/assets/sprites/characters/chr_pawn_mage.png.import index df68e7d..7cd47fe 100644 --- a/assets/sprites/characters/chr_pawn_mage.png.import +++ b/assets/sprites/characters/chr_pawn_mage.png.import @@ -3,16 +3,16 @@ importer="texture" type="CompressedTexture2D" uid="uid://dtnp3dsqu2yy6" -path.etc2="res://.godot/imported/chr_pawn_mage.png-a242cd7466699ab6c12bda79a3fe25d2.etc2.ctex" +path.s3tc="res://.godot/imported/chr_pawn_mage.png-a242cd7466699ab6c12bda79a3fe25d2.s3tc.ctex" metadata={ -"imported_formats": ["etc2_astc"], +"imported_formats": ["s3tc_bptc"], "vram_texture": true } [deps] source_file="res://assets/sprites/characters/chr_pawn_mage.png" -dest_files=["res://.godot/imported/chr_pawn_mage.png-a242cd7466699ab6c12bda79a3fe25d2.etc2.ctex"] +dest_files=["res://.godot/imported/chr_pawn_mage.png-a242cd7466699ab6c12bda79a3fe25d2.s3tc.ctex"] [params] diff --git a/assets/sprites/characters/chr_pawn_placeholder.png.import b/assets/sprites/characters/chr_pawn_placeholder.png.import index 847965e..111a6e7 100644 --- a/assets/sprites/characters/chr_pawn_placeholder.png.import +++ b/assets/sprites/characters/chr_pawn_placeholder.png.import @@ -3,16 +3,16 @@ importer="texture" type="CompressedTexture2D" uid="uid://bob12its3i651" -path.etc2="res://.godot/imported/chr_pawn_placeholder.png-f962d0d4aae444ea7a2403f9b6f5323e.etc2.ctex" +path.s3tc="res://.godot/imported/chr_pawn_placeholder.png-f962d0d4aae444ea7a2403f9b6f5323e.s3tc.ctex" metadata={ -"imported_formats": ["etc2_astc"], +"imported_formats": ["s3tc_bptc"], "vram_texture": true } [deps] source_file="res://assets/sprites/characters/chr_pawn_placeholder.png" -dest_files=["res://.godot/imported/chr_pawn_placeholder.png-f962d0d4aae444ea7a2403f9b6f5323e.etc2.ctex"] +dest_files=["res://.godot/imported/chr_pawn_placeholder.png-f962d0d4aae444ea7a2403f9b6f5323e.s3tc.ctex"] [params] diff --git a/src/enemy_controller.gd b/src/enemy_controller.gd index 92bce8e..d0306a6 100644 --- a/src/enemy_controller.gd +++ b/src/enemy_controller.gd @@ -9,6 +9,8 @@ var tactics_camera = null var arena = null var targets = null +var ui_control : TacticsPlayerControllerUI = null + func can_act(): for p in get_children(): @@ -20,9 +22,10 @@ func reset(): for p in get_children(): p.reset() -func configure(my_arena, my_camera): +func configure(my_arena, my_camera, my_ui_control): tactics_camera = my_camera arena = my_arena + ui_control = my_ui_control curr_pawn = get_children().front() @@ -71,6 +74,7 @@ func attack_pawn(delta): func act(delta): targets = get_parent().get_node("Player") + ui_control.set_visibility_of_actions_menu(false, null) match stage: 0: choose_pawn() 1: chase_nearest_enemy() diff --git a/src/level.gd b/src/level.gd index 91d8324..225cf5c 100644 --- a/src/level.gd +++ b/src/level.gd @@ -18,7 +18,7 @@ func _ready(): camera = $TacticsCamera ui_control = $PlayerControllerUI player.configure(arena, camera, ui_control) - enemy.configure(arena, camera) + enemy.configure(arena, camera, ui_control) func turn_handler(delta): diff --git a/src/player_controller_ui.gd b/src/player_controller_ui.gd index 7f10fb3..8a1eedf 100644 --- a/src/player_controller_ui.gd +++ b/src/player_controller_ui.gd @@ -26,7 +26,7 @@ func is_mouse_hover_button(): func set_visibility_of_actions_menu(v, p): if !$HBox/Actions.visible: $HBox/Actions/Move.grab_focus() - $HBox/Actions.visible = v + $HBox/Actions.visible = v and p.can_act() if !p : return $HBox/Actions/Move.disabled = !p.can_move $HBox/Actions/Attack.disabled = !p.can_attack