diff --git a/res/themes/default.tres b/res/themes/default.tres index 41f81a2..f806a20 100644 --- a/res/themes/default.tres +++ b/res/themes/default.tres @@ -3,7 +3,6 @@ [ext_resource path="res://res/fonts/silkscreen/Silkscreen-Regular.ttf" type="DynamicFontData" id=1] [sub_resource type="DynamicFont" id=1] -size = 8 font_data = ExtResource( 1 ) [resource] diff --git a/src/models/enemies/bat/Bat.tscn b/src/models/enemies/bat/Bat.tscn index 24db929..4801736 100644 --- a/src/models/enemies/bat/Bat.tscn +++ b/src/models/enemies/bat/Bat.tscn @@ -22,7 +22,7 @@ script = ExtResource( 2 ) use_parent_material = true frames = ExtResource( 1 ) animation = "idle" -frame = 1 +frame = 3 playing = true centered = false diff --git a/src/models/enemies/bat/bat.gd b/src/models/enemies/bat/bat.gd index 4b6fa1d..588ed25 100644 --- a/src/models/enemies/bat/bat.gd +++ b/src/models/enemies/bat/bat.gd @@ -14,20 +14,21 @@ func _ready(): hp = 7 func _physics_process(delta): - if not shooting: - shooting_timer += delta - if shooting_timer >= 2.0: - shooting = true - shooting_timer = .0 - if shooting: - attack_timer += delta - if attack_timer >= .5 and not shot: - _shoot() - shot = true - if attack_timer >= 1.0: - attack_timer = 0 - shooting = false - shot = false + if Global.playing: + if not shooting: + shooting_timer += delta + if shooting_timer >= 2.0: + shooting = true + shooting_timer = .0 + if shooting: + attack_timer += delta + if attack_timer >= .5 and not shot: + _shoot() + shot = true + if attack_timer >= 1.0: + attack_timer = 0 + shooting = false + shot = false var player_position = player.global_position + Vector2(12, 12) var angle = get_angle_to(player_position)