Commit 8465ee8f authored by Julia Santos's avatar Julia Santos

Added event handler to oversee the functioning of the game, added more rooms...

Added event handler to oversee the functioning of the game, added more rooms and set up items in a more formal manner. Also added To Do list and adding to do list to your inventory.
parent d5db428c
source_md5="d4e9c4116d3ceadaea22077faf38f1cc"
dest_md5="5e5528505b7a4652f0ab8c6726214c29"
...@@ -6,12 +6,11 @@ func _ready(): ...@@ -6,12 +6,11 @@ func _ready():
func interaction(selected, clicked): #selected = item in inventory, clicked = item in environment func interaction(selected, clicked): #selected = item in inventory, clicked = item in environment
match clicked: match clicked:
"Placeholder 1": "Laundry basket":
match selected: match selected:
"Placeholder 2": "Shirt", "Towel", "Pants", "Sando":
return "Using Placeholder 2 on 1" return "Into the basket you go."
"Placeholder 3":
return "Using Placeholder 3 on 1"
"Placeholder 2": "Placeholder 2":
match selected: match selected:
......
extends Node2D
#UI elements
onready var quests = get_parent().get_node("UI/To do")
onready var moxie = get_parent().get_node("Moxie")
#rooms
onready var bedroom = get_parent().get_node("Bedroom")
onready var kitchen = get_parent().get_node("Kitchen")
onready var laundryBasket = get_parent().get_node("Laundry basket")
#items in the rooms that need access to the event handler
export(Array, NodePath) onready var eventItems
# 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():
quests.hide()
for item in eventItems:
get_node(item).passEvent(self)
connect_stools()
func _get_notebook():
quests.show()
func _laundry_basket():
bedroom.hide()
laundryBasket.show()
moxie.hide()
func _return_laundry():
laundryBasket.hide()
bedroom.show()
moxie.show()
func connect_stools():
get_parent().get_node("Laundry area/Stool").giveStool(get_parent().get_node("Kitchen/Stool"))
get_parent().get_node("Kitchen/Stool").giveStool(get_parent().get_node("Laundry area/Stool"))
# Called every frame. 'delta' is the elapsed time since the previous frame.
#func _process(delta):
# pass
[gd_scene load_steps=6 format=2] [gd_scene load_steps=12 format=2]
[ext_resource path="res://assets/Placeholder BGs/kitchen area.png" type="Texture" id=1] [ext_resource path="res://assets/Placeholder BGs/kitchen area.png" type="Texture" id=1]
[ext_resource path="res://assets/placeholder item.png" type="Texture" id=2] [ext_resource path="res://assets/placeholder item.png" type="Texture" id=2]
[ext_resource path="res://Item.gd" type="Script" id=3] [ext_resource path="res://Item.gd" type="Script" id=3]
[ext_resource path="res://Dialogue control - Kitchen.gd" type="Script" id=4] [ext_resource path="res://Dialogue control - Kitchen.gd" type="Script" id=4]
[ext_resource path="res://assets/Thesis Clickables/stool.png" type="Texture" id=5]
[ext_resource path="res://Stool.gd" type="Script" id=6]
[sub_resource type="RectangleShape2D" id=2] [sub_resource type="RectangleShape2D" id=1]
[sub_resource type="GDScript" id=2]
script/source = "extends StaticBody2D
#UI stuff
onready var dialogueBox
onready var inventory
onready var quests
#variables that are editable in the Inspector
export(bool) var retrievable # check if this item can be placed in the inventory
export(bool) var interactable # for environmental objects that are interactable but not retrievable
export(String) var flavorText # the flavor text that appears in the dialogue box when picked up
onready var control = get_parent().get_node(\"Dialogue control\")
#other variables
onready var texture = get_node(\"CollisionShape2D/Sprite\").get_texture()
# some references
# https://docs.godotengine.org/en/stable/getting_started/scripting/gdscript/gdscript_exports.html
# https://padamthapa.com/blog/how-to-detect-click-inside-staticbody2d-in-godot/
func _ready():
pass
func passUI(inv, dia, que): #passes the inventory and dialogue box from the parent scene to the item in the instanced scene
inventory = inv
dialogueBox = dia
quests = que
print(\"Found \" + dialogueBox.get_name())
func _input_event(viewport, event, shape_idx): # executes when clicked on
if event is InputEventMouseButton:
if event.button_index == BUTTON_LEFT and event.pressed:
#print(\"Clicked on \" + self.get_name() + \" with selected \" + str(inventory.is_anything_selected()))
if inventory.is_anything_selected() and interactable: # if the player has an item selected and they use it on something interactable
objInteraction(inventory.get_selected_items()[0])
elif inventory.is_anything_selected() and retrievable: # use object on something retrievable
objInteraction(inventory.get_selected_items()[0])
elif !inventory.is_anything_selected() and retrievable: # if they click on something retrievable w/ empty hands
pickup()
elif interactable: #for environment things that arent retrievable, and hands are empty
mouseInteraction()
func mouseInteraction(): # just clicked on it with nothing
dialogueBox.text = flavorText
func pickup(): # when it's picked up
dialogueBox.text = flavorText
inventory.add_item(self.get_name(), texture)
queue_free()
inventory.unselect_all()
func objInteraction(selected): # when an object is used on it
var flavor = control.interaction(inventory.get_item_text(selected), self.get_name())
if typeof(flavor) != 0: #checks if there's coded flavor text for this interaction
dialogueBox.text = flavor
else:
dialogueBox.text = \"No flavor text found\" #can replace this later!
inventory.unselect_all() #unselect item
"
[sub_resource type="RectangleShape2D" id=3]
extents = Vector2( 28.2389, 45.0754 )
[sub_resource type="StreamTexture" id=4]
flags = 4
load_path = "res://.import/placeholder item.png-cd6e4c1231156687d87915032ec4361d.stex"
[sub_resource type="RectangleShape2D" id=5]
extents = Vector2( 15.4169, 13.9691 )
[node name="Node2D" type="Node2D"] [node name="Node2D" type="Node2D"]
...@@ -31,13 +106,57 @@ flavorText = "NEW THING" ...@@ -31,13 +106,57 @@ flavorText = "NEW THING"
[node name="CollisionShape2D" type="CollisionShape2D" parent="Placeholder A"] [node name="CollisionShape2D" type="CollisionShape2D" parent="Placeholder A"]
position = Vector2( 669.45, 372.084 ) position = Vector2( 669.45, 372.084 )
scale = Vector2( 5, 5 ) scale = Vector2( 5, 5 )
shape = SubResource( 2 ) shape = SubResource( 1 )
[node name="Sprite" type="Sprite" parent="Placeholder A/CollisionShape2D"] [node name="Sprite" type="Sprite" parent="Placeholder A/CollisionShape2D"]
position = Vector2( -0.158181, -0.0184715 ) position = Vector2( -0.158181, -0.0184715 )
scale = Vector2( 0.101337, 0.101337 ) scale = Vector2( 0.101337, 0.101337 )
texture = ExtResource( 2 ) texture = ExtResource( 2 )
[node name="Fridge" type="StaticBody2D" parent="."]
position = Vector2( 744.289, 314.826 )
scale = Vector2( 0.829244, 0.829244 )
input_pickable = true
script = SubResource( 2 )
__meta__ = {
"_edit_group_": true
}
interactable = true
flavorText = "I'm gonna munch. I'm gonna crunch."
[node name="CollisionShape2D" type="CollisionShape2D" parent="Fridge"]
position = Vector2( 1.25211, 0.295086 )
scale = Vector2( 5, 5 )
shape = SubResource( 3 )
[node name="Sprite" type="Sprite" parent="Fridge/CollisionShape2D"]
visible = false
position = Vector2( -0.158181, -0.0184715 )
scale = Vector2( 0.101337, 0.101337 )
texture = SubResource( 4 )
[node name="Stool" type="StaticBody2D" parent="."]
position = Vector2( 112.641, 527.75 )
scale = Vector2( 0.829244, 0.829244 )
input_pickable = true
script = ExtResource( 6 )
__meta__ = {
"_edit_group_": true
}
retrievable = true
flavorText = "A sturdy stool."
[node name="CollisionShape2D" type="CollisionShape2D" parent="Stool"]
position = Vector2( 1.25211, 0.295086 )
scale = Vector2( 5, 5 )
shape = SubResource( 5 )
[node name="Sprite" type="Sprite" parent="Stool/CollisionShape2D"]
visible = false
position = Vector2( -0.158181, -0.0184715 )
scale = Vector2( 0.101337, 0.101337 )
texture = ExtResource( 5 )
[node name="Dialogue control" type="Control" parent="."] [node name="Dialogue control" type="Control" parent="."]
visible = false visible = false
margin_right = 40.0 margin_right = 40.0
......
[gd_scene load_steps=10 format=2]
[ext_resource path="res://assets/Placeholder BGs/laundry area.png" type="Texture" id=1]
[ext_resource path="res://Item.gd" type="Script" id=2]
[ext_resource path="res://assets/Thesis Clickables/stool.png" type="Texture" id=3]
[ext_resource path="res://Stool.gd" type="Script" id=4]
[sub_resource type="RectangleShape2D" id=2]
extents = Vector2( 32.8504, 48.713 )
[sub_resource type="StreamTexture" id=3]
flags = 4
load_path = "res://.import/placeholder item.png-cd6e4c1231156687d87915032ec4361d.stex"
[sub_resource type="RectangleShape2D" id=5]
extents = Vector2( 16.7582, 15.6005 )
[sub_resource type="StreamTexture" id=6]
flags = 4
load_path = "res://.import/placeholder item.png-cd6e4c1231156687d87915032ec4361d.stex"
[sub_resource type="RectangleShape2D" id=8]
extents = Vector2( 15.4169, 13.9691 )
[node name="Laundry area" type="Node2D"]
[node name="BG" type="Sprite" parent="."]
position = Vector2( 518.958, 300.969 )
scale = Vector2( 0.825827, 0.825827 )
texture = ExtResource( 1 )
__meta__ = {
"_edit_lock_": true
}
[node name="Dialogue control" type="Control" parent="."]
margin_right = 40.0
margin_bottom = 40.0
__meta__ = {
"_edit_use_anchors_": false
}
[node name="Laundry door" type="StaticBody2D" parent="."]
position = Vector2( 322.984, 296.426 )
scale = Vector2( 0.829244, 0.829244 )
input_pickable = true
script = ExtResource( 2 )
__meta__ = {
"_edit_group_": true
}
interactable = true
flavorText = "I can't get in there. These bags are in the way..."
[node name="CollisionShape2D" type="CollisionShape2D" parent="Laundry door"]
position = Vector2( 4.11099, 2.53656 )
scale = Vector2( 5, 5 )
shape = SubResource( 2 )
[node name="Sprite" type="Sprite" parent="Laundry door/CollisionShape2D"]
visible = false
position = Vector2( -0.186829, 0.46521 )
scale = Vector2( 0.163649, 0.163649 )
texture = SubResource( 3 )
[node name="Label" type="Label" parent="Laundry door"]
visible = false
margin_left = -74.0
margin_top = -27.7054
margin_right = 84.0
margin_bottom = 3.29462
text = "Groceries
"
align = 1
__meta__ = {
"_edit_use_anchors_": false
}
[node name="Groceries" type="StaticBody2D" parent="."]
position = Vector2( 335.711, 460.475 )
scale = Vector2( 0.829244, 0.829244 )
input_pickable = true
script = ExtResource( 2 )
__meta__ = {
"_edit_group_": true
}
interactable = true
flavorText = "Might trip on these."
[node name="CollisionShape2D" type="CollisionShape2D" parent="Groceries"]
position = Vector2( 4.11099, 2.53656 )
scale = Vector2( 5, 5 )
shape = SubResource( 5 )
[node name="Sprite" type="Sprite" parent="Groceries/CollisionShape2D"]
position = Vector2( -0.186829, 0.46521 )
scale = Vector2( 0.163649, 0.163649 )
texture = SubResource( 6 )
[node name="Label" type="Label" parent="Groceries"]
margin_left = -74.0
margin_top = -27.7054
margin_right = 84.0
margin_bottom = 3.29462
text = "Groceries
"
align = 1
__meta__ = {
"_edit_use_anchors_": false
}
[node name="Stool" type="StaticBody2D" parent="."]
position = Vector2( 844.487, 532.24 )
scale = Vector2( 0.829244, 0.829244 )
input_pickable = true
script = ExtResource( 4 )
__meta__ = {
"_edit_group_": true
}
retrievable = true
flavorText = "A sturdy stool."
[node name="CollisionShape2D" type="CollisionShape2D" parent="Stool"]
position = Vector2( 1.25211, 0.295086 )
scale = Vector2( 5, 5 )
shape = SubResource( 8 )
[node name="Sprite" type="Sprite" parent="Stool/CollisionShape2D"]
visible = false
position = Vector2( -0.158181, -0.0184715 )
scale = Vector2( 0.101337, 0.101337 )
texture = ExtResource( 3 )
extends "res://Item.gd"
signal retrieved
# 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 mouseInteraction():
emit_signal("retrieved")
pass
func passEvent(handler):
connect("retrieved", handler,"_laundry_basket")
pass
func objInteraction(selected): # when an object is used on it
var flavor = control.interaction(inventory.get_item_text(selected), self.get_name())
if typeof(flavor) != 0: #checks if there's coded flavor text for this interaction
dialogueBox.text = flavor
else:
dialogueBox.text = "No flavor text found" #can replace this later!
var selectedText = inventory.get_item_text(selected)
if selectedText == "Pants" or selectedText == "Shirt" or selectedText == "Sando" or selectedText == "Towel":
inventory.remove_item(selected)
inventory.unselect_all() #unselect item
# Called every frame. 'delta' is the elapsed time since the previous frame.
#func _process(delta):
# pass
[gd_scene load_steps=9 format=2]
[ext_resource path="res://assets/Placeholder BGs/basket zoom.PNG" type="Texture" id=1]
[ext_resource path="res://assets/Placeholder BGs/notebook zoom in.png" type="Texture" id=2]
[ext_resource path="res://To do list.gd" type="Script" id=3]
[ext_resource path="res://Return_laundry_basket.gd" type="Script" id=4]
[sub_resource type="RectangleShape2D" id=1]
extents = Vector2( 16.2181, 18.4658 )
[sub_resource type="StreamTexture" id=2]
flags = 4
load_path = "res://.import/notebook.png-dac36d6e437642ffc9e789867a2b96f8.stex"
[sub_resource type="RectangleShape2D" id=3]
extents = Vector2( 17.4279, 15.7667 )
[sub_resource type="StreamTexture" id=4]
flags = 4
load_path = "res://.import/return arrow.png-ba7c2fea6c5a220a249845f29bbe9177.stex"
[node name="Node2D" type="Node2D"]
[node name="basket zoom" type="Sprite" parent="."]
position = Vector2( 492.215, 300.161 )
scale = Vector2( 0.834157, 0.834157 )
texture = ExtResource( 1 )
[node name="To do list" type="StaticBody2D" parent="."]
position = Vector2( 598.615, 222.448 )
rotation = -0.558505
scale = Vector2( 0.4, 0.4 )
input_pickable = true
script = ExtResource( 3 )
__meta__ = {
"_edit_group_": true
}
retrievable = true
[node name="CollisionShape2D" type="CollisionShape2D" parent="To do list"]
position = Vector2( -2.31012, 0.749359 )
scale = Vector2( 5, 5 )
shape = SubResource( 1 )
[node name="Sprite" type="Sprite" parent="To do list/CollisionShape2D"]
position = Vector2( 0.219727, -1.64844 )
scale = Vector2( 0.0395079, 0.0395079 )
texture = SubResource( 2 )
[node name="Return" type="StaticBody2D" parent="."]
position = Vector2( 89.3327, 397.956 )
scale = Vector2( 0.8, 0.8 )
input_pickable = true
script = ExtResource( 4 )
__meta__ = {
"_edit_group_": true
}
interactable = true
[node name="CollisionShape2D" type="CollisionShape2D" parent="Return"]
position = Vector2( -2.31012, 0.749359 )
scale = Vector2( 5, 5 )
shape = SubResource( 3 )
[node name="Sprite" type="Sprite" parent="Return/CollisionShape2D"]
position = Vector2( -0.670166, 0.427979 )
scale = Vector2( 0.0395079, 0.0395079 )
texture = SubResource( 4 )
[node name="notebook zoom in" type="Sprite" parent="."]
visible = false
position = Vector2( 494.889, 298 )
scale = Vector2( 0.838889, 0.838889 )
texture = ExtResource( 2 )
[node name="Dialogue control" type="Control" parent="."]
margin_right = 40.0
margin_bottom = 40.0
__meta__ = {
"_edit_use_anchors_": false
}
...@@ -3,9 +3,9 @@ extends Node2D ...@@ -3,9 +3,9 @@ extends Node2D
#UI variables #UI variables
onready var dialogueBox = get_parent().get_node("Moxie/Camera2D/Dialogue Box/RichTextLabel") onready var dialogueBox = get_parent().get_node("UI/Dialogue Box/RichTextLabel")
onready var inventory = get_parent().get_node("Moxie/Camera2D/Inventory") onready var inventory = get_parent().get_node("UI/Inventory")
onready var quests = get_parent().get_node("Moxie/Camera2D/Panel/Quests") onready var quests = get_parent().get_node("UI/To do/Quests")
#variables that are editable in the Inspector #variables that are editable in the Inspector
export(Array, NodePath) onready var items export(Array, NodePath) onready var items
......
extends Control extends Control
onready var rooms = [self.owner.get_node("Bedroom"), self.owner.get_node("Kitchen")] # 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 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")
func _ready(): # Called when the node enters the scene tree for the first time. func _ready(): # Called when the node enters the scene tree for the first time.
current = 0 current = 0
rooms[1].hide() #still not sure we need to do this but just in case rooms[1].hide() #still not sure we need to do this but just in case
...@@ -13,10 +14,18 @@ func _pressedRight(): # when right arrow is clicked, move to the next adjacent s ...@@ -13,10 +14,18 @@ func _pressedRight(): # when right arrow is clicked, move to the next adjacent s
rooms[current].hide() rooms[current].hide()
current += 1 current += 1
rooms[current].show() rooms[current].show()
if current == rooms.size()-1:
right.hide()
if current >= 1:
left.show()
func _pressedLeft(): # when left arrow is clicked, move to the next adjacent screen func _pressedLeft(): # when left arrow is clicked, move to the next adjacent screen
if(current != 0): if(current != 0):
rooms[current].hide() rooms[current].hide()
current -= 1 current -= 1
rooms[current].show() rooms[current].show()
if (current == 0):
left.hide()
if current < rooms.size() - 1:
right.show()
[gd_scene load_steps=15 format=2] [gd_scene load_steps=18 format=2]
[ext_resource path="res://Test room 1.tscn" type="PackedScene" id=1] [ext_resource path="res://Test room 1.tscn" type="PackedScene" id=1]
[ext_resource path="res://assets/189066690_228150108704696_3850052974465333899_n.png" type="Texture" id=2] [ext_resource path="res://assets/189066690_228150108704696_3850052974465333899_n.png" type="Texture" id=2]
...@@ -11,6 +11,12 @@ ...@@ -11,6 +11,12 @@
[ext_resource path="res://assets/Thesis Clickables/left arrow.png" type="Texture" id=9] [ext_resource path="res://assets/Thesis Clickables/left arrow.png" type="Texture" id=9]
[ext_resource path="res://Arrows.gd" type="Script" id=10] [ext_resource path="res://Arrows.gd" type="Script" id=10]
[ext_resource path="res://Quests.gd" type="Script" id=11] [ext_resource path="res://Quests.gd" type="Script" id=11]
[ext_resource path="res://Event Handler.gd" type="Script" id=12]
[ext_resource path="res://Laundry basket.tscn" type="PackedScene" id=13]
[ext_resource path="res://Laundry area.tscn" type="PackedScene" id=14]
[sub_resource type="StyleBoxFlat" id=3]
bg_color = Color( 0.984314, 0.847059, 0.435294, 1 )
[sub_resource type="StyleBoxFlat" id=1] [sub_resource type="StyleBoxFlat" id=1]
bg_color = Color( 0.466667, 0.631373, 0.168627, 1 ) bg_color = Color( 0.466667, 0.631373, 0.168627, 1 )
...@@ -18,90 +24,120 @@ bg_color = Color( 0.466667, 0.631373, 0.168627, 1 ) ...@@ -18,90 +24,120 @@ bg_color = Color( 0.466667, 0.631373, 0.168627, 1 )
[sub_resource type="StyleBoxFlat" id=2] [sub_resource type="StyleBoxFlat" id=2]
bg_color = Color( 0.145098, 0.145098, 0.164706, 1 ) bg_color = Color( 0.145098, 0.145098, 0.164706, 1 )
[sub_resource type="StyleBoxFlat" id=3]
bg_color = Color( 0.984314, 0.847059, 0.435294, 1 )
[node name="Node2D" type="Node2D"] [node name="Node2D" type="Node2D"]
[node name="Bedroom" parent="." instance=ExtResource( 1 )] [node name="Bedroom" parent="." instance=ExtResource( 1 )]
script = ExtResource( 4 ) script = ExtResource( 4 )
items = [ NodePath("Placeholder 1"), NodePath("Placeholder 2"), NodePath("Placeholder 3"), NodePath("Placeholder 4") ] items = [ NodePath("Pants"), NodePath("Shirt"), NodePath("Sando"), NodePath("Towel"), NodePath("Laundry basket"), NodePath("Laptop"), NodePath("Pile of clothes") ]
[node name="Kitchen" parent="." instance=ExtResource( 8 )] [node name="Kitchen" parent="." instance=ExtResource( 8 )]
visible = false visible = false
script = ExtResource( 4 ) script = ExtResource( 4 )
items = [ NodePath("Placeholder A") ] items = [ NodePath("Placeholder A"), NodePath("Fridge"), NodePath("Stool") ]
[node name="Laundry basket" parent="." instance=ExtResource( 13 )]
visible = false
position = Vector2( 24.0379, 4.2581 )
script = ExtResource( 4 )
items = [ NodePath("To do list"), NodePath("Return") ]
[node name="Laundry area" parent="." instance=ExtResource( 14 )]
visible = false
script = ExtResource( 4 )
items = [ NodePath("Laundry door"), NodePath("Groceries"), NodePath("Stool") ]
[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") ]
[node name="Moxie" type="Sprite" parent="."] [node name="Moxie" type="Sprite" parent="."]
position = Vector2( 414.953, 338.642 ) position = Vector2( 214.135, 386.725 )
scale = Vector2( 0.349515, 0.349515 ) scale = Vector2( 0.349515, 0.349515 )
texture = ExtResource( 2 ) texture = ExtResource( 2 )
[node name="Camera2D" type="Camera2D" parent="Moxie"] [node name="Camera2D" type="Camera2D" parent="Moxie"]
position = Vector2( 293.69, -103 ) position = Vector2( 860.161, -240.572 )
scale = Vector2( 2.86111, 2.86111 ) scale = Vector2( 2.86111, 2.86111 )
current = true current = true
[node name="ProgressBar" type="ProgressBar" parent="Moxie/Camera2D"] [node name="UI" type="Control" parent="."]
margin_left = -497.761 margin_left = 214.135
margin_top = -283.681 margin_top = 386.725
margin_right = -64.7609 margin_right = 254.135
margin_bottom = -241.681 margin_bottom = 426.725
custom_styles/fg = SubResource( 1 )
custom_styles/bg = SubResource( 2 )
value = 35.0
percent_visible = false
__meta__ = { __meta__ = {
"_edit_use_anchors_": false "_edit_use_anchors_": false
} }
[node name="Dialogue Box" type="Panel" parent="Moxie/Camera2D"] [node name="To do" type="Panel" parent="UI"]
margin_left = -57.0 margin_left = 483.699
margin_top = -284.0 margin_top = 120.82
margin_right = 484.0 margin_right = 770.699
margin_bottom = -192.0 margin_bottom = 513.82
custom_styles/panel = SubResource( 3 )
__meta__ = { __meta__ = {
"_edit_group_": true,
"_edit_use_anchors_": false "_edit_use_anchors_": false
} }
[node name="RichTextLabel" type="RichTextLabel" parent="Moxie/Camera2D/Dialogue Box"] [node name="Title" type="RichTextLabel" parent="UI/To do"]
margin_left = 21.4404 anchor_right = 1.0
margin_top = 20.0 anchor_bottom = 1.0
margin_right = 251.44 margin_left = 13.0
margin_bottom = 49.0 margin_top = 16.0
scroll_active = false margin_right = -213.0
margin_bottom = -362.0
custom_colors/default_color = Color( 0, 0, 0, 1 )
text = "To Do:"
__meta__ = {
"_edit_use_anchors_": true
}
[node name="Quests" type="RichTextLabel" parent="UI/To do"]
margin_left = 14.7614
margin_top = 39.8421
margin_right = 272.761
margin_bottom = 256.842
custom_colors/default_color = Color( 0, 0, 0, 1 )
script = ExtResource( 11 )
__meta__ = { __meta__ = {
"_edit_use_anchors_": false "_edit_use_anchors_": false
} }
quests = PoolStringArray( "Do Lab", "Laundry" )
[node name="Movement Handler" type="Control" parent="Moxie/Camera2D"] [node name="Inventory" type="ItemList" parent="UI"]
margin_left = -501.602 margin_left = -201.361
margin_top = 191.358 margin_top = 128.912
margin_right = -461.602 margin_right = 394.639
margin_bottom = 231.358 margin_bottom = 204.912
script = ExtResource( 6 ) rect_pivot_offset = Vector2( 5, 0 )
custom_constants/hseparation = 10
max_columns = 8
same_column_width = true
icon_mode = 0
fixed_icon_size = Vector2( 60, 60 )
script = ExtResource( 3 )
__meta__ = { __meta__ = {
"_edit_use_anchors_": false "_edit_use_anchors_": false
} }
[node name="Right" type="TextureButton" parent="Moxie/Camera2D"] [node name="Button" type="Button" parent="UI"]
margin_left = 410.346 margin_left = 348.838
margin_top = -44.4802 margin_top = 169.861
margin_right = 1410.35 margin_right = 417.838
margin_bottom = 955.52 margin_bottom = 200.861
rect_scale = Vector2( 0.1, 0.1 ) text = "Deselect"
texture_normal = ExtResource( 7 ) script = ExtResource( 5 )
script = ExtResource( 10 )
__meta__ = { __meta__ = {
"_edit_use_anchors_": false "_edit_use_anchors_": false
} }
[node name="Left" type="TextureButton" parent="Moxie/Camera2D"] [node name="Left" type="TextureButton" parent="UI"]
margin_left = -505.0 visible = false
margin_top = -44.0 margin_left = -204.361
margin_right = 495.0 margin_top = -128.084
margin_bottom = 956.0 margin_right = 795.639
margin_bottom = 871.916
rect_scale = Vector2( 0.1, 0.1 ) rect_scale = Vector2( 0.1, 0.1 )
texture_normal = ExtResource( 9 ) texture_normal = ExtResource( 9 )
script = ExtResource( 10 ) script = ExtResource( 10 )
...@@ -109,69 +145,64 @@ __meta__ = { ...@@ -109,69 +145,64 @@ __meta__ = {
"_edit_use_anchors_": false "_edit_use_anchors_": false
} }
[node name="Inventory" type="ItemList" parent="Moxie/Camera2D"] [node name="Right" type="TextureButton" parent="UI"]
margin_left = -502.0 margin_left = 710.985
margin_top = 212.995 margin_top = -128.564
margin_right = 94.0 margin_right = 1710.99
margin_bottom = 288.995 margin_bottom = 871.437
rect_pivot_offset = Vector2( 5, 0 ) rect_scale = Vector2( 0.1, 0.1 )
custom_constants/hseparation = 10 texture_normal = ExtResource( 7 )
max_columns = 5 script = ExtResource( 10 )
same_column_width = true
icon_mode = 0
fixed_icon_size = Vector2( 60, 60 )
script = ExtResource( 3 )
__meta__ = { __meta__ = {
"_edit_use_anchors_": false "_edit_use_anchors_": false
} }
[node name="Button" type="Button" parent="Moxie/Camera2D"] [node name="Movement Handler" type="Control" parent="UI"]
margin_left = 48.1992 margin_left = -200.963
margin_top = 253.944 margin_top = 107.275
margin_right = 117.199 margin_right = -160.963
margin_bottom = 284.944 margin_bottom = 147.275
text = "Deselect" script = ExtResource( 6 )
script = ExtResource( 5 )
__meta__ = { __meta__ = {
"_edit_use_anchors_": false "_edit_use_anchors_": false
} }
[node name="Panel" type="Panel" parent="Moxie/Camera2D"] [node name="Dialogue Box" type="Panel" parent="UI"]
margin_left = 183.06 margin_left = 243.639
margin_top = 204.903 margin_top = -368.084
margin_right = 470.06 margin_right = 784.639
margin_bottom = 597.903 margin_bottom = -276.084
custom_styles/panel = SubResource( 3 )
__meta__ = { __meta__ = {
"_edit_group_": true,
"_edit_use_anchors_": false "_edit_use_anchors_": false
} }
[node name="Title" type="RichTextLabel" parent="Moxie/Camera2D/Panel"] [node name="RichTextLabel" type="RichTextLabel" parent="UI/Dialogue Box"]
anchor_right = 1.0 margin_left = 21.4404
anchor_bottom = 1.0 margin_top = 20.0
margin_left = 13.0 margin_right = 251.44
margin_top = 16.0 margin_bottom = 49.0
margin_right = -213.0 scroll_active = false
margin_bottom = -362.0
custom_colors/default_color = Color( 0, 0, 0, 1 )
text = "To Do:"
__meta__ = { __meta__ = {
"_edit_use_anchors_": true "_edit_use_anchors_": false
} }
[node name="Quests" type="RichTextLabel" parent="Moxie/Camera2D/Panel"] [node name="ProgressBar" type="ProgressBar" parent="UI"]
margin_left = 14.7614 margin_left = -197.122
margin_top = 39.8421 margin_top = -367.765
margin_right = 272.761 margin_right = 235.878
margin_bottom = 256.842 margin_bottom = -325.765
custom_colors/default_color = Color( 0, 0, 0, 1 ) custom_styles/fg = SubResource( 1 )
script = ExtResource( 11 ) custom_styles/bg = SubResource( 2 )
value = 80.0
percent_visible = false
__meta__ = { __meta__ = {
"_edit_use_anchors_": false "_edit_use_anchors_": false
} }
quests = PoolStringArray( "Do Lab", "Laundry" )
[connection signal="pressed" from="Moxie/Camera2D/Button" to="Moxie/Camera2D/Inventory" method="_on_Button_pressed"] [connection signal="pressed" from="UI/Button" to="UI/Inventory" method="_on_Button_pressed"]
[editable path="Bedroom"] [editable path="Bedroom"]
[editable path="Kitchen"] [editable path="Kitchen"]
[editable path="Laundry basket"]
[editable path="Laundry area"]
extends "res://Item.gd"
signal returnLaundry
# Called when the node enters the scene tree for the first time.
func _ready():
pass # Replace with function body.
func passEvent(handler):
connect("returnLaundry", handler, "_return_laundry")
func mouseInteraction():
emit_signal("returnLaundry")
extends "res://Item.gd"
signal taken
# 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 pickup():
.pickup()
emit_signal("taken")
func giveStool(stool):
connect("taken", stool, "stool_taken")
func stool_taken():
queue_free()
# Called every frame. 'delta' is the elapsed time since the previous frame.
#func _process(delta):
# pass
This diff is collapsed.
extends "res://Item.gd"
signal notebook_got
#onready var eventHandler
# 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 pickup():
.pickup()
emit_signal("notebook_got")
func passEvent(handler):
connect("notebook_got", handler, "_get_notebook")
# Called every frame. 'delta' is the elapsed time since the previous frame.
#func _process(delta):
# pass
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/stool.png-b6d5929c61c4b9ae5eedcc1fdcdcf9dc.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/Thesis Clickables/stool.png"
dest_files=[ "res://.import/stool.png-b6d5929c61c4b9ae5eedcc1fdcdcf9dc.stex" ]
[params]
compress/mode=0
compress/lossy_quality=0.7
compress/hdr_mode=0
compress/bptc_ldr=0
compress/normal_map=0
flags/repeat=0
flags/filter=true
flags/mipmaps=false
flags/anisotropic=false
flags/srgb=2
process/fix_alpha_border=true
process/premult_alpha=false
process/HDR_as_SRGB=false
process/invert_color=false
stream=false
size_limit=0
detect_3d=true
svg/scale=1.0
...@@ -12,7 +12,7 @@ config_version=4 ...@@ -12,7 +12,7 @@ config_version=4
config/name="Thesis practice" config/name="Thesis practice"
run/main_scene="res://Multi.tscn" run/main_scene="res://Multi.tscn"
config/icon="res://icon.png" config/icon="res://assets/189066690_228150108704696_3850052974465333899_n.png"
[physics] [physics]
......
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