mirror of
https://github.com/Yadciel1/2048-Shooter.git
synced 2024-12-27 07:17:03 +01:00
89 lines
2.0 KiB
Plaintext
89 lines
2.0 KiB
Plaintext
|
[gd_scene load_steps=5 format=2]
|
||
|
|
||
|
[ext_resource path="res://assets/Tank Town V2.png" type="Texture" id=1]
|
||
|
|
||
|
[sub_resource type="GDScript" id=3]
|
||
|
script/source = "extends Node2D
|
||
|
|
||
|
|
||
|
# Declare member variables here. Examples:
|
||
|
# var a = 2
|
||
|
# var b = \"text\"
|
||
|
|
||
|
|
||
|
# Called when the node enters the scene tree for the first time.
|
||
|
func _ready():
|
||
|
pass # Replace with function body.
|
||
|
|
||
|
|
||
|
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
||
|
#func _process(delta):
|
||
|
# pass
|
||
|
func play():
|
||
|
$AnimationPlayer.play(\"Hit\")
|
||
|
pass
|
||
|
|
||
|
func _on_AnimationPlayer_animation_finished(anim_name):
|
||
|
queue_free()
|
||
|
pass # Replace with function body.
|
||
|
"
|
||
|
|
||
|
[sub_resource type="Animation" id=1]
|
||
|
resource_name = "Hit"
|
||
|
length = 0.3
|
||
|
tracks/0/type = "value"
|
||
|
tracks/0/path = NodePath("Sprite:frame")
|
||
|
tracks/0/interp = 1
|
||
|
tracks/0/loop_wrap = true
|
||
|
tracks/0/imported = false
|
||
|
tracks/0/enabled = true
|
||
|
tracks/0/keys = {
|
||
|
"times": PoolRealArray( 0, 0.3 ),
|
||
|
"transitions": PoolRealArray( 1, 1 ),
|
||
|
"update": 0,
|
||
|
"values": [ 70, 75 ]
|
||
|
}
|
||
|
|
||
|
[sub_resource type="Animation" id=2]
|
||
|
length = 0.001
|
||
|
tracks/0/type = "value"
|
||
|
tracks/0/path = NodePath("AnimationPlayer:reset_on_save")
|
||
|
tracks/0/interp = 1
|
||
|
tracks/0/loop_wrap = true
|
||
|
tracks/0/imported = false
|
||
|
tracks/0/enabled = true
|
||
|
tracks/0/keys = {
|
||
|
"times": PoolRealArray( 0 ),
|
||
|
"transitions": PoolRealArray( 1 ),
|
||
|
"update": 0,
|
||
|
"values": [ true ]
|
||
|
}
|
||
|
tracks/1/type = "value"
|
||
|
tracks/1/path = NodePath("Sprite:frame")
|
||
|
tracks/1/interp = 1
|
||
|
tracks/1/loop_wrap = true
|
||
|
tracks/1/imported = false
|
||
|
tracks/1/enabled = true
|
||
|
tracks/1/keys = {
|
||
|
"times": PoolRealArray( 0 ),
|
||
|
"transitions": PoolRealArray( 1 ),
|
||
|
"update": 0,
|
||
|
"values": [ 70 ]
|
||
|
}
|
||
|
|
||
|
[node name="bullet_hit" type="Node2D"]
|
||
|
script = SubResource( 3 )
|
||
|
|
||
|
[node name="Sprite" type="Sprite" parent="."]
|
||
|
scale = Vector2( 2, 2 )
|
||
|
texture = ExtResource( 1 )
|
||
|
hframes = 10
|
||
|
vframes = 12
|
||
|
frame = 70
|
||
|
|
||
|
[node name="AnimationPlayer" type="AnimationPlayer" parent="."]
|
||
|
anims/Hit = SubResource( 1 )
|
||
|
anims/RESET = SubResource( 2 )
|
||
|
|
||
|
[connection signal="animation_finished" from="AnimationPlayer" to="." method="_on_AnimationPlayer_animation_finished"]
|