new enemy work
This commit is contained in:
parent
783fc7c877
commit
6825cd59c9
12 changed files with 241 additions and 0 deletions
8
objects/enemies/kith/kith.gd
Normal file
8
objects/enemies/kith/kith.gd
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
extends Enemy
|
||||
|
||||
func _ready() -> void:
|
||||
pass
|
||||
|
||||
|
||||
func _on_timer_timeout() -> void:
|
||||
shoot()
|
||||
1
objects/enemies/kith/kith.gd.uid
Normal file
1
objects/enemies/kith/kith.gd.uid
Normal file
|
|
@ -0,0 +1 @@
|
|||
uid://b2j71opc4k4v2
|
||||
67
objects/enemies/kith/kith.tscn
Normal file
67
objects/enemies/kith/kith.tscn
Normal file
|
|
@ -0,0 +1,67 @@
|
|||
[gd_scene load_steps=6 format=3 uid="uid://cyn42vceeg8n3"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://b2j71opc4k4v2" path="res://objects/enemies/kith/kith.gd" id="1_odjmv"]
|
||||
[ext_resource type="Texture2D" uid="uid://de27ah8re36mp" path="res://assets/graphics/kith.png" id="1_oqwi1"]
|
||||
|
||||
[sub_resource type="Animation" id="Animation_jq7tw"]
|
||||
length = 0.001
|
||||
tracks/0/type = "value"
|
||||
tracks/0/imported = false
|
||||
tracks/0/enabled = true
|
||||
tracks/0/path = NodePath("Sprite2D:flip_h")
|
||||
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_odjmv"]
|
||||
resource_name = "move"
|
||||
length = 0.3
|
||||
loop_mode = 1
|
||||
step = 0.0333333
|
||||
tracks/0/type = "value"
|
||||
tracks/0/imported = false
|
||||
tracks/0/enabled = true
|
||||
tracks/0/path = NodePath("Sprite2D:flip_h")
|
||||
tracks/0/interp = 1
|
||||
tracks/0/loop_wrap = true
|
||||
tracks/0/keys = {
|
||||
"times": PackedFloat32Array(0, 0.166667),
|
||||
"transitions": PackedFloat32Array(1, 1),
|
||||
"update": 1,
|
||||
"values": [false, true]
|
||||
}
|
||||
|
||||
[sub_resource type="AnimationLibrary" id="AnimationLibrary_8mwcc"]
|
||||
_data = {
|
||||
&"RESET": SubResource("Animation_jq7tw"),
|
||||
&"move": SubResource("Animation_odjmv")
|
||||
}
|
||||
|
||||
[node name="Kith" type="Node2D"]
|
||||
script = ExtResource("1_odjmv")
|
||||
shoot_speed = Vector2(0, -100)
|
||||
shoot_variance = Vector2(0, 30)
|
||||
metadata/_custom_type_script = "uid://d2k5tlvpqokqr"
|
||||
|
||||
[node name="Sprite2D" type="Sprite2D" parent="."]
|
||||
texture = ExtResource("1_oqwi1")
|
||||
|
||||
[node name="AnimationPlayer" type="AnimationPlayer" parent="."]
|
||||
libraries = {
|
||||
&"": SubResource("AnimationLibrary_8mwcc")
|
||||
}
|
||||
autoplay = "move"
|
||||
|
||||
[node name="Marker2D" type="Marker2D" parent="."]
|
||||
unique_name_in_owner = true
|
||||
position = Vector2(0, -6)
|
||||
|
||||
[node name="Timer" type="Timer" parent="."]
|
||||
autostart = true
|
||||
|
||||
[connection signal="timeout" from="Timer" to="." method="_on_timer_timeout"]
|
||||
Loading…
Add table
Add a link
Reference in a new issue