Cleanup101, see wiki for more details
This commit is contained in:
parent
f89c286a9d
commit
c9394f7813
@ -1,3 +1,3 @@
|
||||
source_md5="e809407f04e80b917d43b2fe7ffda5b1"
|
||||
dest_md5="092cd5d6911c37bafc610ede3064a8d9"
|
||||
source_md5="631e951b40b5051fa6f950a5e3fac772"
|
||||
dest_md5="e1b7fe526c021dc933f677a13e3bbe4a"
|
||||
|
||||
|
Binary file not shown.
@ -1,3 +1,3 @@
|
||||
source_md5="717369113d5c8c699b02d4d56a9e2f40"
|
||||
dest_md5="6271e85a7eab85ece807bcdafcee1f3a"
|
||||
source_md5="f6f389f56f6075e6f5479a815a778f67"
|
||||
dest_md5="ae0ad66f707c630ba180f2c0ec2fd00c"
|
||||
|
||||
|
Binary file not shown.
175
Maps/river_intersection.tscn
Normal file
175
Maps/river_intersection.tscn
Normal file
File diff suppressed because one or more lines are too long
@ -19,8 +19,6 @@
|
||||
[ext_resource path="res://MiscCodes/background_script.gd" type="Script" id=17]
|
||||
[ext_resource path="res://pictures/tileset_images/interaction_map.png" type="Texture" id=18]
|
||||
|
||||
|
||||
|
||||
[sub_resource type="TileSet" id=1]
|
||||
0/name = "vegetation.png 0"
|
||||
0/texture = ExtResource( 4 )
|
||||
|
@ -4,7 +4,6 @@
|
||||
[ext_resource path="res://MiscCodes/background_script.gd" type="Script" id=2]
|
||||
[ext_resource path="res://Other/base_tilemap/tilesets/background_ts.tres" type="TileSet" id=3]
|
||||
|
||||
|
||||
[node name="Node2D" type="Node2D"]
|
||||
|
||||
[node name="background" type="TileMap" parent="."]
|
||||
|
@ -6,9 +6,8 @@ const interaction_circle_size = 150
|
||||
onready var background_map = get_node("/root/base_scene/background")
|
||||
onready var player = get_node("/root/base_scene/Player")
|
||||
onready var cell_size = background_map._get_cell_size()
|
||||
onready var plants_map = get_node("/root/base_scene/interaction_map")
|
||||
onready var interaction = get_node("/root/base_scene/player_interaction")
|
||||
onready var sound = get_node("../AudioStreamPlayer")
|
||||
onready var interaction_map = get_node("/root/base_scene/interaction_map")
|
||||
onready var player_interaction = get_node("/root/base_scene/player_interaction")
|
||||
|
||||
var velocity = Vector2()
|
||||
var world_position
|
||||
@ -19,12 +18,11 @@ var previous_position = Vector2(0,0)
|
||||
func _physics_process(delta):
|
||||
var cur = Vector2(int(self.position.x / cell_size.x), int(self.position.y / cell_size.y))
|
||||
if(cur != previous_position):
|
||||
interaction.set_cell(int(self.position.x / cell_size.x), int(self.position.y / cell_size.y) , 0)
|
||||
interaction.set_cell(previous_position.x, previous_position.y, -1)
|
||||
player_interaction.set_cell(int(self.position.x / cell_size.x), int(self.position.y / cell_size.y) , 0)
|
||||
player_interaction.set_cell(previous_position.x, previous_position.y, -1)
|
||||
previous_position = Vector2(int(self.position.x / cell_size.x), int(self.position.y / cell_size.y))
|
||||
if Input.is_key_pressed(KEY_SPACE) or Input.is_mouse_button_pressed(BUTTON_LEFT):
|
||||
_interaction_process()
|
||||
SoundOnInteraction("standard")
|
||||
velocity.y += delta * GRAVITY
|
||||
if Input.is_action_pressed("move_left"):
|
||||
velocity.x = -WALK_SPEED
|
||||
@ -42,35 +40,34 @@ func _physics_process(delta):
|
||||
Global.current_camera.Update()
|
||||
|
||||
func InteractWithCell():
|
||||
var plant_cell_mouse = plants_map.get_cell(int(world_position[0] / cell_size.x), int(world_position[1] / cell_size.y))
|
||||
var plant_cell_character = plants_map.get_cell(int(self.position.x / cell_size.x), int(self.position.y / cell_size.y))
|
||||
var plant_cell_mouse = interaction_map.get_cell(int(world_position[0] / cell_size.x), int(world_position[0] / cell_size.y))
|
||||
var plant_cell_character = interaction_map.get_cell(int(self.position.x / cell_size.x), int(self.position.y / cell_size.y))
|
||||
|
||||
var background_cell = background_map.get_cell(int(world_position[0] / cell_size.x), int(world_position[1] / cell_size.y))
|
||||
var interaction_cell = interaction.get_cell(int(world_position[0] / cell_size.x), int(world_position[1] / cell_size.y))
|
||||
var interaction_cell = player_interaction.get_cell(int(world_position[0] / cell_size.x), int(world_position[1] / cell_size.y))
|
||||
|
||||
print("plant cell mouse line 1: ", interaction_map.get_cell(12, 36))
|
||||
print('plant_cell_mouse=',plant_cell_mouse,' | plant_cell_character=', plant_cell_character,' | background_cell=', background_cell,' | interaction_cell=',interaction_cell)
|
||||
|
||||
if plant_cell_mouse > 0 and plant_cell_mouse % 2 == 0:
|
||||
Global.AddInventoryItem(plant_cell_mouse/2, 1)
|
||||
plants_map.set_cell(int(world_position[0] / cell_size.x), int(world_position[1] / cell_size.y), (plant_cell_mouse-1))
|
||||
interaction_map.set_cell(int(world_position[0] / cell_size.x), int(world_position[1] / cell_size.y), (plant_cell_mouse-1))
|
||||
AnimationOnInteraction(1)
|
||||
SoundOnInteraction("standard")
|
||||
Global.Save()
|
||||
elif plant_cell_character > 0 and plant_cell_character % 2 == 0:
|
||||
Global.AddInventoryItem(plant_cell_character/2, 1)
|
||||
plants_map.set_cell(int(self.position.x / cell_size.x), int(self.position.y / cell_size.y), (plant_cell_character-1))
|
||||
interaction_map.set_cell(int(self.position.x / cell_size.x), int(self.position.y / cell_size.y), (plant_cell_character-1))
|
||||
AnimationOnInteraction(1)
|
||||
SoundOnInteraction("standard")
|
||||
else:
|
||||
#space is now a test function
|
||||
GlobalGameFunctions.RenderSpeech(self, "joe")
|
||||
pass
|
||||
|
||||
func _interaction_process():
|
||||
if Input.is_mouse_button_pressed(BUTTON_LEFT):
|
||||
world_position = get_global_mouse_position()
|
||||
InteractWithCell()
|
||||
elif Input.is_key_pressed(KEY_SPACE):
|
||||
if Input.is_mouse_button_pressed(BUTTON_LEFT) or Input.is_key_pressed(KEY_SPACE):
|
||||
world_position = get_global_mouse_position()
|
||||
InteractWithCell()
|
||||
else:
|
||||
pass
|
||||
|
||||
func AnimationOnInteraction(Item):
|
||||
print("Item = ", Item, " Animation")
|
||||
|
@ -1,32 +0,0 @@
|
||||
[gd_scene load_steps=3 format=2]
|
||||
|
||||
[ext_resource path="res://Other/Vloer.tres" type="TileSet" id=1]
|
||||
[ext_resource path="res://Other/Planten.tres" type="TileSet" id=2]
|
||||
|
||||
[node name="Node2D" type="Node2D"]
|
||||
position = Vector2( 109, 0 )
|
||||
|
||||
[node name="regions" type="TileMap" parent="."]
|
||||
tile_set = ExtResource( 1 )
|
||||
cell_size = Vector2( 32, 32 )
|
||||
cell_custom_transform = Transform2D( 16, 0, 0, 16, 0, 0 )
|
||||
format = 1
|
||||
tile_data = PoolIntArray( 65537, 0, -2752512, 65539, 0, -655360, 65541, 0, -786432, 196609, 0, -2752512, 196611, 0, -655360, 196613, 0, -786432, 327681, 0, -2752512, 327685, 0, -786432 )
|
||||
|
||||
[node name="input_background" type="TileMap" parent="."]
|
||||
tile_set = ExtResource( 1 )
|
||||
cell_size = Vector2( 32, 32 )
|
||||
cell_custom_transform = Transform2D( 16, 0, 0, 16, 0, 0 )
|
||||
format = 1
|
||||
tile_data = PoolIntArray( 65537, 0, -2555904, 65541, 0, -917504, 196609, 0, -2621440, 196613, 0, -851968, 327681, 0, -2686976, 327685, 0, -786432 )
|
||||
|
||||
[node name="output_Collision" type="Node2D" parent="."]
|
||||
|
||||
[node name="output_Interactive" type="Node2D" parent="."]
|
||||
|
||||
[node name="input_Plants" type="TileMap" parent="."]
|
||||
tile_set = ExtResource( 2 )
|
||||
cell_size = Vector2( 32, 32 )
|
||||
cell_custom_transform = Transform2D( 16, 0, 0, 16, 0, 0 )
|
||||
format = 1
|
||||
tile_data = PoolIntArray( 65539, 0, 0, 196611, 0, -65536 )
|
@ -0,0 +1,3 @@
|
||||
source_md5="103c05aff3562bff104cd7762ed2ced6"
|
||||
dest_md5="7186cfce7f9de5854ac78afabfe127a5"
|
||||
|
Binary file not shown.
@ -0,0 +1,3 @@
|
||||
source_md5="103c05aff3562bff104cd7762ed2ced6"
|
||||
dest_md5="7186cfce7f9de5854ac78afabfe127a5"
|
||||
|
Binary file not shown.
@ -0,0 +1,3 @@
|
||||
source_md5="b27f0f04c9409029e4319ecdac5bc483"
|
||||
dest_md5="f3225cdc862d8db7a10ceb9c5791ff0d"
|
||||
|
Binary file not shown.
@ -0,0 +1,3 @@
|
||||
source_md5="a0307cd235df0f88aad0fdb7bc651594"
|
||||
dest_md5="0986c8c78779cda268c08ae1475efe4f"
|
||||
|
Binary file not shown.
@ -0,0 +1,3 @@
|
||||
source_md5="8c94bf3ea485059ed4bc5f4bab7d6d6f"
|
||||
dest_md5="0f633dfaf34d8940fcdef50e44cbb3c8"
|
||||
|
Binary file not shown.
@ -0,0 +1,3 @@
|
||||
source_md5="767113cd80aa99ac927bf0572f896f7c"
|
||||
dest_md5="8c2ca1e2f3bd54dc48f0a55d7340eb70"
|
||||
|
Binary file not shown.
@ -0,0 +1,3 @@
|
||||
source_md5="47777692884d4d7c18d524d3259a1fd9"
|
||||
dest_md5="eea0dfc2387f15a912f6cee223a34804"
|
||||
|
Binary file not shown.
@ -0,0 +1,3 @@
|
||||
source_md5="88752beb83c598256dbed63f67c743c6"
|
||||
dest_md5="8edca41f84901e7137f7912f1f7aa70f"
|
||||
|
Binary file not shown.
@ -0,0 +1,3 @@
|
||||
source_md5="7e7db348931b558faf4a0be49bd8c0ae"
|
||||
dest_md5="fb9d8b72ccb4b3e7138cd142c8f02592"
|
||||
|
Binary file not shown.
@ -0,0 +1,3 @@
|
||||
source_md5="16ad50d5e978dda9d28bfc6891d3655e"
|
||||
dest_md5="2ddce0697f35f3c5d7e8a104b91feccd"
|
||||
|
Binary file not shown.
@ -0,0 +1,3 @@
|
||||
source_md5="84fb187e8384f0db8bad07eab860f270"
|
||||
dest_md5="bb5d70f19a767f5ec4b8920241337a3e"
|
||||
|
Binary file not shown.
@ -0,0 +1,3 @@
|
||||
source_md5="1a9fcb33dd7a12ece4b687ed557bdc0a"
|
||||
dest_md5="8aad3f7eb9f296e25e90ad5f51164d41"
|
||||
|
Binary file not shown.
@ -0,0 +1,3 @@
|
||||
source_md5="ee7d9dcd64f27d0c6d1c4455b5557170"
|
||||
dest_md5="d0cb18613813f17d49201c4698904867"
|
||||
|
Binary file not shown.
@ -0,0 +1,3 @@
|
||||
source_md5="9fc47cf06d9f2bd549e99568dddb59c1"
|
||||
dest_md5="1350942da534e9db2337690f673e371a"
|
||||
|
Binary file not shown.
@ -0,0 +1,3 @@
|
||||
source_md5="3194e8edbc207c9de1bd59313a08af0c"
|
||||
dest_md5="8b056b890dc04c60e6e68a8a183b32c9"
|
||||
|
Binary file not shown.
@ -0,0 +1,3 @@
|
||||
source_md5="c87f3bcf9a11a3dc2e541551b717883e"
|
||||
dest_md5="6a029b668edb55de309f38db74d7edce"
|
||||
|
Binary file not shown.
@ -0,0 +1 @@
|
||||
source_md5="d52598a8a89e84715fb6d546c5f39662"
|
@ -0,0 +1,3 @@
|
||||
source_md5="7e41bf3051b18e392a4bb6c0cc45cd7c"
|
||||
dest_md5="027d7cfe7c7f2d473caf37960292caa5"
|
||||
|
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user