From 09c63cd43225a989b7a856169517acc4dd6e52fe Mon Sep 17 00:00:00 2001 From: Rain Date: Sun, 12 May 2024 01:27:55 -0400 Subject: [PATCH] Added one more --- scenes/ship.tscn | 30 +++++++++++++++--------------- scripts/ship.gd | 1 + 2 files changed, 16 insertions(+), 15 deletions(-) diff --git a/scenes/ship.tscn b/scenes/ship.tscn index 4b999da..703fa78 100644 --- a/scenes/ship.tscn +++ b/scenes/ship.tscn @@ -5,6 +5,21 @@ [ext_resource type="AudioStream" uid="uid://cg6v2xvf4jkkv" path="res://assets/sfx/shoot.wav" id="3_kvryg"] [ext_resource type="AudioStream" uid="uid://cycpanck51dqd" path="res://assets/sfx/explosion.wav" id="4_gdodt"] +[sub_resource type="Animation" id="Animation_qfhr1"] +length = 0.001 +tracks/0/type = "value" +tracks/0/imported = false +tracks/0/enabled = true +tracks/0/path = NodePath("CrashSound:playing") +tracks/0/interp = 1 +tracks/0/loop_wrap = true +tracks/0/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 1, +"values": [false] +} + [sub_resource type="Animation" id="Animation_ctlro"] resource_name = "crash" tracks/0/type = "value" @@ -34,21 +49,6 @@ tracks/1/keys = { }] } -[sub_resource type="Animation" id="Animation_qfhr1"] -length = 0.001 -tracks/0/type = "value" -tracks/0/imported = false -tracks/0/enabled = true -tracks/0/path = NodePath("CrashSound:playing") -tracks/0/interp = 1 -tracks/0/loop_wrap = true -tracks/0/keys = { -"times": PackedFloat32Array(0), -"transitions": PackedFloat32Array(1), -"update": 1, -"values": [false] -} - [sub_resource type="AnimationLibrary" id="AnimationLibrary_3jmf3"] _data = { "RESET": SubResource("Animation_qfhr1"), diff --git a/scripts/ship.gd b/scripts/ship.gd index a5c97f3..91cbcc7 100644 --- a/scripts/ship.gd +++ b/scripts/ship.gd @@ -47,6 +47,7 @@ func fire_gun(pos : Vector2, rot : float) -> void: func crash(): # TODO: Maybe emit a signal that the main game node listens for "game over" state + # TODO: Make some kind of crash animation or crashed sprite $AnimationPlayer.play("crash")