diff --git a/assets/minigames/penguin/graphic/background.png b/assets/minigames/penguin/graphic/background.png index 7b27b295..d20a8b40 100644 Binary files a/assets/minigames/penguin/graphic/background.png and b/assets/minigames/penguin/graphic/background.png differ diff --git a/assets/minigames/penguin/graphic/gauge_icon_penguin_empty.png b/assets/minigames/penguin/graphic/gauge_icon_penguin_empty.png index 73d8ef1f..7981f249 100644 Binary files a/assets/minigames/penguin/graphic/gauge_icon_penguin_empty.png and b/assets/minigames/penguin/graphic/gauge_icon_penguin_empty.png differ diff --git a/assets/minigames/penguin/graphic/gauge_icon_penguin_full.png b/assets/minigames/penguin/graphic/gauge_icon_penguin_full.png index 39440450..47bb9eaf 100644 Binary files a/assets/minigames/penguin/graphic/gauge_icon_penguin_full.png and b/assets/minigames/penguin/graphic/gauge_icon_penguin_full.png differ diff --git a/assets/minigames/penguin/graphic/penguin.png b/assets/minigames/penguin/graphic/penguin.png index 2c567320..cf5540c5 100644 Binary files a/assets/minigames/penguin/graphic/penguin.png and b/assets/minigames/penguin/graphic/penguin.png differ diff --git a/assets/minigames/penguin/graphic/snowball.png b/assets/minigames/penguin/graphic/snowball.png index 174ed55d..743e4c7b 100644 Binary files a/assets/minigames/penguin/graphic/snowball.png and b/assets/minigames/penguin/graphic/snowball.png differ diff --git a/assets/minigames/penguin/graphic/snowballs_pile.png b/assets/minigames/penguin/graphic/snowballs_pile.png deleted file mode 100644 index 61baa682..00000000 Binary files a/assets/minigames/penguin/graphic/snowballs_pile.png and /dev/null differ diff --git a/assets/minigames/penguin/graphic/snowballs_pile.png.import b/assets/minigames/penguin/graphic/snowballs_pile.png.import deleted file mode 100644 index 542ad601..00000000 --- a/assets/minigames/penguin/graphic/snowballs_pile.png.import +++ /dev/null @@ -1,40 +0,0 @@ -[remap] - -importer="texture" -type="CompressedTexture2D" -uid="uid://7apuslkxluxp" -path="res://.godot/imported/snowballs_pile.png-3b03a2b8a42945e56a012d27466c1104.ctex" -metadata={ -"vram_texture": false -} - -[deps] - -source_file="res://assets/minigames/penguin/graphic/snowballs_pile.png" -dest_files=["res://.godot/imported/snowballs_pile.png-3b03a2b8a42945e56a012d27466c1104.ctex"] - -[params] - -compress/mode=0 -compress/high_quality=false -compress/lossy_quality=0.7 -compress/uastc_level=0 -compress/rdo_quality_loss=0.0 -compress/hdr_compression=1 -compress/normal_map=0 -compress/channel_pack=0 -mipmaps/generate=false -mipmaps/limit=-1 -roughness/mode=0 -roughness/src_normal="" -process/channel_remap/red=0 -process/channel_remap/green=1 -process/channel_remap/blue=2 -process/channel_remap/alpha=3 -process/fix_alpha_border=true -process/premult_alpha=false -process/normal_map_invert_y=false -process/hdr_as_srgb=false -process/hdr_clamp_exposure=false -process/size_limit=0 -detect_3d/compress_to=1 diff --git a/sources/minigames/penguin/penguin.gd b/sources/minigames/penguin/penguin.gd index fee2bc72..caad3fb3 100644 --- a/sources/minigames/penguin/penguin.gd +++ b/sources/minigames/penguin/penguin.gd @@ -5,49 +5,47 @@ const SNOWBALL_SCENE: PackedScene = preload("res://sources/minigames/penguin/sno var throw_position: Vector2 -@onready var snowball_position: Marker2D = $Sprite2D/Snowball -@onready var animation_player: AnimationPlayer = $AnimationPlayer +@onready var snowball_start: Marker2D = $AnimatedSprite2D/Snowball_Start @onready var audiostream_player: AudioStreamPlayer = $AudioStreamPlayer +@onready var animated_sprite: AnimatedSprite2D = $AnimatedSprite2D func _create_snowball() -> void: var snowball: Snowball = SNOWBALL_SCENE.instantiate() - snowball.position = snowball_position.global_position - snowball.target_position = throw_position - snowball_position.global_position + snowball.position = snowball_start.global_position + snowball.target_position = throw_position - snowball_start.global_position audiostream_player.play() get_parent().add_child(snowball) #region Animations func idle() -> void: - if randf() < 0.8: - animation_player.play("idle") - else: - animation_player.play("idle2") + animated_sprite.play("idle") func happy() -> void: - animation_player.play("happy") - await animation_player.animation_finished + animated_sprite.play("happy") + await animated_sprite.animation_finished + animated_sprite.play("happy") + await animated_sprite.animation_finished func sad() -> void: - animation_player.play("sad") - await animation_player.animation_finished + animated_sprite.play("sad") + await animated_sprite.animation_finished + animated_sprite.play("sad", -1.0) + await animated_sprite.animation_finished func throw(pos: Vector2) -> void: throw_position = pos - animation_player.play("throw") - await animation_player.animation_finished + animated_sprite.play("flip_right") + await animated_sprite.animation_finished + _create_snowball() + animated_sprite.play("throw") + await animated_sprite.animation_finished + animated_sprite.play("flip_left") + await animated_sprite.animation_finished idle() #endregion - -#region Connections - -func _on_animation_player_animation_finished(anim_name: StringName) -> void: - if anim_name == "idle" or anim_name == "idle2": - idle() - -#endregion diff --git a/sources/minigames/penguin/penguin.tscn b/sources/minigames/penguin/penguin.tscn index c750c9bc..e6e0b325 100644 --- a/sources/minigames/penguin/penguin.tscn +++ b/sources/minigames/penguin/penguin.tscn @@ -1,404 +1,24 @@ -[gd_scene load_steps=13 format=3 uid="uid://b78362g1yif2n"] +[gd_scene load_steps=4 format=3 uid="uid://b78362g1yif2n"] [ext_resource type="Script" uid="uid://c25qilgxaqp1h" path="res://sources/minigames/penguin/penguin.gd" id="1_gyeou"] -[ext_resource type="Texture2D" uid="uid://4mr2idafmxcp" path="res://assets/minigames/penguin/graphic/penguin.png" id="2_18gp7"] -[ext_resource type="Texture2D" uid="uid://uc0g4jdjk61p" path="res://assets/minigames/penguin/graphic/snowball.png" id="3_whe7m"] +[ext_resource type="SpriteFrames" uid="uid://c4l27gbfqffia" path="res://sources/minigames/penguin/penguin_animations.tres" id="2_l6pmb"] [ext_resource type="AudioStream" uid="uid://bha6my06g7p4b" path="res://assets/minigames/monkeys/audio/monkey_sendcoco.mp3" id="8_dqq5e"] -[sub_resource type="Animation" id="Animation_xysi2"] -length = 0.001 -tracks/0/type = "value" -tracks/0/imported = false -tracks/0/enabled = true -tracks/0/path = NodePath("Sprite2D:frame") -tracks/0/interp = 1 -tracks/0/loop_wrap = true -tracks/0/keys = { -"times": PackedFloat32Array(0), -"transitions": PackedFloat32Array(1), -"update": 1, -"values": [9] -} -tracks/1/type = "value" -tracks/1/imported = false -tracks/1/enabled = true -tracks/1/path = NodePath("Sprite2D/Snowball:position") -tracks/1/interp = 1 -tracks/1/loop_wrap = true -tracks/1/keys = { -"times": PackedFloat32Array(0), -"transitions": PackedFloat32Array(1), -"update": 0, -"values": [Vector2(-64, 33)] -} -tracks/2/type = "value" -tracks/2/imported = false -tracks/2/enabled = true -tracks/2/path = NodePath("Sprite2D/Snowball/Sprite2D:z_index") -tracks/2/interp = 1 -tracks/2/loop_wrap = true -tracks/2/keys = { -"times": PackedFloat32Array(0), -"transitions": PackedFloat32Array(1), -"update": 1, -"values": [0] -} -tracks/3/type = "value" -tracks/3/imported = false -tracks/3/enabled = true -tracks/3/path = NodePath("Sprite2D/Snowball/Sprite2D:visible") -tracks/3/interp = 1 -tracks/3/loop_wrap = true -tracks/3/keys = { -"times": PackedFloat32Array(0), -"transitions": PackedFloat32Array(1), -"update": 1, -"values": [true] -} -tracks/4/type = "value" -tracks/4/imported = false -tracks/4/enabled = true -tracks/4/path = NodePath("Sprite2D:frame_coords") -tracks/4/interp = 1 -tracks/4/loop_wrap = true -tracks/4/keys = { -"times": PackedFloat32Array(0), -"transitions": PackedFloat32Array(1), -"update": 1, -"values": [Vector2i(0, 0)] -} - -[sub_resource type="Animation" id="Animation_sqmdw"] -resource_name = "happy" -length = 0.6664 -loop_mode = 1 -step = 0.0833 -tracks/0/type = "value" -tracks/0/imported = false -tracks/0/enabled = true -tracks/0/path = NodePath("Sprite2D:frame") -tracks/0/interp = 1 -tracks/0/loop_wrap = true -tracks/0/keys = { -"times": PackedFloat32Array(0, 0.0833, 0.1666, 0.2499, 0.3332, 0.4165, 0.4998, 0.5831), -"transitions": PackedFloat32Array(1, 1, 1, 1, 1, 1, 1, 1), -"update": 1, -"values": [1, 2, 3, 4, 5, 6, 7, 8] -} -tracks/1/type = "value" -tracks/1/imported = false -tracks/1/enabled = true -tracks/1/path = NodePath("Sprite2D/Snowball:position") -tracks/1/interp = 1 -tracks/1/loop_wrap = true -tracks/1/keys = { -"times": PackedFloat32Array(0, 0.0833, 0.1666, 0.2499, 0.3332, 0.4165, 0.4998, 0.5831), -"transitions": PackedFloat32Array(1, 1, 1, 1, 1, 1, 1, 1), -"update": 0, -"values": [Vector2(-69, 39), Vector2(-71, 35), Vector2(-75, 29), Vector2(-78, 22), Vector2(-82, 16), Vector2(-84, 16), Vector2(-81, 23), Vector2(-73, 33)] -} -tracks/2/type = "value" -tracks/2/imported = false -tracks/2/enabled = true -tracks/2/path = NodePath("Sprite2D/Snowball/Sprite2D:z_index") -tracks/2/interp = 1 -tracks/2/loop_wrap = true -tracks/2/keys = { -"times": PackedFloat32Array(0), -"transitions": PackedFloat32Array(1), -"update": 1, -"values": [0] -} -tracks/3/type = "value" -tracks/3/imported = false -tracks/3/enabled = true -tracks/3/path = NodePath("Sprite2D/Snowball/Sprite2D:visible") -tracks/3/interp = 1 -tracks/3/loop_wrap = true -tracks/3/keys = { -"times": PackedFloat32Array(0), -"transitions": PackedFloat32Array(1), -"update": 1, -"values": [true] -} - -[sub_resource type="Animation" id="Animation_gk3e3"] -resource_name = "idle" -length = 0.5 -step = 0.0833 -tracks/0/type = "value" -tracks/0/imported = false -tracks/0/enabled = true -tracks/0/path = NodePath("Sprite2D:frame") -tracks/0/interp = 1 -tracks/0/loop_wrap = true -tracks/0/keys = { -"times": PackedFloat32Array(0, 0.0833, 0.1666, 0.2499, 0.3332, 0.4165), -"transitions": PackedFloat32Array(1, 1, 1, 1, 1, 1), -"update": 1, -"values": [9, 10, 11, 12, 13, 14] -} -tracks/1/type = "value" -tracks/1/imported = false -tracks/1/enabled = true -tracks/1/path = NodePath("Sprite2D/Snowball:position") -tracks/1/interp = 1 -tracks/1/loop_wrap = true -tracks/1/keys = { -"times": PackedFloat32Array(0, 0.0833, 0.1666, 0.2499, 0.3332, 0.4165), -"transitions": PackedFloat32Array(1, 1, 1, 1, 1, 1), -"update": 0, -"values": [Vector2(-69, 39), Vector2(-69, 40), Vector2(-69, 41), Vector2(-69, 40), Vector2(-69, 39), Vector2(-69, 39)] -} -tracks/2/type = "value" -tracks/2/imported = false -tracks/2/enabled = true -tracks/2/path = NodePath("Sprite2D/Snowball/Sprite2D:visible") -tracks/2/interp = 1 -tracks/2/loop_wrap = true -tracks/2/keys = { -"times": PackedFloat32Array(0), -"transitions": PackedFloat32Array(1), -"update": 1, -"values": [true] -} -tracks/3/type = "value" -tracks/3/imported = false -tracks/3/enabled = true -tracks/3/path = NodePath("Sprite2D/Snowball/Sprite2D:z_index") -tracks/3/interp = 1 -tracks/3/loop_wrap = true -tracks/3/keys = { -"times": PackedFloat32Array(0), -"transitions": PackedFloat32Array(1), -"update": 1, -"values": [0] -} - -[sub_resource type="Animation" id="Animation_wdf0g"] -resource_name = "idle2" -length = 0.5 -step = 0.0833 -tracks/0/type = "value" -tracks/0/imported = false -tracks/0/enabled = true -tracks/0/path = NodePath("Sprite2D:frame") -tracks/0/interp = 1 -tracks/0/loop_wrap = true -tracks/0/keys = { -"times": PackedFloat32Array(0, 0.0833, 0.1666, 0.2499, 0.3332, 0.4165), -"transitions": PackedFloat32Array(1, 1, 1, 1, 1, 1), -"update": 1, -"values": [15, 16, 17, 18, 19, 20] -} -tracks/1/type = "value" -tracks/1/imported = false -tracks/1/enabled = true -tracks/1/path = NodePath("Sprite2D/Snowball:position") -tracks/1/interp = 1 -tracks/1/loop_wrap = true -tracks/1/keys = { -"times": PackedFloat32Array(0, 0.0833, 0.1666, 0.2499, 0.3332, 0.4165), -"transitions": PackedFloat32Array(1, 1, 1, 1, 1, 1), -"update": 0, -"values": [Vector2(-69, 39), Vector2(-69, 40), Vector2(-69, 41), Vector2(-69, 41), Vector2(-69, 40), Vector2(-69, 39)] -} -tracks/2/type = "value" -tracks/2/imported = false -tracks/2/enabled = true -tracks/2/path = NodePath("Sprite2D/Snowball/Sprite2D:visible") -tracks/2/interp = 1 -tracks/2/loop_wrap = true -tracks/2/keys = { -"times": PackedFloat32Array(0), -"transitions": PackedFloat32Array(1), -"update": 1, -"values": [true] -} -tracks/3/type = "value" -tracks/3/imported = false -tracks/3/enabled = true -tracks/3/path = NodePath("Sprite2D/Snowball/Sprite2D:z_index") -tracks/3/interp = 1 -tracks/3/loop_wrap = true -tracks/3/keys = { -"times": PackedFloat32Array(0), -"transitions": PackedFloat32Array(1), -"update": 1, -"values": [0] -} - -[sub_resource type="Animation" id="Animation_yqm8m"] -resource_name = "sad" -length = 0.6664 -loop_mode = 1 -step = 0.0833 -tracks/0/type = "value" -tracks/0/imported = false -tracks/0/enabled = true -tracks/0/path = NodePath("Sprite2D:frame") -tracks/0/interp = 1 -tracks/0/loop_wrap = true -tracks/0/keys = { -"times": PackedFloat32Array(0, 0.0833, 0.1666, 0.2499, 0.3332, 0.4165, 0.4998, 0.5831), -"transitions": PackedFloat32Array(1, 1, 1, 1, 1, 1, 1, 1), -"update": 1, -"values": [21, 22, 23, 24, 25, 26, 27, 28] -} -tracks/1/type = "value" -tracks/1/imported = false -tracks/1/enabled = true -tracks/1/path = NodePath("Sprite2D/Snowball:position") -tracks/1/interp = 1 -tracks/1/loop_wrap = true -tracks/1/keys = { -"times": PackedFloat32Array(0, 0.0833, 0.1666, 0.2499, 0.3332, 0.4165), -"transitions": PackedFloat32Array(1, 1, 1, 1, 1, 1), -"update": 0, -"values": [Vector2(-69, 36), Vector2(-69, 35), Vector2(-69, 33), Vector2(-69, 32), Vector2(-69, 32.8), Vector2(-69, 33)] -} -tracks/2/type = "value" -tracks/2/imported = false -tracks/2/enabled = true -tracks/2/path = NodePath("Sprite2D/Snowball/Sprite2D:visible") -tracks/2/interp = 1 -tracks/2/loop_wrap = true -tracks/2/keys = { -"times": PackedFloat32Array(0), -"transitions": PackedFloat32Array(1), -"update": 1, -"values": [true] -} -tracks/3/type = "value" -tracks/3/imported = false -tracks/3/enabled = true -tracks/3/path = NodePath("Sprite2D/Snowball/Sprite2D:z_index") -tracks/3/interp = 1 -tracks/3/loop_wrap = true -tracks/3/keys = { -"times": PackedFloat32Array(0), -"transitions": PackedFloat32Array(1), -"update": 1, -"values": [0] -} - -[sub_resource type="Animation" id="Animation_rggbs"] -resource_name = "slide" -length = 0.2667 -loop_mode = 1 -tracks/0/type = "value" -tracks/0/imported = false -tracks/0/enabled = true -tracks/0/path = NodePath("Sprite2D:frame_coords") -tracks/0/interp = 1 -tracks/0/loop_wrap = true -tracks/0/keys = { -"times": PackedFloat32Array(0, 0.0333, 0.0666, 0.0999, 0.1332, 0.1665, 0.1998, 0.2331), -"transitions": PackedFloat32Array(1, 1, 1, 1, 1, 1, 1, 1), -"update": 1, -"values": [Vector2i(0, 0), Vector2i(9, 0), Vector2i(10, 0), Vector2i(29, 0), Vector2i(29, 0), Vector2i(30, 0), Vector2i(31, 0), Vector2i(0, 0)] -} - -[sub_resource type="Animation" id="Animation_d68qa"] -resource_name = "throw" -step = 0.0833 -tracks/0/type = "value" -tracks/0/imported = false -tracks/0/enabled = true -tracks/0/path = NodePath("Sprite2D:frame") -tracks/0/interp = 1 -tracks/0/loop_wrap = true -tracks/0/keys = { -"times": PackedFloat32Array(0, 0.0833, 0.1666, 0.2499, 0.3332, 0.4165, 0.4998, 0.5831, 0.6664, 0.7497, 0.833, 0.9163), -"transitions": PackedFloat32Array(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1), -"update": 1, -"values": [29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 38, 0] -} -tracks/1/type = "value" -tracks/1/imported = false -tracks/1/enabled = true -tracks/1/path = NodePath("Sprite2D/Snowball:position") -tracks/1/interp = 1 -tracks/1/loop_wrap = true -tracks/1/keys = { -"times": PackedFloat32Array(0, 0.0833, 0.1666, 0.2499, 0.3332, 0.4165, 0.4998, 0.5831, 0.6664, 0.7497, 0.833, 0.9163), -"transitions": PackedFloat32Array(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1), -"update": 0, -"values": [Vector2(-51, 40), Vector2(64, 41), Vector2(83, 32), Vector2(103, 15), Vector2(104, 11), Vector2(84, -47), Vector2(29, -78), Vector2(48, -76), Vector2(80, -52), Vector2(94, -4), Vector2(94, -4), Vector2(18, 48)] -} -tracks/2/type = "value" -tracks/2/imported = false -tracks/2/enabled = true -tracks/2/path = NodePath("Sprite2D/Snowball/Sprite2D:z_index") -tracks/2/interp = 1 -tracks/2/loop_wrap = true -tracks/2/keys = { -"times": PackedFloat32Array(0, 0.0833), -"transitions": PackedFloat32Array(1, 1), -"update": 1, -"values": [0, -1] -} -tracks/3/type = "value" -tracks/3/imported = false -tracks/3/enabled = true -tracks/3/path = NodePath("Sprite2D/Snowball/Sprite2D:visible") -tracks/3/interp = 1 -tracks/3/loop_wrap = true -tracks/3/keys = { -"times": PackedFloat32Array(0, 0.4998), -"transitions": PackedFloat32Array(1, 1), -"update": 1, -"values": [true, false] -} -tracks/4/type = "method" -tracks/4/imported = false -tracks/4/enabled = true -tracks/4/path = NodePath(".") -tracks/4/interp = 1 -tracks/4/loop_wrap = true -tracks/4/keys = { -"times": PackedFloat32Array(0.3332), -"transitions": PackedFloat32Array(1), -"values": [{ -"args": [], -"method": &"_create_snowball" -}] -} - -[sub_resource type="AnimationLibrary" id="AnimationLibrary_ykcap"] -_data = { -&"RESET": SubResource("Animation_xysi2"), -&"happy": SubResource("Animation_sqmdw"), -&"idle": SubResource("Animation_gk3e3"), -&"idle2": SubResource("Animation_wdf0g"), -&"sad": SubResource("Animation_yqm8m"), -&"slide": SubResource("Animation_rggbs"), -&"throw": SubResource("Animation_d68qa") -} - [node name="Penguin" type="Node2D"] script = ExtResource("1_gyeou") -[node name="Sprite2D" type="Sprite2D" parent="."] +[node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="."] position = Vector2(0, -174) scale = Vector2(2, 2) -texture = ExtResource("2_18gp7") -hframes = 39 - -[node name="Snowball" type="Marker2D" parent="Sprite2D"] -position = Vector2(-64, 33) - -[node name="Sprite2D" type="Sprite2D" parent="Sprite2D/Snowball"] -texture = ExtResource("3_whe7m") - -[node name="AnimationPlayer" type="AnimationPlayer" parent="."] -libraries = { -"": SubResource("AnimationLibrary_ykcap") -} +sprite_frames = ExtResource("2_l6pmb") +animation = &"happy" autoplay = "idle" +frame = 9 +frame_progress = 1.0 + +[node name="Snowball_Start" type="Marker2D" parent="AnimatedSprite2D"] +position = Vector2(132, -7.5) [node name="AudioStreamPlayer" type="AudioStreamPlayer" parent="."] stream = ExtResource("8_dqq5e") bus = &"Effects" - -[connection signal="animation_finished" from="AnimationPlayer" to="." method="_on_animation_player_animation_finished"] diff --git a/sources/minigames/penguin/penguin_animations.tres b/sources/minigames/penguin/penguin_animations.tres new file mode 100644 index 00000000..de4c85bc --- /dev/null +++ b/sources/minigames/penguin/penguin_animations.tres @@ -0,0 +1,288 @@ +[gd_resource type="SpriteFrames" load_steps=38 format=3 uid="uid://c4l27gbfqffia"] + +[ext_resource type="Texture2D" uid="uid://4mr2idafmxcp" path="res://assets/minigames/penguin/graphic/penguin.png" id="1_qjien"] + +[sub_resource type="AtlasTexture" id="AtlasTexture_1s05q"] +atlas = ExtResource("1_qjien") +region = Rect2(2460, 1230, 410, 410) + +[sub_resource type="AtlasTexture" id="AtlasTexture_mchl5"] +atlas = ExtResource("1_qjien") +region = Rect2(2870, 1230, 410, 410) + +[sub_resource type="AtlasTexture" id="AtlasTexture_qjien"] +atlas = ExtResource("1_qjien") +region = Rect2(0, 820, 410, 410) + +[sub_resource type="AtlasTexture" id="AtlasTexture_46gqu"] +atlas = ExtResource("1_qjien") +region = Rect2(410, 820, 410, 410) + +[sub_resource type="AtlasTexture" id="AtlasTexture_lja6v"] +atlas = ExtResource("1_qjien") +region = Rect2(820, 820, 410, 410) + +[sub_resource type="AtlasTexture" id="AtlasTexture_lbhka"] +atlas = ExtResource("1_qjien") +region = Rect2(1230, 820, 410, 410) + +[sub_resource type="AtlasTexture" id="AtlasTexture_svv4p"] +atlas = ExtResource("1_qjien") +region = Rect2(1640, 820, 410, 410) + +[sub_resource type="AtlasTexture" id="AtlasTexture_xwowv"] +atlas = ExtResource("1_qjien") +region = Rect2(2050, 820, 410, 410) + +[sub_resource type="AtlasTexture" id="AtlasTexture_eocst"] +atlas = ExtResource("1_qjien") +region = Rect2(2460, 820, 410, 410) + +[sub_resource type="AtlasTexture" id="AtlasTexture_oru4o"] +atlas = ExtResource("1_qjien") +region = Rect2(2870, 820, 410, 410) + +[sub_resource type="AtlasTexture" id="AtlasTexture_uues0"] +atlas = ExtResource("1_qjien") +region = Rect2(0, 1230, 410, 410) + +[sub_resource type="AtlasTexture" id="AtlasTexture_aypw2"] +atlas = ExtResource("1_qjien") +region = Rect2(410, 1230, 410, 410) + +[sub_resource type="AtlasTexture" id="AtlasTexture_axinn"] +atlas = ExtResource("1_qjien") +region = Rect2(0, 0, 410, 410) + +[sub_resource type="AtlasTexture" id="AtlasTexture_k0ye7"] +atlas = ExtResource("1_qjien") +region = Rect2(410, 0, 410, 410) + +[sub_resource type="AtlasTexture" id="AtlasTexture_kxmuw"] +atlas = ExtResource("1_qjien") +region = Rect2(820, 0, 410, 410) + +[sub_resource type="AtlasTexture" id="AtlasTexture_osrpp"] +atlas = ExtResource("1_qjien") +region = Rect2(1230, 0, 410, 410) + +[sub_resource type="AtlasTexture" id="AtlasTexture_75jsb"] +atlas = ExtResource("1_qjien") +region = Rect2(1640, 0, 410, 410) + +[sub_resource type="AtlasTexture" id="AtlasTexture_gl08l"] +atlas = ExtResource("1_qjien") +region = Rect2(2050, 0, 410, 410) + +[sub_resource type="AtlasTexture" id="AtlasTexture_pbc4y"] +atlas = ExtResource("1_qjien") +region = Rect2(2460, 0, 410, 410) + +[sub_resource type="AtlasTexture" id="AtlasTexture_78lc6"] +atlas = ExtResource("1_qjien") +region = Rect2(2870, 0, 410, 410) + +[sub_resource type="AtlasTexture" id="AtlasTexture_ebb7w"] +atlas = ExtResource("1_qjien") +region = Rect2(0, 1640, 410, 410) + +[sub_resource type="AtlasTexture" id="AtlasTexture_n5ibn"] +atlas = ExtResource("1_qjien") +region = Rect2(410, 1640, 410, 410) + +[sub_resource type="AtlasTexture" id="AtlasTexture_t88nf"] +atlas = ExtResource("1_qjien") +region = Rect2(820, 1640, 410, 410) + +[sub_resource type="AtlasTexture" id="AtlasTexture_cfx4h"] +atlas = ExtResource("1_qjien") +region = Rect2(1230, 1640, 410, 410) + +[sub_resource type="AtlasTexture" id="AtlasTexture_lhnib"] +atlas = ExtResource("1_qjien") +region = Rect2(1640, 1640, 410, 410) + +[sub_resource type="AtlasTexture" id="AtlasTexture_hxj20"] +atlas = ExtResource("1_qjien") +region = Rect2(2050, 1640, 410, 410) + +[sub_resource type="AtlasTexture" id="AtlasTexture_cn77b"] +atlas = ExtResource("1_qjien") +region = Rect2(2460, 1640, 410, 410) + +[sub_resource type="AtlasTexture" id="AtlasTexture_h70xp"] +atlas = ExtResource("1_qjien") +region = Rect2(2870, 1640, 410, 410) + +[sub_resource type="AtlasTexture" id="AtlasTexture_huk0x"] +atlas = ExtResource("1_qjien") +region = Rect2(0, 410, 410, 410) + +[sub_resource type="AtlasTexture" id="AtlasTexture_0vri5"] +atlas = ExtResource("1_qjien") +region = Rect2(410, 410, 410, 410) + +[sub_resource type="AtlasTexture" id="AtlasTexture_rm5xx"] +atlas = ExtResource("1_qjien") +region = Rect2(820, 410, 410, 410) + +[sub_resource type="AtlasTexture" id="AtlasTexture_xdls4"] +atlas = ExtResource("1_qjien") +region = Rect2(1230, 410, 410, 410) + +[sub_resource type="AtlasTexture" id="AtlasTexture_nxec3"] +atlas = ExtResource("1_qjien") +region = Rect2(1640, 410, 410, 410) + +[sub_resource type="AtlasTexture" id="AtlasTexture_kkbtn"] +atlas = ExtResource("1_qjien") +region = Rect2(2050, 410, 410, 410) + +[sub_resource type="AtlasTexture" id="AtlasTexture_1pje3"] +atlas = ExtResource("1_qjien") +region = Rect2(2460, 410, 410, 410) + +[sub_resource type="AtlasTexture" id="AtlasTexture_yxick"] +atlas = ExtResource("1_qjien") +region = Rect2(2870, 410, 410, 410) + +[resource] +animations = [{ +"frames": [{ +"duration": 1.0, +"texture": SubResource("AtlasTexture_1s05q") +}], +"loop": false, +"name": &"flip_left", +"speed": 5.0 +}, { +"frames": [{ +"duration": 1.0, +"texture": SubResource("AtlasTexture_mchl5") +}], +"loop": false, +"name": &"flip_right", +"speed": 5.0 +}, { +"frames": [{ +"duration": 1.0, +"texture": SubResource("AtlasTexture_qjien") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_46gqu") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_lja6v") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_lbhka") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_svv4p") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_xwowv") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_eocst") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_oru4o") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_uues0") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_aypw2") +}], +"loop": false, +"name": &"happy", +"speed": 12.0 +}, { +"frames": [{ +"duration": 1.0, +"texture": SubResource("AtlasTexture_axinn") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_k0ye7") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_kxmuw") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_osrpp") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_75jsb") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_gl08l") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_pbc4y") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_78lc6") +}], +"loop": true, +"name": &"idle", +"speed": 12.0 +}, { +"frames": [{ +"duration": 1.0, +"texture": SubResource("AtlasTexture_ebb7w") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_n5ibn") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_t88nf") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_cfx4h") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_lhnib") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_hxj20") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_cn77b") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_h70xp") +}], +"loop": false, +"name": &"sad", +"speed": 12.0 +}, { +"frames": [{ +"duration": 1.0, +"texture": SubResource("AtlasTexture_huk0x") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_0vri5") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_rm5xx") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_xdls4") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_nxec3") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_kkbtn") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_1pje3") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_yxick") +}], +"loop": false, +"name": &"throw", +"speed": 12.0 +}] diff --git a/sources/minigames/penguin/penguin_minigame.gd b/sources/minigames/penguin/penguin_minigame.gd index 92872862..e3eb63b7 100644 --- a/sources/minigames/penguin/penguin_minigame.gd +++ b/sources/minigames/penguin/penguin_minigame.gd @@ -165,12 +165,12 @@ func _on_snowball_thrown(pos: Vector2, label: PenguinLabel) -> void: Log.error("PenguinMinigame: Cannot update remediation score because label GP has no WordID") if correct_answer: - penguin.happy() - await label.right() + label.right() + await penguin.happy() current_word_progression += 1 else: - penguin.sad() - await label.wrong() + label.wrong() + await penguin.sad() current_lives -= 1 # Re-enables all labels diff --git a/sources/minigames/penguin/penguin_minigame.tscn b/sources/minigames/penguin/penguin_minigame.tscn index 2c8ac68f..8d48ed62 100644 --- a/sources/minigames/penguin/penguin_minigame.tscn +++ b/sources/minigames/penguin/penguin_minigame.tscn @@ -1,10 +1,9 @@ -[gd_scene load_steps=8 format=3 uid="uid://dpp3bpy1v80jk"] +[gd_scene load_steps=7 format=3 uid="uid://dpp3bpy1v80jk"] [ext_resource type="PackedScene" uid="uid://8awe4usnucyv" path="res://sources/minigames/base/base_minigame.tscn" id="1_s6yuv"] [ext_resource type="Script" uid="uid://250f3suy83hr" path="res://sources/minigames/penguin/penguin_minigame.gd" id="2_ncha4"] [ext_resource type="Texture2D" uid="uid://cvnv0beq0dcr4" path="res://assets/minigames/penguin/graphic/background.png" id="3_8crb3"] [ext_resource type="Texture2D" uid="uid://kwcp3ondyggo" path="res://assets/minigames/penguin/graphic/gauge_icon_penguin_empty.png" id="3_gdpi3"] -[ext_resource type="Texture2D" uid="uid://7apuslkxluxp" path="res://assets/minigames/penguin/graphic/snowballs_pile.png" id="4_e3y2j"] [ext_resource type="PackedScene" uid="uid://b78362g1yif2n" path="res://sources/minigames/penguin/penguin.tscn" id="4_txvyj"] [ext_resource type="Texture2D" uid="uid://dq23np4euf6da" path="res://assets/minigames/penguin/graphic/gauge_icon_penguin_full.png" id="4_yua7j"] @@ -29,13 +28,8 @@ grow_horizontal = 2 grow_vertical = 2 texture = ExtResource("3_8crb3") -[node name="SnowPile" type="Sprite2D" parent="GameRoot/Background" index="0"] -position = Vector2(905, 1605) -scale = Vector2(2, 2) -texture = ExtResource("4_e3y2j") - [node name="Penguin" parent="GameRoot" index="1" instance=ExtResource("4_txvyj")] -position = Vector2(702, 1694) +position = Vector2(637, 1314) [node name="Control" type="Control" parent="GameRoot" index="2"] layout_mode = 1 diff --git a/sources/minigames/penguin/snowball.tscn b/sources/minigames/penguin/snowball.tscn index c2097c3b..d5f7eb55 100644 --- a/sources/minigames/penguin/snowball.tscn +++ b/sources/minigames/penguin/snowball.tscn @@ -29,7 +29,7 @@ curve = SubResource("Curve2D_hpr8y") script = ExtResource("1_1ihh4") [node name="PathFollow2D" type="PathFollow2D" parent="."] -rotation = -0.785398 +rotation = -0.7853982 loop = false [node name="Sprite2D" type="Sprite2D" parent="PathFollow2D"] @@ -39,9 +39,9 @@ texture = ExtResource("1_wakpr") [node name="Particles" type="GPUParticles2D" parent="PathFollow2D"] emitting = false amount = 12 -process_material = SubResource("ParticleProcessMaterial_krqel") texture = ExtResource("1_wakpr") lifetime = 1.5 one_shot = true explosiveness = 1.0 randomness = 0.33 +process_material = SubResource("ParticleProcessMaterial_krqel")