TLT Cam/Tile Fix & Level cleanup
This commit is contained in:
parent
480d487a05
commit
5ed7f0cf9a
@ -24,6 +24,7 @@ func _set_boundaries():
|
|||||||
# But it is also quite fickle
|
# But it is also quite fickle
|
||||||
var tilemap = get_node("../../TileMap")
|
var tilemap = get_node("../../TileMap")
|
||||||
var rect = tilemap.get_used_rect()
|
var rect = tilemap.get_used_rect()
|
||||||
|
print(tilemap.get_used_rect().size)
|
||||||
var cell_size = tilemap.cell_size
|
var cell_size = tilemap.cell_size
|
||||||
limit_right = rect.end.x * cell_size.x
|
limit_right = rect.end.x * cell_size.x
|
||||||
limit_left = rect.position.x * cell_size.x
|
limit_left = rect.position.x * cell_size.x
|
||||||
|
|||||||
@ -1,106 +0,0 @@
|
|||||||
[gd_scene load_steps=10 format=2]
|
|
||||||
|
|
||||||
[ext_resource path="res://assets/environment/blocks/24BlockBasic.png" type="Texture" id=1]
|
|
||||||
[ext_resource path="res://src/Actors/Blobby/Blobby.tscn" type="PackedScene" id=2]
|
|
||||||
[ext_resource path="res://assets/environment/blocks/random-innentile.png" type="Texture" id=3]
|
|
||||||
[ext_resource path="res://assets/environment/blocks/random-oberflache.png" type="Texture" id=4]
|
|
||||||
[ext_resource path="res://src/UserInterface/Buttons/UI.tscn" type="PackedScene" id=7]
|
|
||||||
|
|
||||||
[sub_resource type="ConvexPolygonShape2D" id=3]
|
|
||||||
points = PoolVector2Array( 0, 0, 24, 0, 24, 24, 0, 24 )
|
|
||||||
|
|
||||||
[sub_resource type="ConvexPolygonShape2D" id=4]
|
|
||||||
points = PoolVector2Array( 0, 0, 32, 0, 32, 32, 0, 32 )
|
|
||||||
|
|
||||||
[sub_resource type="ConvexPolygonShape2D" id=5]
|
|
||||||
points = PoolVector2Array( 0, 0, 32, 0, 32, 32, 0, 32 )
|
|
||||||
|
|
||||||
[sub_resource type="TileSet" id=2]
|
|
||||||
1/name = "24BlockBasic.png 1"
|
|
||||||
1/texture = ExtResource( 1 )
|
|
||||||
1/tex_offset = Vector2( 0, 0 )
|
|
||||||
1/modulate = Color( 1, 1, 1, 1 )
|
|
||||||
1/region = Rect2( 0, 0, 24, 24 )
|
|
||||||
1/tile_mode = 0
|
|
||||||
1/occluder_offset = Vector2( 0, 0 )
|
|
||||||
1/navigation_offset = Vector2( 0, 0 )
|
|
||||||
1/shape_offset = Vector2( 0, 0 )
|
|
||||||
1/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
|
|
||||||
1/shape = SubResource( 3 )
|
|
||||||
1/shape_one_way = false
|
|
||||||
1/shape_one_way_margin = 1.0
|
|
||||||
1/shapes = [ {
|
|
||||||
"autotile_coord": Vector2( 0, 0 ),
|
|
||||||
"one_way": false,
|
|
||||||
"one_way_margin": 1.0,
|
|
||||||
"shape": SubResource( 3 ),
|
|
||||||
"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 )
|
|
||||||
} ]
|
|
||||||
1/z_index = 0
|
|
||||||
2/name = "random-oberflache.png 2"
|
|
||||||
2/texture = ExtResource( 4 )
|
|
||||||
2/tex_offset = Vector2( 0, 0 )
|
|
||||||
2/modulate = Color( 1, 1, 1, 1 )
|
|
||||||
2/region = Rect2( 0, 0, 32, 32 )
|
|
||||||
2/tile_mode = 0
|
|
||||||
2/occluder_offset = Vector2( 0, 0 )
|
|
||||||
2/navigation_offset = Vector2( 0, 0 )
|
|
||||||
2/shape_offset = Vector2( 0, 0 )
|
|
||||||
2/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
|
|
||||||
2/shape = SubResource( 4 )
|
|
||||||
2/shape_one_way = false
|
|
||||||
2/shape_one_way_margin = 1.0
|
|
||||||
2/shapes = [ {
|
|
||||||
"autotile_coord": Vector2( 0, 0 ),
|
|
||||||
"one_way": false,
|
|
||||||
"one_way_margin": 1.0,
|
|
||||||
"shape": SubResource( 4 ),
|
|
||||||
"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 )
|
|
||||||
} ]
|
|
||||||
2/z_index = 0
|
|
||||||
3/name = "random-innentile.png 3"
|
|
||||||
3/texture = ExtResource( 3 )
|
|
||||||
3/tex_offset = Vector2( 0, 0 )
|
|
||||||
3/modulate = Color( 1, 1, 1, 1 )
|
|
||||||
3/region = Rect2( 0, 0, 32, 32 )
|
|
||||||
3/tile_mode = 0
|
|
||||||
3/occluder_offset = Vector2( 0, 0 )
|
|
||||||
3/navigation_offset = Vector2( 0, 0 )
|
|
||||||
3/shape_offset = Vector2( 0, 0 )
|
|
||||||
3/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
|
|
||||||
3/shape = SubResource( 5 )
|
|
||||||
3/shape_one_way = false
|
|
||||||
3/shape_one_way_margin = 1.0
|
|
||||||
3/shapes = [ {
|
|
||||||
"autotile_coord": Vector2( 0, 0 ),
|
|
||||||
"one_way": false,
|
|
||||||
"one_way_margin": 1.0,
|
|
||||||
"shape": SubResource( 5 ),
|
|
||||||
"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 )
|
|
||||||
} ]
|
|
||||||
3/z_index = 0
|
|
||||||
|
|
||||||
[node name="LevelTemplate" type="Node2D"]
|
|
||||||
__meta__ = {
|
|
||||||
"_edit_horizontal_guides_": [ 464.0 ],
|
|
||||||
"_edit_vertical_guides_": [ 2880.0 ]
|
|
||||||
}
|
|
||||||
|
|
||||||
[node name="UserInterface" parent="." instance=ExtResource( 7 )]
|
|
||||||
|
|
||||||
[node name="Blobby" parent="." instance=ExtResource( 2 )]
|
|
||||||
position = Vector2( -269.137, 1075.86 )
|
|
||||||
scale = Vector2( 0.878906, 0.936025 )
|
|
||||||
|
|
||||||
[node name="TileMap" type="TileMap" parent="."]
|
|
||||||
tile_set = SubResource( 2 )
|
|
||||||
cell_size = Vector2( 24, 24 )
|
|
||||||
cell_quadrant_size = 48
|
|
||||||
collision_use_kinematic = true
|
|
||||||
collision_friction = 0.0
|
|
||||||
collision_layer = 8
|
|
||||||
collision_mask = 8
|
|
||||||
format = 1
|
|
||||||
tile_data = PoolIntArray( 1834994, 536870913, 0, 1834995, 1, 0, 1834996, 1, 0, 1834997, 1, 0, 1834998, 1, 0, 1834999, 1, 0, 1835000, 1, 0, 1835001, 1, 0, 1835002, 1, 0, 1835003, 1, 0, 1835004, 1, 0, 1835005, 1, 0, 1835006, 1, 0, 1835007, 1, 0, 1769472, 1, 0, 1769473, 1, 0, 1769474, 1, 0, 1769475, 1, 0, 1769476, 1, 0, 1769477, 1, 0, 1769478, 1, 0, 1769479, 1, 0, 1769480, 1, 0, 1769481, 1, 0, 1769482, 1, 0, 1769483, 1, 0, 1769484, 1, 0, 1769485, 1, 0, 1769486, 1, 0, 1769487, 1, 0, 1900530, 536870913, 0, 1835023, 1, 0, 1966066, 536870913, 0, 1900559, 1, 0, 2031602, 536870913, 0, 2031615, 1, 0, 1966080, 1, 0, 1966081, 1, 0, 1966095, 1, 0, 2097138, 536870913, 0, 2097151, 1, 0, 2031616, 1, 0, 2031617, 1, 0, 2031631, 1, 0, 2162674, 1, 0, 2162687, 1, 0, 2097152, 1, 0, 2097153, 1, 0, 2097164, 1, 0, 2097165, 1, 0, 2097166, 1, 0, 2097167, 1, 0, 2228210, 1, 0, 2228223, 1, 0, 2162688, 1, 0, 2162689, 1, 0, 2162700, 1, 0, 2162701, 1, 0, 2162702, 1, 0, 2162703, 1, 0, 2293746, 1, 0, 2293759, 1, 0, 2228224, 1, 0, 2228225, 1, 0, 2228239, 1, 0, 2359282, 1, 0, 2293775, 1, 0, 2424818, 1, 0, 2359311, 1, 0, 2490354, 1, 0, 2424847, 1, 0, 2555890, 1, 0, 2555903, 1, 0, 2490368, 1, 0, 2490369, 1, 0, 2490383, 1, 0, 2621426, 1, 0, 2621439, 1, 0, 2555904, 1, 0, 2555905, 1, 0, 2555919, 1, 0, 2686962, 1, 0, 2686975, 1, 0, 2621440, 1, 0, 2621441, 1, 0, 2621455, 1, 0, 2752498, 1, 0, 2752511, 1, 0, 2686976, 1, 0, 2686977, 1, 0, 2686991, 1, 0, 2818034, 1, 0, 2818047, 1, 0, 2752512, 1, 0, 2752513, 1, 0, 2752527, 1, 0, 2883570, 1, 0, 2818063, 1, 0, 2949106, 1, 0, 2883599, 1, 0, 3014642, 1, 0, 3014643, 1, 0, 3014644, 1, 0, 3014645, 1, 0, 3014646, 1, 0, 3014647, 1, 0, 3014648, 1, 0, 3014649, 1, 0, 3014650, 1, 0, 3014651, 1, 0, 3014652, 1, 0, 3014653, 1, 0, 3014654, 1, 0, 3014655, 1, 0, 2949120, 1, 0, 2949121, 1, 0, 2949122, 1, 0, 2949123, 1, 0, 2949124, 1, 0, 2949125, 1, 0, 2949126, 1, 0, 2949127, 1, 0, 2949128, 1, 0, 2949129, 1, 0, 2949130, 1, 0, 2949131, 1, 0, 2949132, 1, 0, 2949133, 1, 0, 2949134, 1, 0, 2949135, 1, 0 )
|
|
||||||
|
|
||||||
[node name="Collectibles" type="Node" parent="."]
|
|
||||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -1,34 +0,0 @@
|
|||||||
[gd_scene load_steps=2 format=2]
|
|
||||||
|
|
||||||
[sub_resource type="GDScript" id=1]
|
|
||||||
script/source = "extends Node2D
|
|
||||||
|
|
||||||
onready var level_viewport_container = $ViewportContainer
|
|
||||||
onready var level_viewport = $ViewportContainer/Viewport
|
|
||||||
onready var screen_res = get_viewport().size
|
|
||||||
|
|
||||||
var scaling = Vector2()
|
|
||||||
|
|
||||||
# Called when the node enters the scene tree for the first time.
|
|
||||||
func _ready() -> void:
|
|
||||||
scaling = screen_res / level_viewport.size
|
|
||||||
print(screen_res)
|
|
||||||
print(level_viewport.size)
|
|
||||||
print(scaling)
|
|
||||||
level_viewport_container.rect_scale *= scaling"
|
|
||||||
|
|
||||||
[node name="ViewportTestLevel" type="Node2D"]
|
|
||||||
script = SubResource( 1 )
|
|
||||||
|
|
||||||
[node name="ViewportContainer" type="ViewportContainer" parent="."]
|
|
||||||
margin_right = 1920.0
|
|
||||||
margin_bottom = 1080.0
|
|
||||||
rect_scale = Vector2( 1.0037, 0.999187 )
|
|
||||||
|
|
||||||
[node name="Viewport" type="Viewport" parent="ViewportContainer"]
|
|
||||||
size = Vector2( 1920, 1080 )
|
|
||||||
handle_input_locally = false
|
|
||||||
disable_3d = true
|
|
||||||
usage = 0
|
|
||||||
render_direct_to_screen = true
|
|
||||||
render_target_update_mode = 3
|
|
||||||
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user