From c4b2d6ff94278e6eab1cc7fc3467874b37684404 Mon Sep 17 00:00:00 2001 From: gdz Date: Fri, 26 Dec 2025 23:11:22 +0100 Subject: [PATCH] New unit base scene. This unit is able to be selected and moves along a path working together with the cursor. --- Scenes/Unit/unit_base.tscn | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 Scenes/Unit/unit_base.tscn diff --git a/Scenes/Unit/unit_base.tscn b/Scenes/Unit/unit_base.tscn new file mode 100644 index 0000000..31fdae3 --- /dev/null +++ b/Scenes/Unit/unit_base.tscn @@ -0,0 +1,24 @@ +[gd_scene load_steps=4 format=3 uid="uid://ct0rg5jelnb3x"] + +[ext_resource type="Script" uid="uid://dm40sxvvnbdrn" path="res://Scenes/Main/player.gd" id="1_bo1wp"] + +[sub_resource type="PlaceholderTexture2D" id="PlaceholderTexture2D_imbg2"] +size = Vector2(16, 16) + +[sub_resource type="RectangleShape2D" id="RectangleShape2D_hfg1r"] +size = Vector2(32, 32) + +[node name="BaseUnit" type="CharacterBody2D"] +script = ExtResource("1_bo1wp") +currentCell = Vector2i(20, 20) + +[node name="PathPrev" type="Line2D" parent="."] +top_level = true +width = 2.0 +default_color = Color(0, 0.3372549, 0.3372549, 1) + +[node name="Sprite2D" type="Sprite2D" parent="."] +texture = SubResource("PlaceholderTexture2D_imbg2") + +[node name="CollisionShape2D" type="CollisionShape2D" parent="."] +shape = SubResource("RectangleShape2D_hfg1r")