added y-sorting

This commit is contained in:
2023-02-10 19:12:39 +01:00
parent dcd10e4a2e
commit eee3897b85
7 changed files with 24 additions and 38 deletions

View File

@@ -1,11 +0,0 @@
[gd_scene load_steps=3 format=3 uid="uid://2867aayx0skw"]
[ext_resource type="PackedScene" uid="uid://bxaheg7l4h1ip" path="res://scenes/player.tscn" id="1_p5d84"]
[ext_resource type="PackedScene" uid="uid://cld0jncmsk1bj" path="res://scenes/worlds/first_world.tscn" id="2_x8nyb"]
[node name="main" type="Node2D"]
[node name="first_world" parent="." instance=ExtResource("2_x8nyb")]
[node name="player" parent="." instance=ExtResource("1_p5d84")]
playerName = "Yannik"

20
scenes/overworld.tscn Normal file
View File

@@ -0,0 +1,20 @@
[gd_scene load_steps=3 format=3 uid="uid://2867aayx0skw"]
[ext_resource type="TileSet" uid="uid://txl24cadn8t4" path="res://tilesets/main_foreground.tres" id="1_tknx3"]
[ext_resource type="PackedScene" uid="uid://bxaheg7l4h1ip" path="res://scenes/player.tscn" id="2_0skrb"]
[node name="overworld" type="Node2D"]
y_sort_enabled = true
metadata/_edit_lock_ = true
[node name="tilemap" type="TileMap" parent="."]
y_sort_enabled = true
tile_set = ExtResource("1_tknx3")
cell_quadrant_size = 64
format = 2
layer_0/tile_data = PackedInt32Array(1, 0, 0, 65533, 0, 0, -3, 0, 0, -65535, 0, 0, -131070, 1, 131072, -131067, 1, 131072, -131074, 1, 131072, -262141, 1, 131072, 4, 1, 131072, -131078, 2, 65536)
metadata/_edit_lock_ = true
[node name="player" parent="." instance=ExtResource("2_0skrb")]
playerName = "Yannik"
metadata/_edit_lock_ = true

View File

@@ -90,7 +90,6 @@ height = 45.968
[node name="player" type="CharacterBody2D"]
process_mode = 1
y_sort_enabled = true
position = Vector2(-1, 0)
floor_stop_on_slope = false
script = ExtResource("1_qehox")

View File

@@ -7,7 +7,7 @@
size = Vector2(64, 17.25)
[sub_resource type="RectangleShape2D" id="RectangleShape2D_d78tr"]
size = Vector2(64, 58)
size = Vector2(64, 64)
[node name="dialogdebug_cupcake" type="StaticBody2D"]
@@ -15,11 +15,10 @@ size = Vector2(64, 58)
texture = ExtResource("1_imilm")
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
position = Vector2(0, 20.625)
position = Vector2(0, 23)
shape = SubResource("RectangleShape2D_pchpi")
[node name="dialog_trigger_area" parent="." instance=ExtResource("2_blpmd")]
position = Vector2(3, 0)
file = "res://assets/lang/en/dialogue/npcs/villager_normal.json"
title = "Debug cupcake"

View File

@@ -1,21 +0,0 @@
[gd_scene load_steps=3 format=3 uid="uid://cld0jncmsk1bj"]
[ext_resource type="TileSet" uid="uid://bduttqwwbt6lq" path="res://tilesets/main_background.tres" id="1_a172k"]
[ext_resource type="TileSet" uid="uid://txl24cadn8t4" path="res://tilesets/main_foreground.tres" id="2_kvjhj"]
[node name="first_world" type="Node2D"]
[node name="background" type="TileMap" parent="."]
tile_set = ExtResource("1_a172k")
cell_quadrant_size = 128
format = 2
layer_0/tile_data = PackedInt32Array(-65535, 65536, 1, -131071, 65536, 1, -65536, 65536, 1, -131072, 65536, 1, -1, 65536, 1, -65537, 65536, 1, 3, 131072, 1, -65533, 131072, 1, -131069, 131072, 1, 2, 65536, 1, -65534, 65536, 1, -131070, 65536, 1, 1, 65536, 1, 0, 65536, 1, 65535, 65536, 1, 65534, 65536, 1, -2, 65536, 1, -65538, 65536, 1, -65540, 65536, 1, -65541, 65536, 1, -5, 65536, 1, -6, 0, 1, -65542, 0, 1, 65530, 0, 1, 65531, 65536, 1, -4, 65536, 1, 65532, 65536, 1, -196605, 131072, 0, -196606, 65536, 0, -196607, 65536, 0, -196608, 65536, 0, -131073, 65536, 0, -131074, 65536, 0, 131070, 65536, 2, 131071, 65536, 2, 65536, 65536, 2, 65537, 65536, 2, 65538, 65536, 2, 65539, 131072, 2, 131069, 65536, 2, 65533, 65536, 1, -3, 65536, 1, -65539, 65536, 1, -131075, 65536, 0, -131076, 65536, 0, -131077, 65536, 0, -131078, 0, 0, 131068, 65536, 2, 131067, 65536, 2, 131066, 0, 2)
[node name="foreground" type="TileMap" parent="."]
y_sort_enabled = true
tile_set = ExtResource("2_kvjhj")
cell_quadrant_size = 64
format = 2
layer_0/y_sort_enabled = true
layer_0/y_sort_origin = 40
layer_0/tile_data = PackedInt32Array(1, 0, 0, 65533, 0, 0, -3, 0, 0, -65535, 0, 0, 65529, 1, 65536, 65541, 1, 65536, -196605, 1, 65536, 196603, 1, 65536, -196603, 1, 65536, -196600, 1, 65536, -131086, 2, 65536)