added animations and changed lives
This commit is contained in:
parent
d811193b25
commit
3774220102
2 changed files with 21 additions and 11 deletions
24
game.tscn
24
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://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://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://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://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://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"]
|
[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://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://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://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://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://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"]
|
[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 = [{
|
animations = [{
|
||||||
"frames": [{
|
"frames": [{
|
||||||
"duration": 1.0,
|
"duration": 1.0,
|
||||||
|
"texture": ExtResource("14_qqc4h")
|
||||||
|
}, {
|
||||||
|
"duration": 1.0,
|
||||||
"texture": ExtResource("14_33ckb")
|
"texture": ExtResource("14_33ckb")
|
||||||
}, {
|
}, {
|
||||||
"duration": 1.0,
|
"duration": 1.0,
|
||||||
|
|
@ -507,9 +510,9 @@ animations = [{
|
||||||
"duration": 1.0,
|
"duration": 1.0,
|
||||||
"texture": ExtResource("116_askqd")
|
"texture": ExtResource("116_askqd")
|
||||||
}],
|
}],
|
||||||
"loop": true,
|
"loop": false,
|
||||||
"name": &"crack",
|
"name": &"crack",
|
||||||
"speed": 5.0
|
"speed": 1.2
|
||||||
}, {
|
}, {
|
||||||
"frames": [{
|
"frames": [{
|
||||||
"duration": 1.0,
|
"duration": 1.0,
|
||||||
|
|
@ -604,7 +607,7 @@ animations = [{
|
||||||
}, {
|
}, {
|
||||||
"frames": [{
|
"frames": [{
|
||||||
"duration": 1.0,
|
"duration": 1.0,
|
||||||
"texture": ExtResource("20_xoeau")
|
"texture": ExtResource("128_c81ko")
|
||||||
}],
|
}],
|
||||||
"loop": false,
|
"loop": false,
|
||||||
"name": &"default",
|
"name": &"default",
|
||||||
|
|
@ -710,7 +713,7 @@ font_color = Color(0.619608, 0, 1, 1)
|
||||||
[sub_resource type="LabelSettings" id="LabelSettings_7sc4i"]
|
[sub_resource type="LabelSettings" id="LabelSettings_7sc4i"]
|
||||||
font_size = 30
|
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")
|
script = ExtResource("1_e2o6t")
|
||||||
code_len = 1
|
code_len = 1
|
||||||
icon_container = NodePath("CanvasLayer/VBoxContainer/HFlowContainer/VBoxContainer/HBoxContainer")
|
icon_container = NodePath("CanvasLayer/VBoxContainer/HFlowContainer/VBoxContainer/HBoxContainer")
|
||||||
|
|
@ -731,6 +734,8 @@ round_label = NodePath("RoundDisplay/RoundLabel")
|
||||||
sound_player = NodePath("AudioStreamPlayer")
|
sound_player = NodePath("AudioStreamPlayer")
|
||||||
finish_screen = NodePath("CanvasLayer/FinishScreen")
|
finish_screen = NodePath("CanvasLayer/FinishScreen")
|
||||||
sam_sprite = NodePath("Sam")
|
sam_sprite = NodePath("Sam")
|
||||||
|
rock_sprite = NodePath("Rock")
|
||||||
|
statue_sprite = NodePath("Statue")
|
||||||
|
|
||||||
[node name="SamBackground1" type="Sprite2D" parent="."]
|
[node name="SamBackground1" type="Sprite2D" parent="."]
|
||||||
position = Vector2(576, 388)
|
position = Vector2(576, 388)
|
||||||
|
|
@ -740,21 +745,18 @@ texture = ExtResource("13_hb5m1")
|
||||||
[node name="Statue" type="AnimatedSprite2D" parent="."]
|
[node name="Statue" type="AnimatedSprite2D" parent="."]
|
||||||
position = Vector2(574, 376)
|
position = Vector2(574, 376)
|
||||||
sprite_frames = SubResource("SpriteFrames_k228o")
|
sprite_frames = SubResource("SpriteFrames_k228o")
|
||||||
frame = 57
|
|
||||||
frame_progress = 0.714894
|
|
||||||
|
|
||||||
[node name="Rock" type="AnimatedSprite2D" parent="."]
|
[node name="Rock" type="AnimatedSprite2D" parent="."]
|
||||||
position = Vector2(579, 349)
|
position = Vector2(579, 349)
|
||||||
sprite_frames = SubResource("SpriteFrames_lrvy0")
|
sprite_frames = SubResource("SpriteFrames_lrvy0")
|
||||||
animation = &"Idle"
|
animation = &"crack"
|
||||||
autoplay = "Idle"
|
autoplay = "Idle"
|
||||||
|
frame = 6
|
||||||
|
frame_progress = 1.0
|
||||||
|
|
||||||
[node name="Sam" type="AnimatedSprite2D" parent="."]
|
[node name="Sam" type="AnimatedSprite2D" parent="."]
|
||||||
position = Vector2(376, 435)
|
position = Vector2(376, 435)
|
||||||
sprite_frames = SubResource("SpriteFrames_lea4x")
|
sprite_frames = SubResource("SpriteFrames_lea4x")
|
||||||
animation = &"tan"
|
|
||||||
frame = 26
|
|
||||||
frame_progress = 1.0
|
|
||||||
|
|
||||||
[node name="Wall" type="Sprite2D" parent="."]
|
[node name="Wall" type="Sprite2D" parent="."]
|
||||||
position = Vector2(577, 598)
|
position = Vector2(577, 598)
|
||||||
|
|
|
||||||
8
logic.gd
8
logic.gd
|
|
@ -16,6 +16,8 @@ extends Node2D
|
||||||
@export var sound_player : AudioStreamPlayer
|
@export var sound_player : AudioStreamPlayer
|
||||||
@export var finish_screen : Control
|
@export var finish_screen : Control
|
||||||
@export var sam_sprite : AnimatedSprite2D
|
@export var sam_sprite : AnimatedSprite2D
|
||||||
|
@export var rock_sprite : AnimatedSprite2D
|
||||||
|
@export var statue_sprite : AnimatedSprite2D
|
||||||
var current_time : float = 5
|
var current_time : float = 5
|
||||||
var score : int = 0
|
var score : int = 0
|
||||||
var lives : int = 3
|
var lives : int = 3
|
||||||
|
|
@ -97,6 +99,7 @@ func start_round():
|
||||||
sound_player.stream = sounds["reveal"]
|
sound_player.stream = sounds["reveal"]
|
||||||
sound_player.play()
|
sound_player.play()
|
||||||
sam_sprite.play("default")
|
sam_sprite.play("default")
|
||||||
|
rock_sprite.play("crack")
|
||||||
|
|
||||||
#scroll_container.scroll_horizontal = 0
|
#scroll_container.scroll_horizontal = 0
|
||||||
pass
|
pass
|
||||||
|
|
@ -126,6 +129,9 @@ func process_input(direction : int):
|
||||||
func win_round():
|
func win_round():
|
||||||
#todo: bous for remaining time?
|
#todo: bous for remaining time?
|
||||||
sam_sprite.play("bow")
|
sam_sprite.play("bow")
|
||||||
|
rock_sprite.play("fall")
|
||||||
|
statue_sprite.show()
|
||||||
|
statue_sprite.frame += 1
|
||||||
sound_player.stream = sounds["roundSuccess"]
|
sound_player.stream = sounds["roundSuccess"]
|
||||||
sound_player.play()
|
sound_player.play()
|
||||||
gaming = false
|
gaming = false
|
||||||
|
|
@ -141,6 +147,8 @@ func win_round():
|
||||||
score += 100
|
score += 100
|
||||||
|
|
||||||
func lose_round():
|
func lose_round():
|
||||||
|
statue_sprite.hide()
|
||||||
|
rock_sprite.play("fall")
|
||||||
gaming = false
|
gaming = false
|
||||||
sam_sprite.play("tan")
|
sam_sprite.play("tan")
|
||||||
codepos = 0
|
codepos = 0
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue