feat: reorganized logic + camera

This commit is contained in:
2025-11-12 15:39:40 +01:00
parent bee8cdeeef
commit fa6e5d9582
12 changed files with 124 additions and 100 deletions

View File

@@ -1,10 +1,11 @@
[gd_scene load_steps=8 format=3 uid="uid://b6xi32r3co6md"]
[gd_scene load_steps=9 format=3 uid="uid://b6xi32r3co6md"]
[ext_resource type="Script" uid="uid://by3d3t5ymxl3m" path="res://grid.gd" id="1_bghhw"]
[ext_resource type="Script" uid="uid://b6ll30b7xtwal" path="res://ant.gd" id="1_ebq2e"]
[ext_resource type="Texture2D" uid="uid://bnfy5vx72ux33" path="res://assets/ant.png" id="3_sle3t"]
[ext_resource type="Texture2D" uid="uid://d0v1qlkltasln" path="res://assets/tiles.png" id="4_fqc2p"]
[ext_resource type="Texture2D" uid="uid://ykvioy4g357o" path="res://assets/ant.png" id="3_sle3t"]
[ext_resource type="Texture2D" uid="uid://b8dilj6w2vq2l" path="res://assets/tiles.png" id="4_fqc2p"]
[ext_resource type="Script" uid="uid://cqxfmo3hixad1" path="res://tile_map_layer.gd" id="5_fqc2p"]
[ext_resource type="Script" uid="uid://bqjbnbfd7jlob" path="res://camera.gd" id="6_g2qvd"]
[sub_resource type="TileSetAtlasSource" id="TileSetAtlasSource_g2qvd"]
texture = ExtResource("4_fqc2p")
@@ -17,6 +18,8 @@ texture_region_size = Vector2i(32, 32)
1:2/0 = 0
0:3/0 = 0
1:3/0 = 0
0:4/0 = 0
0:5/0 = 0
[sub_resource type="TileSet" id="TileSet_05i0m"]
tile_shape = 3
@@ -25,8 +28,8 @@ sources/0 = SubResource("TileSetAtlasSource_g2qvd")
[node name="Grid" type="Node2D" node_paths=PackedStringArray("ant", "tiles")]
script = ExtResource("1_bghhw")
speed = 60.0
ant = NodePath("ant")
stepSize = 1.0
ant = NodePath("Ant")
tiles = NodePath("TileMapLayer")
[node name="TileMapLayer" type="TileMapLayer" parent="."]
@@ -34,13 +37,14 @@ tile_set = SubResource("TileSet_05i0m")
collision_enabled = false
script = ExtResource("5_fqc2p")
[node name="Camera2D" type="Camera2D" parent="TileMapLayer"]
position = Vector2(0, -8)
scale = Vector2(0.8, 0.8)
[node name="ant" type="Sprite2D" parent="."]
[node name="Ant" type="Sprite2D" parent="."]
position = Vector2(-15.999998, 14.999998)
scale = Vector2(0.8, 0.8)
texture = ExtResource("3_sle3t")
vframes = 6
script = ExtResource("1_ebq2e")
[node name="Camera" type="Camera2D" parent="."]
position = Vector2(-3.8146973e-06, -8)
scale = Vector2(0.79999983, 0.79999983)
script = ExtResource("6_g2qvd")