From 46556d864b9685c3b09a0038f5de83966fe7ff94 Mon Sep 17 00:00:00 2001 From: Daniel Weipert Date: Thu, 10 Aug 2023 11:48:05 +0200 Subject: Initial commit --- Scenes/Entities/Enemies/Enemy.tscn | 91 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 91 insertions(+) create mode 100644 Scenes/Entities/Enemies/Enemy.tscn (limited to 'Scenes/Entities/Enemies/Enemy.tscn') diff --git a/Scenes/Entities/Enemies/Enemy.tscn b/Scenes/Entities/Enemies/Enemy.tscn new file mode 100644 index 0000000..f78d0e5 --- /dev/null +++ b/Scenes/Entities/Enemies/Enemy.tscn @@ -0,0 +1,91 @@ +[gd_scene load_steps=9 format=3 uid="uid://dgyk1sged38ct"] + +[ext_resource type="Script" path="res://Scenes/Entities/Enemies/Enemy.gd" id="1_k16kd"] +[ext_resource type="Texture2D" uid="uid://5dk0c1kpvdgs" path="res://Assets/bomb_party_v4.png" id="2_cjc2s"] + +[sub_resource type="RectangleShape2D" id="RectangleShape2D_gw5gm"] +size = Vector2(11, 11.5) + +[sub_resource type="AtlasTexture" id="AtlasTexture_t7fm8"] +atlas = ExtResource("2_cjc2s") +region = Rect2(16, 224, 16, 16) + +[sub_resource type="AtlasTexture" id="AtlasTexture_pyhot"] +atlas = ExtResource("2_cjc2s") +region = Rect2(64, 224, 16, 16) + +[sub_resource type="AtlasTexture" id="AtlasTexture_aj58r"] +atlas = ExtResource("2_cjc2s") +region = Rect2(64, 224, 16, 16) + +[sub_resource type="AtlasTexture" id="AtlasTexture_spvfr"] +atlas = ExtResource("2_cjc2s") +region = Rect2(0, 224, 16, 16) + +[sub_resource type="SpriteFrames" id="SpriteFrames_t5cld"] +animations = [{ +"frames": [{ +"duration": 1.0, +"texture": SubResource("AtlasTexture_t7fm8") +}], +"loop": true, +"name": &"down", +"speed": 5.0 +}, { +"frames": [{ +"duration": 1.0, +"texture": SubResource("AtlasTexture_pyhot") +}], +"loop": true, +"name": &"left", +"speed": 5.0 +}, { +"frames": [{ +"duration": 1.0, +"texture": SubResource("AtlasTexture_aj58r") +}], +"loop": true, +"name": &"right", +"speed": 5.0 +}, { +"frames": [{ +"duration": 1.0, +"texture": SubResource("AtlasTexture_spvfr") +}], +"loop": true, +"name": &"up", +"speed": 5.0 +}] + +[node name="Enemy" type="CharacterBody2D"] +collision_layer = 16 +collision_mask = 62 +script = ExtResource("1_k16kd") + +[node name="CollisionShape2D" type="CollisionShape2D" parent="."] +position = Vector2(0.5, -0.25) +shape = SubResource("RectangleShape2D_gw5gm") +metadata/_edit_lock_ = true + +[node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="."] +sprite_frames = SubResource("SpriteFrames_t5cld") +animation = &"down" + +[node name="Label" type="Label" parent="."] +offset_left = -5.0 +offset_top = -20.0 +offset_right = 16.0 +offset_bottom = 6.0 +scale = Vector2(0.5, 0.5) +text = "hp" + +[node name="MovementTimer" type="Timer" parent="."] +wait_time = 3.0 +autostart = true + +[node name="InvincibilityTimer" type="Timer" parent="."] +wait_time = 1.5 +one_shot = true + +[connection signal="timeout" from="MovementTimer" to="." method="_on_movement_timer_timeout"] +[connection signal="timeout" from="InvincibilityTimer" to="." method="_on_invincibility_timer_timeout"] -- cgit v1.2.3