fix unfocused animations in more places

This commit is contained in:
Haze Weathers 2024-03-05 22:16:59 -05:00
parent 0bae67fd3b
commit 0e63883cdd
3 changed files with 26 additions and 8 deletions

9
menus/credits.gd Normal file
View file

@ -0,0 +1,9 @@
extends Node
func _notification(what: int) -> void:
match what:
NOTIFICATION_WM_FOCUS_OUT:
$AnimationPlayer.playback_active = false
NOTIFICATION_WM_FOCUS_IN:
$AnimationPlayer.playback_active = true

View file

@ -1,4 +1,4 @@
[gd_scene load_steps=134 format=2]
[gd_scene load_steps=135 format=2]
[ext_resource path="res://shaders/1px_border.gdshader" type="Shader" id=1]
[ext_resource path="res://shaders/ska_plane.gdshader" type="Shader" id=2]
@ -13,6 +13,7 @@
[ext_resource path="res://graphics/hud/roll_call.png" type="Texture" id=11]
[ext_resource path="res://graphics/npc/intelli_idle.png" type="Texture" id=12]
[ext_resource path="res://graphics/npc/speccy.png" type="Texture" id=13]
[ext_resource path="res://menus/credits.gd" type="Script" id=14]
[ext_resource path="res://graphics/enemy/snake.png" type="Texture" id=15]
[ext_resource path="res://scripts/sg_palette.gd" type="Script" id=16]
[ext_resource path="res://graphics/player/sg_stim.png" type="Texture" id=17]
@ -605,6 +606,7 @@ tracks/0/keys = {
}
[node name="Credits" type="Node" groups=["map"]]
script = ExtResource( 14 )
[node name="CanvasLayer" type="CanvasLayer" parent="."]
layer = -64
@ -833,7 +835,6 @@ align = 1
material = SubResource( 8 )
position = Vector2( 106, 69 )
frames = SubResource( 18 )
frame = 3
playing = true
[node name="Label" type="Label" parent="Control/RollCall1/MsX"]
@ -936,7 +937,6 @@ align = 1
[node name="TheScrump" type="AnimatedSprite" parent="Control/RollCall2"]
position = Vector2( 2992, 128 )
frames = SubResource( 27 )
frame = 1
playing = true
[node name="Label" type="Label" parent="Control/RollCall2/TheScrump"]
@ -984,7 +984,6 @@ align = 1
material = SubResource( 34 )
position = Vector2( 3024, 62 )
frames = SubResource( 43 )
frame = 3
playing = true
[node name="Label" type="Label" parent="Control/RollCall2/Skelarcher"]
@ -1109,7 +1108,7 @@ align = 1
material = SubResource( 71 )
position = Vector2( 72, 152 )
frames = SubResource( 80 )
frame = 4
frame = 1
playing = true
[node name="Label" type="Label" parent="Control/RollCall3/Hellarcher"]
@ -1126,7 +1125,7 @@ align = 1
material = SubResource( 66 )
position = Vector2( 68, 104 )
frames = SubResource( 70 )
frame = 2
frame = 1
playing = true
[node name="Label" type="Label" parent="Control/RollCall3/Turchin"]
@ -1264,11 +1263,11 @@ position = Vector2( 3464, -8 )
autostart = false
[node name="FootShapeFront" parent="Control/RollCall4/2600/Hitbox" index="1"]
position = Vector2( 63.7333, 154.923 )
position = Vector2( 63.7334, 154.923 )
scale = Vector2( 1, 1 )
[node name="FootShapeBack" parent="Control/RollCall4/2600/Hitbox" index="2"]
position = Vector2( 42.7333, 154.923 )
position = Vector2( 42.7334, 154.923 )
scale = Vector2( 1, 1 )
[node name="ExplosionRect" parent="Control/RollCall4/2600/BigExplosion" index="0"]
@ -1313,6 +1312,7 @@ align = 1
material = SubResource( 82 )
position = Vector2( 3362, 122.5 )
frames = SubResource( 87 )
frame = 2
playing = true
[node name="Label" type="Label" parent="Control/RollCall4/Famicop"]

View file

@ -18,6 +18,15 @@ onready var perfect_bonus_score = $ShardsAndBonuses/Bonuses/PerfectBonus/Perfect
var text_3d = null
func _notification(what: int) -> void:
match what:
NOTIFICATION_WM_FOCUS_OUT:
$AnimationPlayer.playback_active = false
NOTIFICATION_WM_FOCUS_IN:
$AnimationPlayer.playback_active = true
func _ready() -> void:
#preload final score
text_3d = Text3D.instance()