Commit f159159e authored by Julia Santos's avatar Julia Santos

Started fixing the z-index of some rooms (0 is background, 1 is foreground,...

Started fixing the z-index of some rooms (0 is background, 1 is foreground, anything that needs to be above foreground is 2, and general room node is -1 behind moxie and the UI. Also fixed some texture loading in the grocery pickup action
parent f970a011
...@@ -72,14 +72,17 @@ func _groceries_put_away(): # when the groceries are put away ...@@ -72,14 +72,17 @@ func _groceries_put_away(): # when the groceries are put away
var cleanImage = Image.new() var cleanImage = Image.new()
var cleanTexture = ImageTexture.new() var cleanTexture = ImageTexture.new()
cleanImage.load("res://assets/Thesis Clickables/cleaning materials.png") #cleanImage.load("res://assets/Thesis Clickables/cleaning materials.png")
cleanTexture.create_from_image(cleanImage) #cleanTexture.create_from_image(cleanImage)
cleanTexture = load("res://.import/cleaning materials.png-9e1abb8a1d84afe3085c773f150c7347.stex")
inventory.add_item("Cleaning mat",cleanTexture) inventory.add_item("Cleaning mat",cleanTexture)
var detergentImage = Image.new() var detergentImage = Image.new()
var detergentTexture = ImageTexture.new() var detergentTexture = ImageTexture.new()
detergentImage.load("res://assets/Thesis Clickables/laundry detergent.png") #detergentImage.load("res://assets/Thesis Clickables/laundry detergent.png")
detergentTexture.create_from_image(detergentImage) #detergentTexture.create_from_image(detergentImage)
detergentTexture = load("res://.import/laundry detergent.png-79948b488e3c228ce282a9186c4bcf0c.stex")
#laundry detergent.png-79948b488e3c228ce282a9186c4bcf0c.stex
inventory.add_item("Laundry detergent",detergentTexture) inventory.add_item("Laundry detergent",detergentTexture)
func _eaten(): # completing first "Eat" quest func _eaten(): # completing first "Eat" quest
......
...@@ -43,6 +43,7 @@ func _input_event(viewport, event, shape_idx): # executes when clicked on ...@@ -43,6 +43,7 @@ func _input_event(viewport, event, shape_idx): # executes when clicked on
elif interactable: #for environment things that arent retrievable, and hands are empty elif interactable: #for environment things that arent retrievable, and hands are empty
storeClick("Clicked on") storeClick("Clicked on")
mouseInteraction() mouseInteraction()
#get_tree().set_input_as_handled()
func storeClick(method): func storeClick(method):
var save_data = File.new() var save_data = File.new()
......
...@@ -31,10 +31,10 @@ extents = Vector2( 69.006, 185 ) ...@@ -31,10 +31,10 @@ extents = Vector2( 69.006, 185 )
[sub_resource type="RectangleShape2D" id=6] [sub_resource type="RectangleShape2D" id=6]
extents = Vector2( 38.6637, 100.122 ) extents = Vector2( 38.6637, 100.122 )
[sub_resource type="RectangleShape2D" id=8] [sub_resource type="RectangleShape2D" id=7]
extents = Vector2( 205.176, 46.6856 ) extents = Vector2( 205.176, 46.6856 )
[sub_resource type="RectangleShape2D" id=7] [sub_resource type="RectangleShape2D" id=8]
extents = Vector2( 82.0634, 51.3664 ) extents = Vector2( 82.0634, 51.3664 )
[sub_resource type="RectangleShape2D" id=9] [sub_resource type="RectangleShape2D" id=9]
...@@ -230,7 +230,7 @@ interactable = true ...@@ -230,7 +230,7 @@ interactable = true
flavorText = "Bobby pins and puddles. What was I doing in here?" flavorText = "Bobby pins and puddles. What was I doing in here?"
[node name="CollisionShape2D" type="CollisionShape2D" parent="Mess on floor"] [node name="CollisionShape2D" type="CollisionShape2D" parent="Mess on floor"]
shape = SubResource( 8 ) shape = SubResource( 7 )
[node name="Sprite" type="Sprite" parent="Mess on floor/CollisionShape2D"] [node name="Sprite" type="Sprite" parent="Mess on floor/CollisionShape2D"]
position = Vector2( -1.45947, -0.173828 ) position = Vector2( -1.45947, -0.173828 )
...@@ -248,7 +248,7 @@ retrievable = true ...@@ -248,7 +248,7 @@ retrievable = true
flavorText = "Good for holding my hair up or picking into small spaces." flavorText = "Good for holding my hair up or picking into small spaces."
[node name="CollisionShape2D" type="CollisionShape2D" parent="Bobby pins"] [node name="CollisionShape2D" type="CollisionShape2D" parent="Bobby pins"]
shape = SubResource( 7 ) shape = SubResource( 8 )
[node name="Sprite" type="Sprite" parent="Bobby pins/CollisionShape2D"] [node name="Sprite" type="Sprite" parent="Bobby pins/CollisionShape2D"]
position = Vector2( -0.336975, -1.2963 ) position = Vector2( -0.336975, -1.2963 )
...@@ -266,7 +266,8 @@ __meta__ = { ...@@ -266,7 +266,8 @@ __meta__ = {
} }
[node name="Trash can" type="StaticBody2D" parent="."] [node name="Trash can" type="StaticBody2D" parent="."]
position = Vector2( 926.026, 491.279 ) position = Vector2( 924.766, 491.279 )
z_index = 1
input_pickable = true input_pickable = true
__meta__ = { __meta__ = {
"_edit_group_": true "_edit_group_": true
...@@ -293,7 +294,8 @@ __meta__ = { ...@@ -293,7 +294,8 @@ __meta__ = {
} }
[node name="Trash" type="StaticBody2D" parent="."] [node name="Trash" type="StaticBody2D" parent="."]
position = Vector2( 922.659, 431.789 ) position = Vector2( 921.399, 431.789 )
z_index = 1
input_pickable = true input_pickable = true
script = ExtResource( 4 ) script = ExtResource( 4 )
__meta__ = { __meta__ = {
......
...@@ -15,14 +15,14 @@ extents = Vector2( 23.7124, 45.104 ) ...@@ -15,14 +15,14 @@ extents = Vector2( 23.7124, 45.104 )
[sub_resource type="RectangleShape2D" id=2] [sub_resource type="RectangleShape2D" id=2]
extents = Vector2( 27.7283, 52.3883 ) extents = Vector2( 27.7283, 52.3883 )
[sub_resource type="RectangleShape2D" id=4] [sub_resource type="RectangleShape2D" id=3]
extents = Vector2( 6.13235, 10.0569 ) extents = Vector2( 6.13235, 10.0569 )
[sub_resource type="StreamTexture" id=5] [sub_resource type="StreamTexture" id=4]
flags = 4 flags = 4
load_path = "res://.import/door to neighbor's apartment.png-525cbedcadd2669e77f94194b29c950c.stex" load_path = "res://.import/door to neighbor's apartment.png-525cbedcadd2669e77f94194b29c950c.stex"
[sub_resource type="RectangleShape2D" id=3] [sub_resource type="RectangleShape2D" id=5]
extents = Vector2( 27.7283, 52.3883 ) extents = Vector2( 27.7283, 52.3883 )
[node name="Node2D" type="Node2D"] [node name="Node2D" type="Node2D"]
...@@ -93,12 +93,12 @@ flavorText = "Brodie: Just come in, the door's open!" ...@@ -93,12 +93,12 @@ flavorText = "Brodie: Just come in, the door's open!"
[node name="CollisionShape2D" type="CollisionShape2D" parent="Neighbor doorbell"] [node name="CollisionShape2D" type="CollisionShape2D" parent="Neighbor doorbell"]
position = Vector2( -16.8367, -2.11676 ) position = Vector2( -16.8367, -2.11676 )
scale = Vector2( 5, 5 ) scale = Vector2( 5, 5 )
shape = SubResource( 4 ) shape = SubResource( 3 )
[node name="Sprite" type="Sprite" parent="Neighbor doorbell/CollisionShape2D"] [node name="Sprite" type="Sprite" parent="Neighbor doorbell/CollisionShape2D"]
position = Vector2( -0.317139, 0.093811 ) position = Vector2( -0.317139, 0.093811 )
scale = Vector2( 0.0595878, 0.0992322 ) scale = Vector2( 0.0595878, 0.0992322 )
texture = SubResource( 5 ) texture = SubResource( 4 )
[node name="Door to Moxie" type="StaticBody2D" parent="."] [node name="Door to Moxie" type="StaticBody2D" parent="."]
position = Vector2( 234.394, 307.944 ) position = Vector2( 234.394, 307.944 )
...@@ -114,7 +114,7 @@ flavorText = "Door to apartment. Home sweet home." ...@@ -114,7 +114,7 @@ flavorText = "Door to apartment. Home sweet home."
[node name="CollisionShape2D" type="CollisionShape2D" parent="Door to Moxie"] [node name="CollisionShape2D" type="CollisionShape2D" parent="Door to Moxie"]
position = Vector2( -16.8367, -2.11676 ) position = Vector2( -16.8367, -2.11676 )
scale = Vector2( 5, 5 ) scale = Vector2( 5, 5 )
shape = SubResource( 3 ) shape = SubResource( 5 )
[node name="Sprite" type="Sprite" parent="Door to Moxie/CollisionShape2D"] [node name="Sprite" type="Sprite" parent="Door to Moxie/CollisionShape2D"]
position = Vector2( 0.449593, -0.672775 ) position = Vector2( 0.449593, -0.672775 )
......
...@@ -39,7 +39,7 @@ extents = Vector2( 21.6967, 40.5453 ) ...@@ -39,7 +39,7 @@ extents = Vector2( 21.6967, 40.5453 )
flags = 4 flags = 4
load_path = "res://.import/front door.png-58881902b918df4a261fe60f02da2bc4.stex" load_path = "res://.import/front door.png-58881902b918df4a261fe60f02da2bc4.stex"
[sub_resource type="RectangleShape2D" id=10] [sub_resource type="RectangleShape2D" id=9]
extents = Vector2( 8.10034, 6.2543 ) extents = Vector2( 8.10034, 6.2543 )
[node name="Node2D" type="Node2D"] [node name="Node2D" type="Node2D"]
...@@ -205,7 +205,7 @@ interactable = true ...@@ -205,7 +205,7 @@ interactable = true
[node name="CollisionShape2D" type="CollisionShape2D" parent="Dialogue arrow"] [node name="CollisionShape2D" type="CollisionShape2D" parent="Dialogue arrow"]
position = Vector2( -3.95886, 13.9804 ) position = Vector2( -3.95886, 13.9804 )
scale = Vector2( 5, 5 ) scale = Vector2( 5, 5 )
shape = SubResource( 10 ) shape = SubResource( 9 )
[node name="Sprite" type="Sprite" parent="Dialogue arrow/CollisionShape2D"] [node name="Sprite" type="Sprite" parent="Dialogue arrow/CollisionShape2D"]
position = Vector2( 1.38672, 0.106689 ) position = Vector2( 1.38672, 0.106689 )
......
...@@ -79,6 +79,7 @@ position = Vector2( 190.702, 295.083 ) ...@@ -79,6 +79,7 @@ position = Vector2( 190.702, 295.083 )
scale = Vector2( 0.997353, 0.98961 ) scale = Vector2( 0.997353, 0.98961 )
z_index = -1 z_index = -1
script = ExtResource( 3 ) script = ExtResource( 3 )
tracking = true
[node name="CollisionShape2D" type="CollisionShape2D" parent="BG"] [node name="CollisionShape2D" type="CollisionShape2D" parent="BG"]
z_index = -1 z_index = -1
...@@ -110,6 +111,7 @@ texture = ExtResource( 2 ) ...@@ -110,6 +111,7 @@ texture = ExtResource( 2 )
[node name="Terrarium" type="StaticBody2D" parent="."] [node name="Terrarium" type="StaticBody2D" parent="."]
position = Vector2( 463.667, 393.29 ) position = Vector2( 463.667, 393.29 )
z_index = 1
input_pickable = true input_pickable = true
script = ExtResource( 12 ) script = ExtResource( 12 )
__meta__ = { __meta__ = {
...@@ -197,6 +199,7 @@ texture = SubResource( 9 ) ...@@ -197,6 +199,7 @@ texture = SubResource( 9 )
[node name="Pants" type="StaticBody2D" parent="."] [node name="Pants" type="StaticBody2D" parent="."]
position = Vector2( 94.5713, 491.212 ) position = Vector2( 94.5713, 491.212 )
scale = Vector2( 0.8, 0.8 ) scale = Vector2( 0.8, 0.8 )
z_index = 1
input_pickable = true input_pickable = true
script = ExtResource( 13 ) script = ExtResource( 13 )
__meta__ = { __meta__ = {
...@@ -218,6 +221,7 @@ texture = ExtResource( 6 ) ...@@ -218,6 +221,7 @@ texture = ExtResource( 6 )
[node name="Shirt" type="StaticBody2D" parent="."] [node name="Shirt" type="StaticBody2D" parent="."]
position = Vector2( 230.393, 406.988 ) position = Vector2( 230.393, 406.988 )
z_index = 1
input_pickable = true input_pickable = true
script = ExtResource( 13 ) script = ExtResource( 13 )
__meta__ = { __meta__ = {
...@@ -240,6 +244,7 @@ texture = ExtResource( 5 ) ...@@ -240,6 +244,7 @@ texture = ExtResource( 5 )
position = Vector2( -217.928, 395.301 ) position = Vector2( -217.928, 395.301 )
rotation = -3.0456 rotation = -3.0456
scale = Vector2( 0.9, 0.9 ) scale = Vector2( 0.9, 0.9 )
z_index = 1
input_pickable = true input_pickable = true
script = ExtResource( 13 ) script = ExtResource( 13 )
__meta__ = { __meta__ = {
...@@ -261,6 +266,7 @@ texture = SubResource( 13 ) ...@@ -261,6 +266,7 @@ texture = SubResource( 13 )
[node name="Towel" type="StaticBody2D" parent="."] [node name="Towel" type="StaticBody2D" parent="."]
position = Vector2( -67.9803, 464.817 ) position = Vector2( -67.9803, 464.817 )
rotation = 2.74191 rotation = 2.74191
z_index = 1
input_pickable = true input_pickable = true
script = ExtResource( 13 ) script = ExtResource( 13 )
__meta__ = { __meta__ = {
......
...@@ -58,11 +58,15 @@ bg_color = Color( 0.466667, 0.631373, 0.168627, 1 ) ...@@ -58,11 +58,15 @@ bg_color = Color( 0.466667, 0.631373, 0.168627, 1 )
bg_color = Color( 0.145098, 0.145098, 0.164706, 1 ) bg_color = Color( 0.145098, 0.145098, 0.164706, 1 )
[node name="Node2D" type="Node2D"] [node name="Node2D" type="Node2D"]
z_index = -1
[node name="Bedroom" parent="." instance=ExtResource( 1 )] [node name="Bedroom" parent="." instance=ExtResource( 1 )]
script = ExtResource( 4 ) script = ExtResource( 4 )
items = [ NodePath("Pants"), NodePath("Shirt"), NodePath("Sando"), NodePath("Towel"), NodePath("Laundry basket"), NodePath("Laptop"), NodePath("Pile of clothes"), NodePath("Bathroom door"), NodePath("Terrarium"), NodePath("BG") ] items = [ NodePath("Pants"), NodePath("Shirt"), NodePath("Sando"), NodePath("Towel"), NodePath("Laundry basket"), NodePath("Laptop"), NodePath("Pile of clothes"), NodePath("Bathroom door"), NodePath("Terrarium"), NodePath("BG") ]
[node name="Sprite" parent="Bedroom/BG/CollisionShape2D" index="0"]
position = Vector2( 9.0239, 16.168 )
[node name="Desk" parent="." instance=ExtResource( 26 )] [node name="Desk" parent="." instance=ExtResource( 26 )]
visible = false visible = false
script = ExtResource( 4 ) script = ExtResource( 4 )
......
...@@ -5,7 +5,7 @@ export(bool) var tracking ...@@ -5,7 +5,7 @@ export(bool) var tracking
# Called when the node enters the scene tree for the first time. # Called when the node enters the scene tree for the first time.
func _ready(): func _ready():
pass # Replace with function body. pass # Replace with function body.
func _input(event): func _unhandled_input(event):
if event is InputEventMouseButton: if event is InputEventMouseButton:
if event.button_index == BUTTON_LEFT and event.pressed: if event.button_index == BUTTON_LEFT and event.pressed:
if tracking: if tracking:
......
...@@ -28,7 +28,7 @@ func objInteraction(selected): # when an object is used on it ...@@ -28,7 +28,7 @@ func objInteraction(selected): # when an object is used on it
dialogueBox.text = flavor dialogueBox.text = flavor
else: else:
dialogueBox.text = "No flavor text found" #can replace this later! dialogueBox.text = "No flavor text found" #can replace this later!
if inventory.get_item_text(selected) == "Bobby Pins": # unlocking the door with a bobby pin if inventory.get_item_text(selected) == "Bobby pins": # unlocking the door with a bobby pin
dialogueBox.text = "I can't believe that actually worked?!" dialogueBox.text = "I can't believe that actually worked?!"
emit_signal("enter") emit_signal("enter")
unlocked = true unlocked = true
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment