Trying to fix merge

This commit is contained in:
Jonathan Herrewijnen 2020-10-03 16:07:27 +02:00
commit ea1793a270
10 changed files with 263 additions and 267 deletions

View File

@ -6,6 +6,8 @@ const interaction_circle_size = 150
onready var background_map = get_node("/root/Map1/background")
onready var player = get_node("/root/Map1/Player")
onready var cell_size = background_map._get_cell_size()
onready var plants_map = get_node("/root/Map1/interaction_map")
onready var interaction = get_node("/root/Map1/player_interaction")
var velocity = Vector2()
@ -26,10 +28,17 @@ func _physics_process(delta):
velocity.x = 0
velocity.y = 0
move_and_slide(velocity, Vector2(0, -1))
if(interaction.get_cell(int(self.position.x / cell_size.x), int(self.position.y / cell_size.y)) == -1):
interaction.clear()
interaction.set_cell(int(self.position.x / cell_size.x), int(self.position.y / cell_size.y), 0)
#Handles interaction with the map
func _interaction_process():
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):
# Mouse in viewport coordinates.

View File

@ -1,3 +1,4 @@
<<<<<<< HEAD
extends TouchScreenButton
#func _input(always):
@ -12,3 +13,5 @@ func _physics_process(delta):
# Called every frame. 'delta' is the elapsed time since the previous frame.
#func _process(delta):
# pass
=======
>>>>>>> 9841ce41a7dbf89828d925e42afe78aa918fe9de

View File

@ -1,23 +1,3 @@
[gd_resource type="TileSet" format=2]
[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

View File

@ -1,27 +1,195 @@
[gd_resource type="TileSet" load_steps=3 format=2]
[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]
0/name = "Plants 0"
0/texture = ExtResource( 1 )
0/tex_offset = Vector2( 0, 0 )
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/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/autotile/priority_map = [ Vector3( 1, 0, 2 ) ]
0/autotile/z_index_map = [ Vector3( 0, 0, 1 ), Vector3( 1, 0, 1 ), Vector3( 2, 0, 2 ) ]
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/shape_one_way_margin = 0.0
0/shapes = [ ]
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

View File

@ -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

View File

@ -1,107 +0,0 @@
[gd_resource type="TileSet" load_steps=2 format=2]
[ext_resource path="res://omgeving/vloer32x32/TilesetGodotVloer.png" type="Texture" id=1]
[resource]
0/name = "TilesetGodotVloer.png 0"
0/texture = ExtResource( 1 )
0/tex_offset = Vector2( 0, 0 )
0/modulate = Color( 1, 1, 1, 1 )
0/region = Rect2( 176, 0, 176, 176 )
0/tile_mode = 0
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
1/name = "TilesetGodotVloer.png 1"
1/texture = ExtResource( 1 )
1/tex_offset = Vector2( 0, 0 )
1/modulate = Color( 1, 1, 1, 1 )
1/region = Rect2( 352, 0, 176, 176 )
1/tile_mode = 1
1/autotile/bitmask_mode = 0
1/autotile/bitmask_flags = [ ]
1/autotile/icon_coordinate = Vector2( 0, 0 )
1/autotile/tile_size = Vector2( 176, 176 )
1/autotile/spacing = 0
1/autotile/occluder_map = [ ]
1/autotile/navpoly_map = [ ]
1/autotile/priority_map = [ ]
1/autotile/z_index_map = [ ]
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 = "TilesetGodotVloer.png 2"
2/texture = ExtResource( 1 )
2/tex_offset = Vector2( 0, 0 )
2/modulate = Color( 1, 1, 1, 1 )
2/region = Rect2( 176, 0, 176, 176 )
2/tile_mode = 2
2/autotile/icon_coordinate = Vector2( 0, 0 )
2/autotile/tile_size = Vector2( 176, 176 )
2/autotile/spacing = 0
2/autotile/occluder_map = [ ]
2/autotile/navpoly_map = [ ]
2/autotile/priority_map = [ ]
2/autotile/z_index_map = [ ]
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 = "Gras_grond_boven"
3/texture = ExtResource( 1 )
3/tex_offset = Vector2( 0, 0 )
3/modulate = Color( 1, 1, 1, 1 )
3/region = Rect2( 0, 0, 528, 176 )
3/tile_mode = 2
3/autotile/icon_coordinate = Vector2( 1, 0 )
3/autotile/tile_size = Vector2( 176, 176 )
3/autotile/spacing = 0
3/autotile/occluder_map = [ ]
3/autotile/navpoly_map = [ ]
3/autotile/priority_map = [ ]
3/autotile/z_index_map = [ ]
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 = "TilesetGodotVloer.png 4"
4/texture = ExtResource( 1 )
4/tex_offset = Vector2( 0, 0 )
4/modulate = Color( 1, 1, 1, 1 )
4/region = Rect2( 176, 0, 176, 176 )
4/tile_mode = 1
4/autotile/bitmask_mode = 0
4/autotile/bitmask_flags = [ ]
4/autotile/icon_coordinate = Vector2( 0, 0 )
4/autotile/tile_size = Vector2( 176, 176 )
4/autotile/spacing = 0
4/autotile/occluder_map = [ ]
4/autotile/navpoly_map = [ ]
4/autotile/priority_map = [ ]
4/autotile/z_index_map = [ ]
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

View File

@ -20,7 +20,11 @@ compress/hdr_mode=0
compress/bptc_ldr=0
compress/normal_map=0
flags/repeat=0
<<<<<<< HEAD
flags/filter=false
=======
flags/filter=true
>>>>>>> 9841ce41a7dbf89828d925e42afe78aa918fe9de
flags/mipmaps=false
flags/anisotropic=false
flags/srgb=2

View File

@ -0,0 +1,19 @@
[gd_resource type="TileSet" load_steps=2 format=2]
[ext_resource path="res://pictures/gui/interaction/tile_interaction.png" type="Texture" id=1]
[resource]
0/name = "tile_interaction.png 0"
0/texture = ExtResource( 1 )
0/tex_offset = Vector2( 0, 0 )
0/modulate = Color( 1, 1, 1, 1 )
0/region = Rect2( 0, 0, 32, 32 )
0/tile_mode = 0
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

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long