Miner tile

This commit is contained in:
2025-08-29 16:59:59 +08:00
parent 7720e74a3d
commit 56cd4c2db2
9 changed files with 105 additions and 23 deletions

View File

@@ -38,10 +38,8 @@ Inventory = NodePath("../ResourceSystem")
position = Vector2(-496, -245)
ItemId = "stone"
Quantity = 64
Infinite = true
[node name="ItemPickup2" parent="." instance=ExtResource("7_is6ib")]
position = Vector2(-495, 5)
ItemId = "ore_iron"
Quantity = 16
Infinite = true

View File

@@ -4,18 +4,17 @@
[ext_resource type="Script" uid="uid://qgcue2doj2lf" path="res://Scripts/System/ItemPickup.cs" id="1_ps3kh"]
[sub_resource type="RectangleShape2D" id="RectangleShape2D_4weev"]
size = Vector2(160, 160)
size = Vector2(50, 50)
[node name="ItemPickup" type="Node2D"]
[node name="ItemPickup" type="Area2D"]
script = ExtResource("1_ps3kh")
MagnetRange = 96.0
[node name="Sprite2D" type="Sprite2D" parent="."]
scale = Vector2(0.05, 0.05)
texture = ExtResource("1_4weev")
[node name="Area2D" type="Area2D" parent="."]
[node name="CollisionShape2D" type="CollisionShape2D" parent="Area2D"]
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
shape = SubResource("RectangleShape2D_4weev")
[node name="Label" type="Label" parent="."]

View File

@@ -1,14 +1,15 @@
[gd_scene load_steps=4 format=3 uid="uid://cbu81slklwq3u"]
[gd_scene load_steps=5 format=3 uid="uid://cbu81slklwq3u"]
[ext_resource type="Script" uid="uid://dyubkyqtpcg3a" path="res://Scripts/Tiles/MinerTile.cs" id="1_mecoy"]
[ext_resource type="Texture2D" uid="uid://bt6xmcgrbb078" path="res://Scenes/Tiles/MinerTile.png" id="2_mecoy"]
[ext_resource type="PackedScene" uid="uid://xwkplaxmye3v" path="res://Scenes/System/ItemPickup.tscn" id="2_xhk0k"]
[sub_resource type="RectangleShape2D" id="RectangleShape2D_8o613"]
size = Vector2(54, 54)
[node name="MinerTile" type="StaticBody2D"]
scale = Vector2(3, 3)
script = ExtResource("1_mecoy")
ItemPickup = ExtResource("2_xhk0k")
TileId = "miner"
[node name="Sprite2D" type="Sprite2D" parent="."]