This commit is contained in:
JonathanHerrewijnen 2021-05-28 23:41:35 +02:00
parent f0bb7044ef
commit 578f9111cf
28 changed files with 57 additions and 3 deletions

View File

@ -0,0 +1,3 @@
source_md5="8ee3e5ac670b22f92308f7b2ab4bd20a"
dest_md5="34c187d4000533ead67e2e58d24e524a"

View File

@ -0,0 +1,3 @@
source_md5="6f0a2c3ecf6f7d3e9d5f30dcb4b55e7d"
dest_md5="eff13f3a41ea92a86a6b54eafb0933fe"

View File

@ -0,0 +1,3 @@
source_md5="2c113916a065741d0cc642d26cd8a04d"
dest_md5="8e438554a0d21bd5136ce2983442e25b"

View File

@ -0,0 +1,3 @@
source_md5="802301342e892d17337e54334fd32420"
dest_md5="cecbceb6af35c5d179bd45f8a37e5813"

View File

@ -0,0 +1,3 @@
source_md5="6d1512338894f88448629735f5c73943"
dest_md5="e2ba1338fcf95b95d2dd10699303686d"

View File

@ -0,0 +1,3 @@
source_md5="7dc4693cecb2f009651600079d58ae55"
dest_md5="005a87c00bec05842ddd94af62f78bf6"

View File

@ -0,0 +1,3 @@
source_md5="8a0a19789fac6a62e0e3288f2690fe9c"
dest_md5="ec9ac24fdf46184de2e1ae3987fa4f50"

View File

@ -0,0 +1,3 @@
source_md5="fadf490880f8b390d85bc4107ef7997a"
dest_md5="7ff7db2442e1370866eacc4c80ce4c3f"

View File

@ -0,0 +1,3 @@
source_md5="9b5e2de66ba740a182c441db619e2799"
dest_md5="e5ca79bc4cbdf685ecd8ad27fb9d94b2"

View File

@ -0,0 +1,3 @@
source_md5="df703cbc8863fe8b13664c73f5ccad47"
dest_md5="54ab1004b08e741af7d4865e3bffcafb"

View File

@ -8,6 +8,7 @@ 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")
var velocity = Vector2()
var world_position
@ -85,4 +86,3 @@ func AnimationOnInteraction(Item):
func _ready():
Global.player_inventory_items = Database.GetInventoryItems().duplicate()

View File

@ -17,6 +17,7 @@ func _unhandled_input(event):
if(pl_tile != -1):
set_cellv(pl_pos_tile, -1)
# for some obscure reason, this function only works on the background script, but not on the e.g. player script or Camera2D script. May have something to do with loading/scripts being active?
func _on_Inventory_pressed():
var inventory_screen = preload("res://MiscScenes/Inventory.tscn").instance()
Global.AddScene(inventory_screen, "inventory_screen", true)

Binary file not shown.

BIN
Sounds/night-chip.ogg Normal file

Binary file not shown.

View File

@ -0,0 +1,15 @@
[remap]
importer="ogg_vorbis"
type="AudioStreamOGGVorbis"
path="res://.import/night-chip.ogg-59475e6acfe3b53eba80c571db7db40c.oggstr"
[deps]
source_file="res://Sounds/night-chip.ogg"
dest_files=[ "res://.import/night-chip.ogg-59475e6acfe3b53eba80c571db7db40c.oggstr" ]
[params]
loop=true
loop_offset=0

View File

@ -12,4 +12,4 @@ func _enter_tree():
func _exit_tree():
remove_import_plugin(import_plugin)
import_plugin = null
import_plugin = null

View File

@ -1,4 +1,4 @@
[gd_scene load_steps=19 format=2]
[gd_scene load_steps=20 format=2]
[ext_resource path="res://MiscCodes/background_script.gd" type="Script" id=1]
[ext_resource path="res://MiscCodes/Tilemap_CameraView.gd" type="Script" id=2]
@ -16,6 +16,7 @@
[ext_resource path="res://pictures/gui/buttons/LeftButtonPressed.png" type="Texture" id=14]
[ext_resource path="res://pictures/gui/buttons/quick_item_button.png" type="Texture" id=15]
[ext_resource path="res://base_tilemap/init.gd" type="Script" id=16]
[ext_resource path="res://Sounds/night-chip.ogg" type="AudioStream" id=17]
[sub_resource type="CapsuleShape2D" id=1]
radius = 20.0
@ -182,6 +183,11 @@ shape = SubResource( 2 )
action = "map_interaction"
[node name="Tween" type="Tween" parent="."]
[node name="AudioStreamPlayer" type="AudioStreamPlayer" parent="."]
pause_mode = 2
stream = ExtResource( 17 )
autoplay = true
[connection signal="pressed" from="Camera2D/Interactive/GameButtons/Inventory" to="background" method="_on_Inventory_pressed"]
[connection signal="pressed" from="Camera2D/Interactive/GameButtons/MoveDown" to="Player" method="_on_TouchScreenButton_pressed"]
[connection signal="pressed" from="Camera2D/Interactive/GameButtons/MoveRight" to="Player" method="_on_TouchScreenButton_pressed"]

View File

@ -292,6 +292,7 @@ visibility_mode = 1
script = ExtResource( 6 )
[node name="dev_statistics" type="MarginContainer" parent="Camera2D"]
visible = false
margin_left = -615.0
margin_top = -300.0
margin_right = 614.0
@ -327,6 +328,7 @@ action = "map_interaction"
[node name="Tween" type="Tween" parent="."]
[connection signal="pressed" from="Camera2D/Interactive/GameButtons/Inventory" to="background" method="_on_Inventory_pressed"]
[connection signal="pressed" from="Camera2D/Interactive/GameButtons/Inventory" to="Player" method="_on_Inventory_pressed"]
[connection signal="pressed" from="Camera2D/Interactive/GameButtons/MoveDown" to="Player" method="_on_TouchScreenButton_pressed"]
[connection signal="pressed" from="Camera2D/Interactive/GameButtons/MoveRight" to="Player" method="_on_TouchScreenButton_pressed"]
[connection signal="pressed" from="Camera2D/Interactive/GameButtons/MoveUp" to="Player" method="_on_TouchScreenButton_pressed"]