Added buttons, pushing before cleanup
This commit is contained in:
parent
8a90a39292
commit
a6fc79e22d
@ -6,6 +6,7 @@ const interaction_circle_size = 150
|
|||||||
onready var background_map = get_node("/root/Map1/background")
|
onready var background_map = get_node("/root/Map1/background")
|
||||||
onready var player = get_node("/root/Map1/Player")
|
onready var player = get_node("/root/Map1/Player")
|
||||||
onready var cell_size = background_map._get_cell_size()
|
onready var cell_size = background_map._get_cell_size()
|
||||||
|
onready var plants_map = get_node("/root/Map1/interaction_map")
|
||||||
|
|
||||||
var velocity = Vector2()
|
var velocity = Vector2()
|
||||||
|
|
||||||
@ -27,9 +28,13 @@ func _physics_process(delta):
|
|||||||
velocity.y = 0
|
velocity.y = 0
|
||||||
move_and_slide(velocity, Vector2(0, -1))
|
move_and_slide(velocity, Vector2(0, -1))
|
||||||
|
|
||||||
|
#Handles interaction with the map
|
||||||
func _interaction_process():
|
func _interaction_process():
|
||||||
if Input.is_action_pressed("map_interaction") or Input.is_key_pressed((KEY_SPACE)):
|
if Input.is_action_pressed("map_interaction") or Input.is_key_pressed((KEY_SPACE)):
|
||||||
background_map.set_cell(int(self.position.x / cell_size.x), int(self.position.y / cell_size.y), -1)
|
var x = plants_map.get_cell(int(self.position.x / cell_size.x), int(self.position.y / cell_size.y))
|
||||||
|
# if x > 0:
|
||||||
|
# print("woo")
|
||||||
|
plants_map.set_cell(int(self.position.x / cell_size.x), int(self.position.y / cell_size.y), 10)
|
||||||
|
|
||||||
func _input(event):
|
func _input(event):
|
||||||
# Mouse in viewport coordinates.
|
# Mouse in viewport coordinates.
|
||||||
|
@ -1,13 +0,0 @@
|
|||||||
extends TouchScreenButton
|
|
||||||
|
|
||||||
#func _input(always):
|
|
||||||
func _physics_process(delta):
|
|
||||||
if Input.is_action_pressed("move_left") and Input.is_action_pressed("move_right"):
|
|
||||||
show()
|
|
||||||
elif Input.is_action_pressed("ui_end"):
|
|
||||||
hide();
|
|
||||||
|
|
||||||
|
|
||||||
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
|
||||||
#func _process(delta):
|
|
||||||
# pass
|
|
20
Planten.tres
20
Planten.tres
@ -1,23 +1,3 @@
|
|||||||
[gd_resource type="TileSet" format=2]
|
[gd_resource type="TileSet" format=2]
|
||||||
|
|
||||||
[resource]
|
[resource]
|
||||||
0/name = "Planten 0"
|
|
||||||
0/tex_offset = Vector2( 0, 0 )
|
|
||||||
0/modulate = Color( 1, 1, 1, 1 )
|
|
||||||
0/region = Rect2( 0, 0, -1, -1 )
|
|
||||||
0/tile_mode = 2
|
|
||||||
0/autotile/icon_coordinate = Vector2( 0, 0 )
|
|
||||||
0/autotile/tile_size = Vector2( 32, 32 )
|
|
||||||
0/autotile/spacing = 0
|
|
||||||
0/autotile/occluder_map = [ ]
|
|
||||||
0/autotile/navpoly_map = [ ]
|
|
||||||
0/autotile/priority_map = [ ]
|
|
||||||
0/autotile/z_index_map = [ ]
|
|
||||||
0/occluder_offset = Vector2( 0, 0 )
|
|
||||||
0/navigation_offset = Vector2( 0, 0 )
|
|
||||||
0/shape_offset = Vector2( 0, 0 )
|
|
||||||
0/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
|
|
||||||
0/shape_one_way = false
|
|
||||||
0/shape_one_way_margin = 0.0
|
|
||||||
0/shapes = [ ]
|
|
||||||
0/z_index = 0
|
|
||||||
|
178
Plants.tres
178
Plants.tres
@ -1,27 +1,195 @@
|
|||||||
[gd_resource type="TileSet" load_steps=3 format=2]
|
[gd_resource type="TileSet" load_steps=3 format=2]
|
||||||
|
|
||||||
[ext_resource path="res://Plants.png" type="Texture" id=1]
|
[ext_resource path="res://Plants.png" type="Texture" id=1]
|
||||||
|
[ext_resource path="res://pictures/gui/interaction/tile_interaction.png" type="Texture" id=2]
|
||||||
|
|
||||||
[resource]
|
[resource]
|
||||||
0/name = "Plants 0"
|
0/name = "Plants 0"
|
||||||
0/texture = ExtResource( 1 )
|
0/texture = ExtResource( 1 )
|
||||||
0/tex_offset = Vector2( 0, 0 )
|
0/tex_offset = Vector2( 0, 0 )
|
||||||
0/modulate = Color( 1, 1, 1, 1 )
|
0/modulate = Color( 1, 1, 1, 1 )
|
||||||
0/region = Rect2( 0, 0, 352, 32 )
|
0/region = Rect2( 32, 0, 32, 32 )
|
||||||
0/tile_mode = 2
|
0/tile_mode = 2
|
||||||
0/autotile/icon_coordinate = Vector2( 0, 0 )
|
0/autotile/icon_coordinate = Vector2( 0, 0 )
|
||||||
0/autotile/tile_size = Vector2( 32, 32 )
|
0/autotile/tile_size = Vector2( 32, 32 )
|
||||||
0/autotile/spacing = 0
|
0/autotile/spacing = 0
|
||||||
0/autotile/occluder_map = [ ]
|
0/autotile/occluder_map = [ ]
|
||||||
0/autotile/navpoly_map = [ ]
|
0/autotile/navpoly_map = [ ]
|
||||||
0/autotile/priority_map = [ ]
|
0/autotile/priority_map = [ Vector3( 1, 0, 2 ) ]
|
||||||
0/autotile/z_index_map = [ ]
|
0/autotile/z_index_map = [ Vector3( 0, 0, 1 ), Vector3( 1, 0, 1 ), Vector3( 2, 0, 2 ) ]
|
||||||
0/occluder_offset = Vector2( 0, 0 )
|
0/occluder_offset = Vector2( 0, 0 )
|
||||||
0/navigation_offset = Vector2( 0, 0 )
|
0/navigation_offset = Vector2( 0, 0 )
|
||||||
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 = 0
|
|
||||||
0/shape_one_way = false
|
0/shape_one_way = false
|
||||||
0/shape_one_way_margin = 1.0
|
0/shape_one_way_margin = 0.0
|
||||||
0/shapes = [ ]
|
0/shapes = [ ]
|
||||||
0/z_index = 0
|
0/z_index = 0
|
||||||
|
1/name = "Plants.png 1"
|
||||||
|
1/texture = ExtResource( 1 )
|
||||||
|
1/tex_offset = Vector2( 0, 0 )
|
||||||
|
1/modulate = Color( 1, 1, 1, 1 )
|
||||||
|
1/region = Rect2( 32, 0, 32, 32 )
|
||||||
|
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_one_way = false
|
||||||
|
1/shape_one_way_margin = 0.0
|
||||||
|
1/shapes = [ ]
|
||||||
|
1/z_index = 0
|
||||||
|
2/name = "Plants.png 2"
|
||||||
|
2/texture = ExtResource( 1 )
|
||||||
|
2/tex_offset = Vector2( 0, 0 )
|
||||||
|
2/modulate = Color( 1, 1, 1, 1 )
|
||||||
|
2/region = Rect2( 64, 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_one_way = false
|
||||||
|
2/shape_one_way_margin = 0.0
|
||||||
|
2/shapes = [ ]
|
||||||
|
2/z_index = 0
|
||||||
|
3/name = "Plants.png 3"
|
||||||
|
3/texture = ExtResource( 1 )
|
||||||
|
3/tex_offset = Vector2( 0, 0 )
|
||||||
|
3/modulate = Color( 1, 1, 1, 1 )
|
||||||
|
3/region = Rect2( 96, 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_one_way = false
|
||||||
|
3/shape_one_way_margin = 0.0
|
||||||
|
3/shapes = [ ]
|
||||||
|
3/z_index = 0
|
||||||
|
4/name = "Plants.png 4"
|
||||||
|
4/texture = ExtResource( 1 )
|
||||||
|
4/tex_offset = Vector2( 0, 0 )
|
||||||
|
4/modulate = Color( 1, 1, 1, 1 )
|
||||||
|
4/region = Rect2( 0, 0, 32, 32 )
|
||||||
|
4/tile_mode = 0
|
||||||
|
4/occluder_offset = Vector2( 0, 0 )
|
||||||
|
4/navigation_offset = Vector2( 0, 0 )
|
||||||
|
4/shape_offset = Vector2( 0, 0 )
|
||||||
|
4/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
|
||||||
|
4/shape_one_way = false
|
||||||
|
4/shape_one_way_margin = 0.0
|
||||||
|
4/shapes = [ ]
|
||||||
|
4/z_index = 0
|
||||||
|
5/name = "Plants.png 5"
|
||||||
|
5/texture = ExtResource( 1 )
|
||||||
|
5/tex_offset = Vector2( 0, 0 )
|
||||||
|
5/modulate = Color( 1, 1, 1, 1 )
|
||||||
|
5/region = Rect2( 128, 0, 32, 32 )
|
||||||
|
5/tile_mode = 0
|
||||||
|
5/occluder_offset = Vector2( 0, 0 )
|
||||||
|
5/navigation_offset = Vector2( 0, 0 )
|
||||||
|
5/shape_offset = Vector2( 0, 0 )
|
||||||
|
5/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
|
||||||
|
5/shape_one_way = false
|
||||||
|
5/shape_one_way_margin = 0.0
|
||||||
|
5/shapes = [ ]
|
||||||
|
5/z_index = 0
|
||||||
|
6/name = "Plants.png 6"
|
||||||
|
6/texture = ExtResource( 1 )
|
||||||
|
6/tex_offset = Vector2( 0, 0 )
|
||||||
|
6/modulate = Color( 1, 1, 1, 1 )
|
||||||
|
6/region = Rect2( 160, 0, 32, 32 )
|
||||||
|
6/tile_mode = 0
|
||||||
|
6/occluder_offset = Vector2( 0, 0 )
|
||||||
|
6/navigation_offset = Vector2( 0, 0 )
|
||||||
|
6/shape_offset = Vector2( 0, 0 )
|
||||||
|
6/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
|
||||||
|
6/shape_one_way = false
|
||||||
|
6/shape_one_way_margin = 0.0
|
||||||
|
6/shapes = [ ]
|
||||||
|
6/z_index = 0
|
||||||
|
7/name = "Plants.png 7"
|
||||||
|
7/texture = ExtResource( 1 )
|
||||||
|
7/tex_offset = Vector2( 0, 0 )
|
||||||
|
7/modulate = Color( 1, 1, 1, 1 )
|
||||||
|
7/region = Rect2( 192, 0, 32, 32 )
|
||||||
|
7/tile_mode = 0
|
||||||
|
7/occluder_offset = Vector2( 0, 0 )
|
||||||
|
7/navigation_offset = Vector2( 0, 0 )
|
||||||
|
7/shape_offset = Vector2( 0, 0 )
|
||||||
|
7/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
|
||||||
|
7/shape_one_way = false
|
||||||
|
7/shape_one_way_margin = 0.0
|
||||||
|
7/shapes = [ ]
|
||||||
|
7/z_index = 0
|
||||||
|
8/name = "Plants.png 8"
|
||||||
|
8/texture = ExtResource( 1 )
|
||||||
|
8/tex_offset = Vector2( 0, 0 )
|
||||||
|
8/modulate = Color( 1, 1, 1, 1 )
|
||||||
|
8/region = Rect2( 224, 0, 32, 32 )
|
||||||
|
8/tile_mode = 0
|
||||||
|
8/occluder_offset = Vector2( 0, 0 )
|
||||||
|
8/navigation_offset = Vector2( 0, 0 )
|
||||||
|
8/shape_offset = Vector2( 0, 0 )
|
||||||
|
8/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
|
||||||
|
8/shape_one_way = false
|
||||||
|
8/shape_one_way_margin = 0.0
|
||||||
|
8/shapes = [ ]
|
||||||
|
8/z_index = 0
|
||||||
|
9/name = "Plants.png 9"
|
||||||
|
9/texture = ExtResource( 1 )
|
||||||
|
9/tex_offset = Vector2( 0, 0 )
|
||||||
|
9/modulate = Color( 1, 1, 1, 1 )
|
||||||
|
9/region = Rect2( 256, 0, 32, 32 )
|
||||||
|
9/tile_mode = 0
|
||||||
|
9/occluder_offset = Vector2( 0, 0 )
|
||||||
|
9/navigation_offset = Vector2( 0, 0 )
|
||||||
|
9/shape_offset = Vector2( 0, 0 )
|
||||||
|
9/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
|
||||||
|
9/shape_one_way = false
|
||||||
|
9/shape_one_way_margin = 0.0
|
||||||
|
9/shapes = [ ]
|
||||||
|
9/z_index = 0
|
||||||
|
10/name = "Plants.png 10"
|
||||||
|
10/texture = ExtResource( 1 )
|
||||||
|
10/tex_offset = Vector2( 0, 0 )
|
||||||
|
10/modulate = Color( 1, 1, 1, 1 )
|
||||||
|
10/region = Rect2( 288, 0, 32, 32 )
|
||||||
|
10/tile_mode = 0
|
||||||
|
10/occluder_offset = Vector2( 0, 0 )
|
||||||
|
10/navigation_offset = Vector2( 0, 0 )
|
||||||
|
10/shape_offset = Vector2( 0, 0 )
|
||||||
|
10/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
|
||||||
|
10/shape_one_way = false
|
||||||
|
10/shape_one_way_margin = 0.0
|
||||||
|
10/shapes = [ ]
|
||||||
|
10/z_index = 0
|
||||||
|
11/name = "Plants.png 11"
|
||||||
|
11/texture = ExtResource( 1 )
|
||||||
|
11/tex_offset = Vector2( 0, 0 )
|
||||||
|
11/modulate = Color( 1, 1, 1, 1 )
|
||||||
|
11/region = Rect2( 320, 0, 32, 32 )
|
||||||
|
11/tile_mode = 0
|
||||||
|
11/occluder_offset = Vector2( 0, 0 )
|
||||||
|
11/navigation_offset = Vector2( 0, 0 )
|
||||||
|
11/shape_offset = Vector2( 0, 0 )
|
||||||
|
11/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
|
||||||
|
11/shape_one_way = false
|
||||||
|
11/shape_one_way_margin = 0.0
|
||||||
|
11/shapes = [ ]
|
||||||
|
11/z_index = 0
|
||||||
|
12/name = "tile_interaction.png 12"
|
||||||
|
12/texture = ExtResource( 2 )
|
||||||
|
12/tex_offset = Vector2( 0, 0 )
|
||||||
|
12/modulate = Color( 1, 1, 1, 1 )
|
||||||
|
12/region = Rect2( 0, 0, 32, 32 )
|
||||||
|
12/tile_mode = 0
|
||||||
|
12/occluder_offset = Vector2( 0, 0 )
|
||||||
|
12/navigation_offset = Vector2( 0, 0 )
|
||||||
|
12/shape_offset = Vector2( 0, 0 )
|
||||||
|
12/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
|
||||||
|
12/shape_one_way = false
|
||||||
|
12/shape_one_way_margin = 0.0
|
||||||
|
12/shapes = [ ]
|
||||||
|
12/z_index = 0
|
||||||
|
27
Vloer2.tres
27
Vloer2.tres
@ -1,27 +0,0 @@
|
|||||||
[gd_resource type="TileSet" load_steps=3 format=2]
|
|
||||||
|
|
||||||
[ext_resource path="res://" type="Texture" id=1]
|
|
||||||
|
|
||||||
[resource]
|
|
||||||
0/name = "Vloer 0"
|
|
||||||
0/texture = ExtResource( 1 )
|
|
||||||
0/tex_offset = Vector2( 0, 0 )
|
|
||||||
0/modulate = Color( 1, 1, 1, 1 )
|
|
||||||
0/region = Rect2( 0, 0, -1, -1 )
|
|
||||||
0/tile_mode = 2
|
|
||||||
0/autotile/icon_coordinate = Vector2( 0, 0 )
|
|
||||||
0/autotile/tile_size = Vector2( 32, 32 )
|
|
||||||
0/autotile/spacing = 0
|
|
||||||
0/autotile/occluder_map = [ ]
|
|
||||||
0/autotile/navpoly_map = [ ]
|
|
||||||
0/autotile/priority_map = [ ]
|
|
||||||
0/autotile/z_index_map = [ ]
|
|
||||||
0/occluder_offset = Vector2( 0, 0 )
|
|
||||||
0/navigation_offset = Vector2( 0, 0 )
|
|
||||||
0/shape_offset = Vector2( 0, 0 )
|
|
||||||
0/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
|
|
||||||
0/shape = 0
|
|
||||||
0/shape_one_way = false
|
|
||||||
0/shape_one_way_margin = 1.0
|
|
||||||
0/shapes = [ ]
|
|
||||||
0/z_index = 0
|
|
BIN
pictures/gui/interaction/tile_interaction.png
Normal file
BIN
pictures/gui/interaction/tile_interaction.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 175 B |
34
pictures/gui/interaction/tile_interaction.png.import
Normal file
34
pictures/gui/interaction/tile_interaction.png.import
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="texture"
|
||||||
|
type="StreamTexture"
|
||||||
|
path="res://.import/tile_interaction.png-ec9b0ff7c845e6e695a2b4932b3edebb.stex"
|
||||||
|
metadata={
|
||||||
|
"vram_texture": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://pictures/gui/interaction/tile_interaction.png"
|
||||||
|
dest_files=[ "res://.import/tile_interaction.png-ec9b0ff7c845e6e695a2b4932b3edebb.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
|
||||||
|
stream=false
|
||||||
|
size_limit=0
|
||||||
|
detect_3d=true
|
||||||
|
svg/scale=1.0
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user