Comets.gd/scenes/ship.tscn

42 lines
1.2 KiB
Plaintext

[gd_scene load_steps=4 format=3 uid="uid://cbo47ftx0vcro"]
[ext_resource type="Script" path="res://scripts/ship.gd" id="1_japvq"]
[ext_resource type="Texture2D" uid="uid://qcnuvee2jcp0" path="res://assets/img/ship.png" id="1_ymcdl"]
[sub_resource type="RectangleShape2D" id="RectangleShape2D_115lu"]
size = Vector2(35, 35)
[node name="Ship" type="RigidBody2D" groups=["ship"]]
collision_mask = 2
gravity_scale = 0.0
linear_damp = 1.0
angular_damp = 2.0
script = ExtResource("1_japvq")
engine_power = null
spin_power = null
[node name="Sprite2D" type="Sprite2D" parent="."]
texture = ExtResource("1_ymcdl")
[node name="CPUParticles2D" type="CPUParticles2D" parent="Sprite2D"]
position = Vector2(-16, 0)
emission_shape = 1
emission_sphere_radius = 3.0
spread = 105.9
gravity = Vector2(0, 0)
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
rotation = 1.54049
shape = SubResource("RectangleShape2D_115lu")
[node name="ShotCooldown" type="Timer" parent="."]
wait_time = 2.0
one_shot = true
[node name="Gun" type="Marker2D" parent="."]
[node name="Projectiles" type="Node2D" parent="."]
position = Vector2(-33, 0)
[connection signal="timeout" from="ShotCooldown" to="." method="_on_shot_cooldown_timeout"]