From 218748f67a6a6b35efc4a732ad11426d0f528709 Mon Sep 17 00:00:00 2001 From: Daniel Weipert Date: Wed, 12 Feb 2025 20:05:59 +0100 Subject: next commit --- stage/player_unit.tscn | 68 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 68 insertions(+) create mode 100644 stage/player_unit.tscn (limited to 'stage/player_unit.tscn') diff --git a/stage/player_unit.tscn b/stage/player_unit.tscn new file mode 100644 index 0000000..03bd904 --- /dev/null +++ b/stage/player_unit.tscn @@ -0,0 +1,68 @@ +[gd_scene load_steps=9 format=3 uid="uid://dqk3l801walv"] + +[ext_resource type="Texture2D" uid="uid://cb0rokx0rstj0" path="res://stage/assets/Halloween_PumpkinPatch_Bright.png" id="1_fl4ys"] +[ext_resource type="Script" uid="uid://bu1yqgv7omm6u" path="res://stage/player_unit.gd" id="1_ijjix"] +[ext_resource type="Script" uid="uid://drs01qvt6fnrx" path="res://area_2d.gd" id="3_tgb43"] + +[sub_resource type="AtlasTexture" id="AtlasTexture_fl4ys"] +atlas = ExtResource("1_fl4ys") +region = Rect2(0, 0, 128, 128) + +[sub_resource type="AtlasTexture" id="AtlasTexture_tgb43"] +atlas = ExtResource("1_fl4ys") +region = Rect2(128, 0, 128, 128) + +[sub_resource type="AtlasTexture" id="AtlasTexture_5ycgq"] +atlas = ExtResource("1_fl4ys") +region = Rect2(256, 0, 128, 128) + +[sub_resource type="SpriteFrames" id="SpriteFrames_5ycgq"] +animations = [{ +"frames": [{ +"duration": 20.0, +"texture": SubResource("AtlasTexture_fl4ys") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_tgb43") +}], +"loop": true, +"name": &"bottom_right", +"speed": 4.0 +}, { +"frames": [{ +"duration": 1.0, +"texture": SubResource("AtlasTexture_5ycgq") +}], +"loop": false, +"name": &"top_left", +"speed": 5.0 +}] + +[sub_resource type="RectangleShape2D" id="RectangleShape2D_fl4ys"] +size = Vector2(10, 8.875) + +[node name="PlayerUnit" type="Node2D"] +z_index = 2 +script = ExtResource("1_ijjix") + +[node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="."] +position = Vector2(0, -3) +scale = Vector2(0.125, 0.125) +sprite_frames = SubResource("SpriteFrames_5ycgq") +animation = &"bottom_right" + +[node name="Area2D" type="Area2D" parent="." node_paths=PackedStringArray("root_node")] +collision_layer = 4 +collision_mask = 0 +script = ExtResource("3_tgb43") +root_node = NodePath("..") + +[node name="CollisionShape2D" type="CollisionShape2D" parent="Area2D"] +position = Vector2(0, -1) +shape = SubResource("RectangleShape2D_fl4ys") + +[node name="Label" type="Label" parent="."] +offset_left = -5.0 +offset_right = 5.0 +offset_bottom = 23.0 +text = "0" -- cgit v1.2.3