removed window management and added coordinate debug key
This commit is contained in:
BIN
assets/textures/debugitem_one64.png
Normal file
BIN
assets/textures/debugitem_one64.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.5 KiB |
35
assets/textures/debugitem_one64.png.import
Normal file
35
assets/textures/debugitem_one64.png.import
Normal file
@@ -0,0 +1,35 @@
|
|||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="texture"
|
||||||
|
type="StreamTexture"
|
||||||
|
path="res://.import/debugitem_one64.png-1ec80dd262e8a6ed96484253d42fdc95.stex"
|
||||||
|
metadata={
|
||||||
|
"vram_texture": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://assets/textures/debugitem_one64.png"
|
||||||
|
dest_files=[ "res://.import/debugitem_one64.png-1ec80dd262e8a6ed96484253d42fdc95.stex" ]
|
||||||
|
|
||||||
|
[params]
|
||||||
|
|
||||||
|
compress/mode=0
|
||||||
|
compress/lossy_quality=0.7
|
||||||
|
compress/hdr_mode=0
|
||||||
|
compress/bptc_ldr=0
|
||||||
|
compress/normal_map=0
|
||||||
|
flags/repeat=0
|
||||||
|
flags/filter=true
|
||||||
|
flags/mipmaps=false
|
||||||
|
flags/anisotropic=false
|
||||||
|
flags/srgb=2
|
||||||
|
process/fix_alpha_border=true
|
||||||
|
process/premult_alpha=false
|
||||||
|
process/HDR_as_SRGB=false
|
||||||
|
process/invert_color=false
|
||||||
|
process/normal_map_invert_y=false
|
||||||
|
stream=false
|
||||||
|
size_limit=0
|
||||||
|
detect_3d=true
|
||||||
|
svg/scale=1.0
|
@@ -3,7 +3,7 @@
|
|||||||
[ext_resource path="res://tilesets/Background.tres" type="TileSet" id=1]
|
[ext_resource path="res://tilesets/Background.tres" type="TileSet" id=1]
|
||||||
[ext_resource path="res://tilesets/foreground_test.tres" type="TileSet" id=2]
|
[ext_resource path="res://tilesets/foreground_test.tres" type="TileSet" id=2]
|
||||||
|
|
||||||
[node name="Background" type="TileMap"]
|
[node name="World" type="TileMap"]
|
||||||
tile_set = ExtResource( 1 )
|
tile_set = ExtResource( 1 )
|
||||||
cell_size = Vector2( 512, 512 )
|
cell_size = Vector2( 512, 512 )
|
||||||
cell_quadrant_size = 128
|
cell_quadrant_size = 128
|
||||||
@@ -13,4 +13,4 @@ tile_data = PoolIntArray( -196612, 0, 0, -196611, 0, 1, -196610, 0, 1, -196609,
|
|||||||
[node name="Foreground" type="TileMap" parent="."]
|
[node name="Foreground" type="TileMap" parent="."]
|
||||||
tile_set = ExtResource( 2 )
|
tile_set = ExtResource( 2 )
|
||||||
format = 1
|
format = 1
|
||||||
tile_data = PoolIntArray( -1769494, 0, 0, -1769493, 0, 0, -1703959, 0, 0, -1703958, 0, 0, -1703957, 0, 0, -1703956, 0, 0, -1638426, 0, 0, -1638425, 0, 0, -1638424, 0, 0, -1638423, 0, 0, -1638420, 0, 0, -1572891, 0, 0, -1572890, 0, 0, -1572888, 0, 0, -1572884, 0, 0, -1507355, 0, 0, -1507349, 0, 0, -1507348, 0, 0, -1441819, 0, 0, -1441814, 0, 0, -1441813, 0, 0, -1376283, 0, 0, -1376282, 0, 0, -1376278, 0, 0, -1310746, 0, 0, -1310745, 0, 0, -1310743, 0, 0, -1310742, 0, 0, -1245209, 0, 0, -1245208, 0, 0, -1245207, 0, 0, -458775, 0, 0, -393239, 0, 0, -393235, 0, 0, -327708, 0, 0, -327707, 0, 0, -327700, 0, 0, -327699, 0, 0, -262168, 0, 0, -262167, 0, 0, -262165, 0, 0, -262164, 0, 0, -196633, 0, 0, -196632, 0, 0, -196631, 0, 0, -131097, 0, 0, -131096, 0, 0, -131095, 0, 0, -131094, 0, 0, -196595, 0, 0, -196586, 0, 0, -65561, 0, 0, -65560, 0, 0, -65559, 0, 0, -65558, 0, 0, -131059, 0, 0, -131056, 0, 0, -131055, 0, 0, -131050, 0, 0, -29, 0, 0, -28, 0, 0, -27, 0, 0, -20, 0, 0, -65524, 0, 0, -65520, 0, 0, 65507, 0, 0, 65511, 0, 0, 65516, 0, 0, 65517, 0, 0, 12, 0, 0, 13, 0, 0, 14, 0, 0, 15, 0, 0, 16, 0, 0, 21, 0, 0, 131047, 0, 0, 131048, 0, 0, 131053, 0, 0, 65547, 0, 0, 65548, 0, 0, 65550, 0, 0, 65551, 0, 0, 65557, 0, 0, 131083, 0, 0, 131085, 0, 0, 131092, 0, 0, 196627, 0, 0, 196628, 0, 0, 327678, 0, 0, 327679, 0, 0, 262144, 0, 0, 262145, 0, 0, 393193, 0, 0, 393194, 0, 0, 393214, 0, 0, 327680, 0, 0, 327681, 0, 0, 327682, 0, 0, 458729, 0, 0, 458730, 0, 0, 458734, 0, 0, 458735, 0, 0, 458736, 0, 0, 458750, 0, 0, 458751, 0, 0, 393216, 0, 0, 393217, 0, 0, 393218, 0, 0, 524265, 0, 0, 524266, 0, 0, 524269, 0, 0, 524270, 0, 0, 524271, 0, 0, 524272, 0, 0, 524273, 0, 0, 524286, 0, 0, 524287, 0, 0, 458752, 0, 0, 458753, 0, 0, 458754, 0, 0, 589805, 0, 0, 589806, 0, 0, 589807, 0, 0, 589808, 0, 0, 589809, 0, 0, 589822, 0, 0, 524289, 0, 0, 655342, 0, 0, 655343, 0, 0, 655344, 0, 0, 655358, 0, 0, 589825, 0, 0, 786408, 0, 0, 851943, 0, 0, 851944, 0, 0, 851951, 0, 0, 851952, 0, 0, 917478, 0, 0, 917479, 0, 0, 917480, 0, 0, 917486, 0, 0, 917487, 0, 0, 917488, 0, 0, 851983, 0, 0, 851984, 0, 0, 851985, 0, 0, 851986, 0, 0, 851987, 0, 0, 851988, 0, 0, 851989, 0, 0, 851990, 0, 0, 851991, 0, 0, 851992, 0, 0, 851993, 0, 0, 851994, 0, 0, 983015, 0, 0, 983016, 0, 0, 983017, 0, 0, 983018, 0, 0, 983019, 0, 0, 983020, 0, 0, 983021, 0, 0, 983022, 0, 0, 917518, 0, 0, 917521, 0, 0, 917522, 0, 0, 917524, 0, 0, 917525, 0, 0, 917527, 0, 0, 917528, 0, 0, 917530, 0, 0, 1048552, 0, 0, 1048553, 0, 0, 1048554, 0, 0, 1048555, 0, 0, 983047, 0, 0, 983048, 0, 0, 983049, 0, 0, 983050, 0, 0, 983051, 0, 0, 983052, 0, 0, 983053, 0, 0, 983054, 0, 0, 983055, 0, 0, 983056, 0, 0, 983057, 0, 0, 983058, 0, 0, 983060, 0, 0, 983061, 0, 0, 983063, 0, 0, 983064, 0, 0, 983065, 0, 0, 983066, 0, 0, 983067, 0, 0, 1048582, 0, 0, 1048583, 0, 0, 1048584, 0, 0, 1048585, 0, 0, 1048586, 0, 0, 1048587, 0, 0, 1048588, 0, 0, 1048590, 0, 0, 1048592, 0, 0, 1048593, 0, 0, 1048594, 0, 0, 1048599, 0, 0, 1048600, 0, 0, 1048601, 0, 0, 1048602, 0, 0, 1048603, 0, 0, 1114117, 0, 0, 1114118, 0, 0, 1114120, 0, 0, 1114121, 0, 0, 1114122, 0, 0, 1114123, 0, 0, 1114124, 0, 0, 1114126, 0, 0, 1114127, 0, 0, 1179656, 0, 0, 1179657, 0, 0, 1179658, 0, 0, 1179659, 0, 0, 1179660, 0, 0 )
|
tile_data = PoolIntArray( -1769494, 0, 0, -1769493, 0, 0, -1703959, 0, 0, -1703958, 0, 0, -1703957, 0, 0, -1703956, 0, 0, -1638426, 0, 0, -1638425, 0, 0, -1638424, 0, 0, -1638423, 0, 0, -1638420, 0, 0, -1572891, 0, 0, -1572890, 0, 0, -1572888, 0, 0, -1572884, 0, 0, -1507355, 0, 0, -1507349, 0, 0, -1507348, 0, 0, -1441819, 0, 0, -1441814, 0, 0, -1441813, 0, 0, -1376283, 0, 0, -1376282, 0, 0, -1376278, 0, 0, -1310746, 0, 0, -1310745, 0, 0, -1310743, 0, 0, -1310742, 0, 0, -1245209, 0, 0, -1245208, 0, 0, -1245207, 0, 0, -458775, 0, 0, -393239, 0, 0, -393235, 0, 0, -327708, 0, 0, -327707, 0, 0, -327700, 0, 0, -327699, 0, 0, -262168, 0, 0, -262167, 0, 0, -262165, 0, 0, -262164, 0, 0, -196633, 0, 0, -196632, 0, 0, -196631, 0, 0, -131097, 0, 0, -131096, 0, 0, -131095, 0, 0, -131094, 0, 0, -196595, 0, 0, -196586, 0, 0, -65561, 0, 0, -65560, 0, 0, -65559, 0, 0, -65558, 0, 0, -131059, 0, 0, -131056, 0, 0, -131055, 0, 0, -131050, 0, 0, -29, 0, 0, -28, 0, 0, -27, 0, 0, -20, 0, 0, -65524, 0, 0, -65520, 0, 0, 65507, 0, 0, 65511, 0, 0, 65516, 0, 0, 65517, 0, 0, 12, 0, 0, 13, 0, 0, 14, 0, 0, 15, 0, 0, 16, 0, 0, 21, 0, 0, 131047, 0, 0, 131048, 0, 0, 131053, 0, 0, 65547, 0, 0, 65548, 0, 0, 65550, 0, 0, 65551, 0, 0, 65557, 0, 0, 131083, 0, 0, 131085, 0, 0, 131092, 0, 0, 262141, 1, 0, 262142, 1, 0, 262143, 1, 0, 196608, 1, 0, 196609, 1, 0, 196610, 1, 0, 196627, 0, 0, 196628, 0, 0, 327676, 1, 0, 327677, 1, 0, 327678, 0, 0, 327679, 0, 0, 262144, 0, 0, 262145, 0, 0, 262146, 1, 0, 262147, 1, 0, 393193, 0, 0, 393194, 0, 0, 393212, 1, 0, 393213, 1, 0, 393214, 0, 0, 327680, 0, 0, 327681, 0, 0, 327682, 0, 0, 327683, 1, 0, 327684, 1, 0, 458729, 0, 0, 458730, 0, 0, 458734, 0, 0, 458735, 0, 0, 458736, 0, 0, 458749, 1, 0, 458750, 0, 0, 458751, 0, 0, 393216, 0, 0, 393217, 0, 0, 393218, 0, 0, 393220, 1, 0, 524265, 0, 0, 524266, 0, 0, 524269, 0, 0, 524270, 0, 0, 524271, 0, 0, 524272, 0, 0, 524273, 0, 0, 524285, 1, 0, 524286, 0, 0, 524287, 1, 0, 458752, 1, 0, 458753, 0, 0, 458754, 0, 0, 458756, 1, 0, 589805, 0, 0, 589806, 0, 0, 589807, 0, 0, 589808, 0, 0, 589809, 0, 0, 589821, 1, 0, 589822, 0, 0, 589823, 1, 0, 524288, 1, 0, 524289, 0, 0, 524292, 1, 0, 655342, 0, 0, 655343, 0, 0, 655344, 0, 0, 655357, 1, 0, 655358, 1, 0, 655359, 1, 0, 589824, 1, 0, 589825, 1, 0, 589827, 1, 0, 655360, 1, 0, 655361, 1, 0, 655362, 1, 0, 655363, 1, 0, 786408, 0, 0, 851943, 0, 0, 851944, 0, 0, 851951, 0, 0, 851952, 0, 0, 851962, 1, 0, 917478, 0, 0, 917479, 0, 0, 917480, 0, 0, 917486, 0, 0, 917487, 0, 0, 917488, 0, 0, 917500, 1, 0, 851983, 0, 0, 851984, 0, 0, 851985, 0, 0, 851986, 0, 0, 851987, 0, 0, 851988, 0, 0, 851989, 0, 0, 851990, 0, 0, 851991, 0, 0, 851992, 0, 0, 851993, 0, 0, 851994, 0, 0, 983015, 0, 0, 983016, 0, 0, 983017, 0, 0, 983018, 0, 0, 983019, 0, 0, 983020, 0, 0, 983021, 0, 0, 983022, 0, 0, 917518, 0, 0, 917521, 0, 0, 917522, 0, 0, 917524, 0, 0, 917525, 0, 0, 917527, 0, 0, 917528, 0, 0, 917530, 0, 0, 1048552, 0, 0, 1048553, 0, 0, 1048554, 0, 0, 1048555, 0, 0, 983047, 0, 0, 983048, 0, 0, 983049, 0, 0, 983050, 0, 0, 983051, 0, 0, 983052, 0, 0, 983053, 0, 0, 983054, 0, 0, 983055, 0, 0, 983056, 0, 0, 983057, 0, 0, 983058, 0, 0, 983060, 0, 0, 983061, 0, 0, 983063, 0, 0, 983064, 0, 0, 983065, 0, 0, 983066, 0, 0, 983067, 0, 0, 1048582, 0, 0, 1048583, 0, 0, 1048584, 0, 0, 1048585, 0, 0, 1048586, 0, 0, 1048587, 0, 0, 1048588, 0, 0, 1048590, 0, 0, 1048592, 0, 0, 1048593, 0, 0, 1048594, 0, 0, 1048599, 0, 0, 1048600, 0, 0, 1048601, 0, 0, 1048602, 0, 0, 1048603, 0, 0, 1114117, 0, 0, 1114118, 0, 0, 1114120, 0, 0, 1114121, 0, 0, 1114122, 0, 0, 1114123, 0, 0, 1114124, 0, 0, 1114126, 0, 0, 1114127, 0, 0, 1179656, 0, 0, 1179657, 0, 0, 1179658, 0, 0, 1179659, 0, 0, 1179660, 0, 0 )
|
||||||
|
@@ -1,19 +1,12 @@
|
|||||||
using Godot;
|
using Godot;
|
||||||
using System;
|
using System;
|
||||||
using System.Diagnostics;
|
|
||||||
|
|
||||||
public class Main : Node2D
|
public class Main : Node2D
|
||||||
{
|
{
|
||||||
// Declare member variables here. Examples:
|
|
||||||
// private int a = 2;
|
|
||||||
// private string b = "text";
|
|
||||||
|
|
||||||
// Called when the node enters the scene tree for the first time.
|
|
||||||
public override void _Ready()
|
public override void _Ready()
|
||||||
{
|
{
|
||||||
//window management
|
|
||||||
OS.WindowMaximized = OS.IsDebugBuild();
|
|
||||||
OS.WindowFullscreen = !OS.IsDebugBuild();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public override async void _Process(float delta)
|
public override async void _Process(float delta)
|
||||||
|
@@ -4,7 +4,6 @@ using System;
|
|||||||
public class Player : KinematicBody2D
|
public class Player : KinematicBody2D
|
||||||
{
|
{
|
||||||
private Vector2 velocity;
|
private Vector2 velocity;
|
||||||
|
|
||||||
[Export]
|
[Export]
|
||||||
public int speed = 400;
|
public int speed = 400;
|
||||||
|
|
||||||
@@ -35,5 +34,14 @@ public class Player : KinematicBody2D
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public override async void _Process(float delta)
|
||||||
|
{
|
||||||
|
//player coordinates on foregroundgrid
|
||||||
|
var coordinates = GetNode<TileMap>("/root/Main/World/Foreground").WorldToMap(Position);
|
||||||
|
if (Input.IsKeyPressed((int)KeyList.F3))
|
||||||
|
{
|
||||||
|
GD.Print(coordinates);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@@ -1,6 +1,7 @@
|
|||||||
[gd_resource type="TileSet" load_steps=7 format=2]
|
[gd_resource type="TileSet" load_steps=10 format=2]
|
||||||
|
|
||||||
[ext_resource path="res://assets/textures/cupcake.png" type="Texture" id=1]
|
[ext_resource path="res://assets/textures/cupcake.png" type="Texture" id=1]
|
||||||
|
[ext_resource path="res://assets/textures/debugitem_one64.png" type="Texture" id=2]
|
||||||
|
|
||||||
[sub_resource type="NavigationPolygon" id=1]
|
[sub_resource type="NavigationPolygon" id=1]
|
||||||
vertices = PoolVector2Array( 0, 0, 64, 0, 64, 64, 0, 64 )
|
vertices = PoolVector2Array( 0, 0, 64, 0, 64, 64, 0, 64 )
|
||||||
@@ -10,13 +11,21 @@ outlines = [ PoolVector2Array( 0, 0, 64, 0, 64, 64, 0, 64 ) ]
|
|||||||
[sub_resource type="OccluderPolygon2D" id=2]
|
[sub_resource type="OccluderPolygon2D" id=2]
|
||||||
polygon = PoolVector2Array( 0, 0, 64, 0, 64, 64, 0, 64 )
|
polygon = PoolVector2Array( 0, 0, 64, 0, 64, 64, 0, 64 )
|
||||||
|
|
||||||
[sub_resource type="ConcavePolygonShape2D" id=3]
|
[sub_resource type="ConcavePolygonShape2D" id=8]
|
||||||
|
|
||||||
|
[sub_resource type="ConcavePolygonShape2D" id=9]
|
||||||
segments = PoolVector2Array( 0, 0, 64, 0, 64, 0, 64, 64, 64, 64, 0, 64, 0, 64, 0, 0 )
|
segments = PoolVector2Array( 0, 0, 64, 0, 64, 0, 64, 64, 64, 64, 0, 64, 0, 64, 0, 0 )
|
||||||
|
|
||||||
[sub_resource type="ConcavePolygonShape2D" id=4]
|
[sub_resource type="ConcavePolygonShape2D" id=10]
|
||||||
segments = PoolVector2Array( 64, 64, 0, 64, 0, 64, 0, 0, 0, 0, 64, 0, 64, 0, 64, 64 )
|
segments = PoolVector2Array( 64, 64, 0, 64, 0, 64, 0, 0, 0, 0, 64, 0, 64, 0, 64, 64 )
|
||||||
|
|
||||||
[sub_resource type="ConvexPolygonShape2D" id=5]
|
[sub_resource type="NavigationPolygon" id=6]
|
||||||
|
vertices = PoolVector2Array( 0, 0, 64, 0, 64, 64, 0, 64 )
|
||||||
|
polygons = [ PoolIntArray( 0, 1, 2, 3 ) ]
|
||||||
|
outlines = [ PoolVector2Array( 0, 0, 64, 0, 64, 64, 0, 64 ) ]
|
||||||
|
|
||||||
|
[sub_resource type="OccluderPolygon2D" id=7]
|
||||||
|
polygon = PoolVector2Array( 0, 0, 64, 0, 64, 64, 0, 64 )
|
||||||
|
|
||||||
[resource]
|
[resource]
|
||||||
0/name = "cupcake.png 0"
|
0/name = "cupcake.png 0"
|
||||||
@@ -31,26 +40,42 @@ segments = PoolVector2Array( 64, 64, 0, 64, 0, 64, 0, 0, 0, 0, 64, 0, 64, 0, 64,
|
|||||||
0/navigation = SubResource( 1 )
|
0/navigation = SubResource( 1 )
|
||||||
0/shape_offset = Vector2( 0, 0 )
|
0/shape_offset = Vector2( 0, 0 )
|
||||||
0/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
|
0/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
|
||||||
0/shape = SubResource( 3 )
|
0/shape = SubResource( 8 )
|
||||||
0/shape_one_way = false
|
0/shape_one_way = false
|
||||||
0/shape_one_way_margin = 1.0
|
0/shape_one_way_margin = 1.0
|
||||||
0/shapes = [ {
|
0/shapes = [ {
|
||||||
"autotile_coord": Vector2( 0, 0 ),
|
"autotile_coord": Vector2( 0, 0 ),
|
||||||
"one_way": false,
|
"one_way": false,
|
||||||
"one_way_margin": 1.0,
|
"one_way_margin": 1.0,
|
||||||
"shape": SubResource( 3 ),
|
"shape": SubResource( 8 ),
|
||||||
"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 )
|
"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 )
|
||||||
}, {
|
}, {
|
||||||
"autotile_coord": Vector2( 0, 0 ),
|
"autotile_coord": Vector2( 0, 0 ),
|
||||||
"one_way": false,
|
"one_way": false,
|
||||||
"one_way_margin": 1.0,
|
"one_way_margin": 1.0,
|
||||||
"shape": SubResource( 4 ),
|
"shape": SubResource( 9 ),
|
||||||
"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 )
|
"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 )
|
||||||
}, {
|
}, {
|
||||||
"autotile_coord": Vector2( 0, 0 ),
|
"autotile_coord": Vector2( 0, 0 ),
|
||||||
"one_way": false,
|
"one_way": false,
|
||||||
"one_way_margin": 1.0,
|
"one_way_margin": 1.0,
|
||||||
"shape": SubResource( 5 ),
|
"shape": SubResource( 10 ),
|
||||||
"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 )
|
"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 )
|
||||||
} ]
|
} ]
|
||||||
0/z_index = 0
|
0/z_index = 0
|
||||||
|
1/name = "debugitem_one64.png 1"
|
||||||
|
1/texture = ExtResource( 2 )
|
||||||
|
1/tex_offset = Vector2( 0, 0 )
|
||||||
|
1/modulate = Color( 1, 1, 1, 1 )
|
||||||
|
1/region = Rect2( 0, 0, 64, 64 )
|
||||||
|
1/tile_mode = 0
|
||||||
|
1/occluder_offset = Vector2( 0, 0 )
|
||||||
|
1/occluder = SubResource( 7 )
|
||||||
|
1/navigation_offset = Vector2( 0, 0 )
|
||||||
|
1/navigation = SubResource( 6 )
|
||||||
|
1/shape_offset = Vector2( 0, 0 )
|
||||||
|
1/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
|
||||||
|
1/shape_one_way = false
|
||||||
|
1/shape_one_way_margin = 0.0
|
||||||
|
1/shapes = [ ]
|
||||||
|
1/z_index = 0
|
||||||
|
Reference in New Issue
Block a user