diff --git a/game.tscn b/game.tscn index 830ec4b..73cb0eb 100644 --- a/game.tscn +++ b/game.tscn @@ -21,6 +21,7 @@ [ext_resource type="Texture2D" uid="uid://dg7opd4ednlel" path="res://Sprites/SamBackground_1.jpg" id="13_hb5m1"] [ext_resource type="Texture2D" uid="uid://bfnh0ttl1r173" path="res://Sprites/background removed/SculpLev01_01.png.funny.png" id="14_33ckb"] [ext_resource type="Texture2D" uid="uid://di8ngxeteytos" path="res://Sprites/wall.png" id="14_215e1"] +[ext_resource type="Texture2D" uid="uid://damgkpo55plee" path="res://Sprites/background removed/SenseiF00.png.funny.png" id="14_qqc4h"] [ext_resource type="Texture2D" uid="uid://dpacswlaf66eq" path="res://Sprites/background removed/SculpLev01_02.png.funny.png" id="15_qqc4h"] [ext_resource type="Texture2D" uid="uid://bxwcyur578pwi" path="res://Sprites/background removed/SculpLev01_03.png.funny.png" id="16_kp8cn"] [ext_resource type="Texture2D" uid="uid://dplce83hwj3id" path="res://Sprites/background removed/SculpLev01_04.png.funny.png" id="17_nc06o"] @@ -28,7 +29,6 @@ [ext_resource type="Texture2D" uid="uid://b1pkcfhw4rh7m" path="res://Sprites/background removed/SculpLev01_05.png.funny.png" id="18_qnd83"] [ext_resource type="Texture2D" uid="uid://dkspgbsp0nety" path="res://Sprites/background removed/SculpLev01_06.png.funny.png" id="19_de524"] [ext_resource type="Texture2D" uid="uid://de7sjsjdykic4" path="res://Sprites/background removed/SculpLev01_07.png.funny.png" id="20_0i3gv"] -[ext_resource type="Texture2D" uid="uid://xadkra2l0qg7" path="res://Sprites/Sam/Bow/Pos01BowF06.png" id="20_xoeau"] [ext_resource type="Texture2D" uid="uid://cwuh5ecb667y1" path="res://Sprites/background removed/SculpLev01_08.png.funny.png" id="21_d53yc"] [ext_resource type="Texture2D" uid="uid://clpfdq7qmrg0y" path="res://Sprites/background removed/SculpLev02_01.png.funny.png" id="22_3i62b"] [ext_resource type="Texture2D" uid="uid://bbuahr4dgc1uj" path="res://Sprites/background removed/SculpLev02_02.png.funny.png" id="23_swnqc"] @@ -183,6 +183,9 @@ animations = [{ "frames": [{ "duration": 1.0, +"texture": ExtResource("14_qqc4h") +}, { +"duration": 1.0, "texture": ExtResource("14_33ckb") }, { "duration": 1.0, @@ -507,9 +510,9 @@ animations = [{ "duration": 1.0, "texture": ExtResource("116_askqd") }], -"loop": true, +"loop": false, "name": &"crack", -"speed": 5.0 +"speed": 1.2 }, { "frames": [{ "duration": 1.0, @@ -604,7 +607,7 @@ animations = [{ }, { "frames": [{ "duration": 1.0, -"texture": ExtResource("20_xoeau") +"texture": ExtResource("128_c81ko") }], "loop": false, "name": &"default", @@ -710,7 +713,7 @@ font_color = Color(0.619608, 0, 1, 1) [sub_resource type="LabelSettings" id="LabelSettings_7sc4i"] font_size = 30 -[node name="Node2D" type="Node2D" node_paths=PackedStringArray("icon_container", "progress_bar", "scroll_container", "score_label", "life_container", "round_label", "sound_player", "finish_screen", "sam_sprite")] +[node name="Node2D" type="Node2D" node_paths=PackedStringArray("icon_container", "progress_bar", "scroll_container", "score_label", "life_container", "round_label", "sound_player", "finish_screen", "sam_sprite", "rock_sprite", "statue_sprite")] script = ExtResource("1_e2o6t") code_len = 1 icon_container = NodePath("CanvasLayer/VBoxContainer/HFlowContainer/VBoxContainer/HBoxContainer") @@ -731,6 +734,8 @@ round_label = NodePath("RoundDisplay/RoundLabel") sound_player = NodePath("AudioStreamPlayer") finish_screen = NodePath("CanvasLayer/FinishScreen") sam_sprite = NodePath("Sam") +rock_sprite = NodePath("Rock") +statue_sprite = NodePath("Statue") [node name="SamBackground1" type="Sprite2D" parent="."] position = Vector2(576, 388) @@ -740,21 +745,18 @@ texture = ExtResource("13_hb5m1") [node name="Statue" type="AnimatedSprite2D" parent="."] position = Vector2(574, 376) sprite_frames = SubResource("SpriteFrames_k228o") -frame = 57 -frame_progress = 0.714894 [node name="Rock" type="AnimatedSprite2D" parent="."] position = Vector2(579, 349) sprite_frames = SubResource("SpriteFrames_lrvy0") -animation = &"Idle" +animation = &"crack" autoplay = "Idle" +frame = 6 +frame_progress = 1.0 [node name="Sam" type="AnimatedSprite2D" parent="."] position = Vector2(376, 435) sprite_frames = SubResource("SpriteFrames_lea4x") -animation = &"tan" -frame = 26 -frame_progress = 1.0 [node name="Wall" type="Sprite2D" parent="."] position = Vector2(577, 598) diff --git a/logic.gd b/logic.gd index 331ce53..6fa3d4c 100644 --- a/logic.gd +++ b/logic.gd @@ -16,6 +16,8 @@ extends Node2D @export var sound_player : AudioStreamPlayer @export var finish_screen : Control @export var sam_sprite : AnimatedSprite2D +@export var rock_sprite : AnimatedSprite2D +@export var statue_sprite : AnimatedSprite2D var current_time : float = 5 var score : int = 0 var lives : int = 3 @@ -97,6 +99,7 @@ func start_round(): sound_player.stream = sounds["reveal"] sound_player.play() sam_sprite.play("default") + rock_sprite.play("crack") #scroll_container.scroll_horizontal = 0 pass @@ -126,6 +129,9 @@ func process_input(direction : int): func win_round(): #todo: bous for remaining time? sam_sprite.play("bow") + rock_sprite.play("fall") + statue_sprite.show() + statue_sprite.frame += 1 sound_player.stream = sounds["roundSuccess"] sound_player.play() gaming = false @@ -141,6 +147,8 @@ func win_round(): score += 100 func lose_round(): + statue_sprite.hide() + rock_sprite.play("fall") gaming = false sam_sprite.play("tan") codepos = 0