Commit 4bde6453 authored by Julia Santos's avatar Julia Santos

Coded in doorway to/from bathroom

parent d6b94d0d
extends "res://Item.gd"
signal enter
# Declare member variables here. Examples:
# var a = 2
# var b = "text"
# Called when the node enters the scene tree for the first time.
func _ready():
pass # Replace with function body.
func passEvent(handler):
connect("enter", handler,"_bathroom_enter")
pass
func mouseInteraction():
emit_signal("enter")
pass
[gd_scene load_steps=15 format=2]
[gd_scene load_steps=16 format=2]
[ext_resource path="res://Dialogue Contro - Bathrooml.gd" type="Script" id=1]
[ext_resource path="res://assets/room zoom out.png" type="Texture" id=2]
[ext_resource path="res://assets/placeholder.png" type="Texture" id=3]
[ext_resource path="res://Item.gd" type="Script" id=4]
[ext_resource path="res://assets/placeholder item.png" type="Texture" id=5]
[ext_resource path="res://Door - to Bedroom.gd" type="Script" id=6]
[sub_resource type="RectangleShape2D" id=1]
extents = Vector2( 156.074, 141.192 )
......@@ -159,7 +160,7 @@ __meta__ = {
[node name="Door - to Bedroom" type="StaticBody2D" parent="."]
position = Vector2( 934.312, 201.87 )
input_pickable = true
script = ExtResource( 4 )
script = ExtResource( 6 )
__meta__ = {
"_edit_group_": true
}
......@@ -285,7 +286,7 @@ __meta__ = {
"_edit_use_anchors_": false
}
[node name="Dialogue Control" type="Control" parent="."]
[node name="Dialogue control" type="Control" parent="."]
margin_right = 40.0
margin_bottom = 40.0
script = ExtResource( 1 )
......
extends "res://Item.gd"
signal exit
# Declare member variables here. Examples:
# var a = 2
# var b = "text"
# Called when the node enters the scene tree for the first time.
func _ready():
pass # Replace with function body.
func passEvent(handler):
connect("exit", handler,"_bathroom_exit")
pass
func mouseInteraction():
emit_signal("exit")
pass
......@@ -11,6 +11,7 @@ onready var dialogue = get_parent().get_node("UI/Dialogue Box/RichTextLabel")
#rooms
onready var bedroom = get_parent().get_node("Bedroom")
onready var bathroom = get_parent().get_node("Bathroom")
onready var kitchen = get_parent().get_node("Kitchen")
onready var laundryBasket = get_parent().get_node("Laundry basket")
onready var laundryArea = get_parent().get_node("Laundry area")
......@@ -59,6 +60,14 @@ func _return_laundry(): # returning from laundry basket view
bedroom.show()
zoom_out()
func _bathroom_enter():
bedroom.hide()
bathroom.show()
func _bathroom_exit():
bathroom.hide()
bedroom.show()
func _open_fridge(): # looking into the fridge
kitchen.hide()
fridge.show()
......
extends Control
onready var rooms = [self.owner.get_node("Bedroom"), self.owner.get_node("Laundry area"), self.owner.get_node("Kitchen"), self.owner.get_node("Bathroom")] # array of all the screens available to Moxie at the moment
onready var rooms = [self.owner.get_node("Bedroom"), self.owner.get_node("Laundry area"), self.owner.get_node("Kitchen")] # array of all the screens available to Moxie at the moment
onready var current # index of the room Moxie is currently in
onready var left = get_parent().get_node("Left")
onready var right = get_parent().get_node("Right")
......
......@@ -39,9 +39,9 @@ bg_color = Color( 0.145098, 0.145098, 0.164706, 1 )
[node name="Bedroom" parent="." instance=ExtResource( 1 )]
script = ExtResource( 4 )
items = [ NodePath("Pants"), NodePath("Shirt"), NodePath("Sando"), NodePath("Towel"), NodePath("Laundry basket"), NodePath("Laptop"), NodePath("Pile of clothes") ]
items = [ NodePath("Pants"), NodePath("Shirt"), NodePath("Sando"), NodePath("Towel"), NodePath("Laundry basket"), NodePath("Laptop"), NodePath("Pile of clothes"), NodePath("Bathroom door") ]
[node name="Laundry basket" parent="Bedroom" index="1"]
[node name="Laundry basket" parent="Bedroom" index="2"]
position = Vector2( 492.444, 254.362 )
[node name="Kitchen" parent="." instance=ExtResource( 8 )]
......@@ -78,7 +78,7 @@ items = [ NodePath("Mirror"), NodePath("Lab Note - Bathroom"), NodePath("Toilet"
[node name="Event Handler" type="Node2D" parent="."]
position = Vector2( 460.602, 18.6417 )
script = ExtResource( 12 )
eventItems = [ NodePath("../Laundry basket/To do list"), NodePath("../Bedroom/Laundry basket"), NodePath("../Laundry basket/Return"), NodePath("../Fridge/Return"), NodePath("../Kitchen/Fridge"), NodePath("../Laundry area/Groceries"), NodePath("../Fridge/Energy handler"), NodePath("../Laundry area/Dialogue control"), NodePath("../Laundry - Notepad/Return"), NodePath("../Laundry - Notepad/Dialogue control") ]
eventItems = [ NodePath("../Laundry basket/To do list"), NodePath("../Bedroom/Laundry basket"), NodePath("../Laundry basket/Return"), NodePath("../Fridge/Return"), NodePath("../Kitchen/Fridge"), NodePath("../Laundry area/Groceries"), NodePath("../Fridge/Energy handler"), NodePath("../Laundry area/Dialogue control"), NodePath("../Laundry - Notepad/Return"), NodePath("../Laundry - Notepad/Dialogue control"), NodePath("../Bedroom/Bathroom door"), NodePath("../Bathroom/Door - to Bedroom") ]
[node name="Moxie" type="Sprite" parent="."]
position = Vector2( 214.135, 386.725 )
......
......@@ -6,7 +6,6 @@ func _ready():
pass # Replace with function body.
func passEvent(handler):
print("clicked on return")
connect("returnFridge", handler, "_return_fridge")
func mouseInteraction():
......
[gd_scene load_steps=20 format=2]
[gd_scene load_steps=23 format=2]
[ext_resource path="res://assets/room zoom out.png" type="Texture" id=1]
[ext_resource path="res://assets/placeholder item.png" type="Texture" id=2]
......@@ -9,6 +9,7 @@
[ext_resource path="res://Placeholder 4.gd" type="Script" id=7]
[ext_resource path="res://assets/Thesis Clickables/clothes pile.png" type="Texture" id=8]
[ext_resource path="res://Laundry basket.gd" type="Script" id=9]
[ext_resource path="res://Bathroom door.gd" type="Script" id=10]
[sub_resource type="RectangleShape2D" id=1]
extents = Vector2( 14.2862, 14.7497 )
......@@ -28,22 +29,38 @@ extents = Vector2( 16.0423, 12.4535 )
flags = 4
load_path = "res://.import/trail 3.png-9960f4c5b964f5aca36ca6c97e309a5d.stex"
[sub_resource type="RectangleShape2D" id=7]
[sub_resource type="RectangleShape2D" id=8]
extents = Vector2( 13.5319, 24.0995 )
[sub_resource type="StreamTexture" id=8]
[sub_resource type="StreamTexture" id=9]
flags = 4
load_path = "res://.import/trail 3.png-9960f4c5b964f5aca36ca6c97e309a5d.stex"
[sub_resource type="RectangleShape2D" id=9]
[sub_resource type="RectangleShape2D" id=10]
[sub_resource type="StreamTexture" id=11]
flags = 4
load_path = "res://.import/trail 3.png-9960f4c5b964f5aca36ca6c97e309a5d.stex"
[sub_resource type="RectangleShape2D" id=12]
extents = Vector2( 13.7803, 7.3572 )
[sub_resource type="StreamTexture" id=10]
[sub_resource type="StreamTexture" id=13]
flags = 4
load_path = "res://.import/trail 4.png-981c4881d0d8d742f95645909a2023bf.stex"
[node name="Node2D" type="Node2D"]
position = Vector2( 319.541, 3.36359 )
[node name="Dialogue control" type="Control" parent="."]
visible = false
margin_right = 40.0
margin_bottom = 40.0
script = ExtResource( 4 )
__meta__ = {
"_edit_use_anchors_": false
}
[node name="BG" type="Sprite" parent="."]
position = Vector2( 353.5, 274.901 )
scale = Vector2( 1.0821, 1.0737 )
......@@ -157,6 +174,27 @@ position = Vector2( -0.277301, -0.137165 )
scale = Vector2( 0.0197574, 0.0197574 )
texture = SubResource( 6 )
[node name="Bathroom door" type="StaticBody2D" parent="."]
position = Vector2( 337.878, 203.36 )
scale = Vector2( 0.9, 0.9 )
input_pickable = true
script = ExtResource( 10 )
__meta__ = {
"_edit_group_": true
}
interactable = true
[node name="CollisionShape2D" type="CollisionShape2D" parent="Bathroom door"]
position = Vector2( -16.4264, -2.27527 )
scale = Vector2( 5, 5 )
shape = SubResource( 8 )
[node name="Sprite" type="Sprite" parent="Bathroom door/CollisionShape2D"]
visible = false
position = Vector2( -0.277301, -0.137165 )
scale = Vector2( 0.0197574, 0.0197574 )
texture = SubResource( 9 )
[node name="Sando" type="StaticBody2D" parent="."]
position = Vector2( -217.74, 306.626 )
rotation = -3.0456
......@@ -172,12 +210,12 @@ flavorText = "If I hide my work under my laundry, it'll disappear. Haha no."
[node name="CollisionShape2D" type="CollisionShape2D" parent="Sando"]
position = Vector2( -3.5491, 1.06189 )
scale = Vector2( 5, 5 )
shape = SubResource( 7 )
shape = SubResource( 10 )
[node name="Sprite" type="Sprite" parent="Sando/CollisionShape2D"]
position = Vector2( -0.277301, -0.137165 )
scale = Vector2( 0.0197574, 0.0197574 )
texture = SubResource( 8 )
texture = SubResource( 11 )
[node name="Towel" type="StaticBody2D" parent="."]
position = Vector2( 58.8578, 390.735 )
......@@ -193,18 +231,9 @@ flavorText = "Augh my back."
[node name="CollisionShape2D" type="CollisionShape2D" parent="Towel"]
position = Vector2( -3.5491, 1.06189 )
scale = Vector2( 5, 5 )
shape = SubResource( 9 )
shape = SubResource( 12 )
[node name="Sprite" type="Sprite" parent="Towel/CollisionShape2D"]
position = Vector2( -0.218535, -1.57275 )
scale = Vector2( 0.03, 0.03 )
texture = SubResource( 10 )
[node name="Dialogue control" type="Control" parent="."]
visible = false
margin_right = 40.0
margin_bottom = 40.0
script = ExtResource( 4 )
__meta__ = {
"_edit_use_anchors_": false
}
texture = SubResource( 13 )
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