select card sound

main
Just Dzhi 2023-10-02 19:52:58 +04:00
parent 8fcb652f17
commit 100d2affca
4 changed files with 24 additions and 11 deletions

View File

@ -3,6 +3,7 @@
[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]

View File

@ -1,4 +1,4 @@
[gd_scene load_steps=30 format=2]
[gd_scene load_steps=31 format=2]
[ext_resource path="res://src/scenes/menu/background/background.png" type="Texture" id=1]
[ext_resource path="res://src/scenes/game/sprites/background_houses.png" type="Texture" id=2]
@ -8,6 +8,7 @@
[ext_resource path="res://src/scenes/game/sprites/health/health.png" type="Texture" id=6]
[ext_resource path="res://src/scenes/game/sprites/cast_time.png" type="Texture" id=7]
[ext_resource path="res://src/scenes/game/card_placeholder.gd" type="Script" id=8]
[ext_resource path="res://res/sounds/card_select/card_select.ogg" type="AudioStream" id=9]
[ext_resource path="res://src/scenes/game/sprites/player_icon.png" type="Texture" id=10]
[ext_resource path="res://src/scenes/game/game.gd" type="Script" id=11]
[ext_resource path="res://src/scenes/game/sprites/ui_background.png" type="Texture" id=12]
@ -29,14 +30,14 @@ extents = Vector2( 140, 10.125 )
atlas = ExtResource( 6 )
region = Rect2( 155, 0, 31, 11 )
[sub_resource type="AtlasTexture" id=8]
atlas = ExtResource( 6 )
region = Rect2( 124, 0, 31, 11 )
[sub_resource type="AtlasTexture" id=9]
atlas = ExtResource( 6 )
region = Rect2( 93, 0, 31, 11 )
[sub_resource type="AtlasTexture" id=8]
atlas = ExtResource( 6 )
region = Rect2( 124, 0, 31, 11 )
[sub_resource type="AtlasTexture" id=10]
atlas = ExtResource( 6 )
region = Rect2( 62, 0, 31, 11 )
@ -51,10 +52,10 @@ region = Rect2( 0, 0, 31, 11 )
[sub_resource type="SpriteFrames" id=4]
animations = [ {
"frames": [ SubResource( 7 ), SubResource( 8 ), SubResource( 9 ), SubResource( 10 ), SubResource( 11 ), SubResource( 12 ) ],
"loop": true,
"name": "default",
"speed": 5.0
"frames": [ SubResource( 7 ), SubResource( 9 ), SubResource( 8 ), SubResource( 10 ), SubResource( 11 ), SubResource( 12 ) ],
"loop": false,
"name": "idle",
"speed": 0.0
} ]
[sub_resource type="Animation" id=5]
@ -218,6 +219,7 @@ margin_bottom = 40.0
[node name="HealthSprite" type="AnimatedSprite" parent="UIWrapper/UI/Left/Health"]
position = Vector2( 52, 156 )
frames = SubResource( 4 )
animation = "idle"
centered = false
[node name="PlayerIcon" type="Sprite" parent="UIWrapper/UI/Left"]
@ -295,6 +297,9 @@ script = ExtResource( 8 )
[node name="Card" parent="UIWrapper/UI/Cards/LeftPlaceholder" instance=ExtResource( 18 )]
[node name="AudioCardSelect" type="AudioStreamPlayer" parent="UIWrapper/UI/Cards/LeftPlaceholder"]
stream = ExtResource( 9 )
[node name="CenterPlaceholder" type="Control" parent="UIWrapper/UI/Cards" groups=["card_placeholder"]]
margin_left = 113.0
margin_top = 8.0
@ -306,6 +311,9 @@ id = 1
[node name="Card" parent="UIWrapper/UI/Cards/CenterPlaceholder" instance=ExtResource( 18 )]
[node name="AudioCardSelect" type="AudioStreamPlayer" parent="UIWrapper/UI/Cards/CenterPlaceholder"]
stream = ExtResource( 9 )
[node name="RightPlaceholder" type="Control" parent="UIWrapper/UI/Cards" groups=["card_placeholder"]]
margin_left = 218.0
margin_top = 8.0
@ -317,6 +325,9 @@ id = 2
[node name="Card" parent="UIWrapper/UI/Cards/RightPlaceholder" instance=ExtResource( 18 )]
[node name="AudioCardSelect" type="AudioStreamPlayer" parent="UIWrapper/UI/Cards/RightPlaceholder"]
stream = ExtResource( 9 )
[node name="Gameover" type="Control" parent="UIWrapper/UI"]
margin_right = 320.0
margin_bottom = 180.0

View File

@ -15,4 +15,5 @@ func _ready():
func select_hover(node):
game.selected_card = id
$AudioCardSelect.play()

View File

@ -14,7 +14,7 @@ var mob_threshold = [5, 7, 10, 7]
func _ready():
Global.playing = true
Global.play_time = .0
Global.play_time = 55.0
Global.health = 5
Global.add_health(0)