Commit db072f51 authored by Julia Santos's avatar Julia Santos

Initial commit

parents
source_md5="e9e3aa84050045ad011ea475fb73b563"
dest_md5="4f1b9ed4db75aa6df3819628c9ed344d"
source_md5="ab9b97c8c6e707d42c91703ddf1df36a"
dest_md5="fd796273afd074bf6f887a8b2b892abd"
source_md5="47313fa4c47a9963fddd764e1ec6e4a8"
dest_md5="2ded9e7f9060e2b530aab678b135fc5b"
source_md5="da1b48ea031f060d05f8aeb0dc436c93"
dest_md5="133f9a4498710025979e7400c78211cc"
source_md5="ede7970a5291c9815316f1899bb161d9"
dest_md5="7da3fcb654095c01e8170dbf588b2470"
source_md5="a9916fdd5a9720978868cfa4653fb57e"
dest_md5="5909e0a52f5a94d186f49dc802e9585b"
extends StaticBody2D
onready var dialogueBox = get_parent().get_node("Panel/RichTextLabel")
onready var parent = get_parent()
onready var texture = get_node("CollisionShape2D/Sprite").get_texture()
export(bool) var retrievable #editable in the Inspector, check if this item can be placed in the inventory
export(String) var flavorText #editable in the Inspector, the flavor text that appears in the dialogue box when picked up
#onready var clickLog = File.new()
# https://padamthapa.com/blog/how-to-detect-click-inside-staticbody2d-in-godot/
func _ready():
pass # Replace with function body.
func _input_event(viewport, event, shape_idx):
if event is InputEventMouseButton:
if event.button_index == BUTTON_LEFT and event.pressed:
print("Clicked on " + self.get_name() + " " + flavorText)
dialogueBox.text = flavorText
if retrievable:
parent.get_inventory(self, texture)
queue_free()
#
#print("Clicked on " + self.get_name())
#dialogueBox.text = "Clicked on " + self.get_name()
#clickLog.open("res://log.txt",File.WRITE_READ)
#clickLog.seek_end(0)
#clickLog.store_string("Clicked on " + self.get_name() + "\n")
#clickLog.close()
# Called every frame. 'delta' is the elapsed time since the previous frame.
#func _process(delta):
# pass
extends Node2D
onready var dialogueBox = get_node("Panel/RichTextLabel")
onready var inventory = get_node("ItemList")
onready var clicks
# Called when the node enters the scene tree for the first time.
func _ready():
clicks = 0
#inventory.set_fixed_icon_size(Vector2(0,0))
#inventory.set_icon_scale(0.3)
#print(inventory.get_icon_scale())
#var file = File.new()
#file.open("res://log.txt",File.WRITE_READ)
#file.store_line("Test")
#file.close()
pass # Replace with function body.
func get_inventory(item, tex):
inventory.add_item(item.get_name(), tex)
func _input(event):
if event is InputEventMouseButton:
if event.button_index == BUTTON_LEFT and event.pressed:
print("Clicked")
inventory.unselect_all()
# Called every frame. 'delta' is the elapsed time since the previous frame.
#func _process(delta):
# pass
extends StaticBody2D
onready var dialogueBox = get_parent().get_node("Panel/RichTextLabel")
onready var parent = get_parent()
onready var texture = get_node("CollisionShape2D/Sprite").get_texture()
#onready var clickLog = File.new()
# https://padamthapa.com/blog/how-to-detect-click-inside-staticbody2d-in-godot/
func _ready():
pass # Replace with function body.
func _input_event(viewport, event, shape_idx):
if event is InputEventMouseButton:
if event.button_index == BUTTON_LEFT and event.pressed:
print("Clicked on " + self.get_name())
dialogueBox.text = "Clicked on " + self.get_name()
parent.get_inventory(self, texture)
queue_free()
#
#print("Clicked on " + self.get_name())
#dialogueBox.text = "Clicked on " + self.get_name()
#clickLog.open("res://log.txt",File.WRITE_READ)
#clickLog.seek_end(0)
#clickLog.store_string("Clicked on " + self.get_name() + "\n")
#clickLog.close()
# Called every frame. 'delta' is the elapsed time since the previous frame.
#func _process(delta):
# pass
extends "res://Item.gd"
# 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.
# Called every frame. 'delta' is the elapsed time since the previous frame.
#func _process(delta):
# pass
[gd_scene load_steps=8 format=2]
[ext_resource path="res://assets/placeholder item.png" type="Texture" id=1]
[ext_resource path="res://assets/room zoom out.png" type="Texture" id=2]
[ext_resource path="res://assets/189066690_228150108704696_3850052974465333899_n.png" type="Texture" id=3]
[ext_resource path="res://Item.gd" type="Script" id=4]
[ext_resource path="res://Main.gd" type="Script" id=5]
[ext_resource path="res://Placeholder 3.gd" type="Script" id=6]
[sub_resource type="RectangleShape2D" id=1]
[node name="Node2D" type="Node2D"]
script = ExtResource( 5 )
[node name="BG" type="Sprite" parent="."]
position = Vector2( 353.5, 274.901 )
scale = Vector2( 1.0821, 1.0737 )
texture = ExtResource( 2 )
__meta__ = {
"_edit_lock_": true
}
[node name="Panel" type="Panel" parent="."]
anchor_right = 0.791
anchor_bottom = 0.14
margin_left = 459.826
margin_top = 34.6902
margin_right = 1000.83
margin_bottom = 150.69
__meta__ = {
"_edit_group_": true,
"_edit_use_anchors_": false
}
[node name="RichTextLabel" type="RichTextLabel" parent="Panel"]
margin_left = 21.4404
margin_top = 20.0
margin_right = 251.44
margin_bottom = 49.0
scroll_active = false
__meta__ = {
"_edit_use_anchors_": false
}
[node name="Moxie" type="Sprite" parent="."]
position = Vector2( 219.565, 314.247 )
scale = Vector2( 0.287676, 0.287676 )
texture = ExtResource( 3 )
[node name="Placeholder 2" type="StaticBody2D" parent="."]
position = Vector2( 65.5159, -1.25989 )
input_pickable = true
script = ExtResource( 4 )
__meta__ = {
"_edit_group_": true
}
flavorText = "Woeee Can't pick me up!!!"
[node name="CollisionShape2D" type="CollisionShape2D" parent="Placeholder 2"]
position = Vector2( 669.45, 372.084 )
scale = Vector2( 5, 5 )
shape = SubResource( 1 )
[node name="Sprite" type="Sprite" parent="Placeholder 2/CollisionShape2D"]
position = Vector2( -0.158181, -0.0184715 )
scale = Vector2( 0.101337, 0.101337 )
texture = ExtResource( 1 )
[node name="Placeholder 3" type="StaticBody2D" parent="."]
position = Vector2( 65.5159, -1.25989 )
input_pickable = true
script = ExtResource( 6 )
__meta__ = {
"_edit_group_": true
}
[node name="CollisionShape2D" type="CollisionShape2D" parent="Placeholder 3"]
position = Vector2( 669.45, 372.084 )
scale = Vector2( 5, 5 )
shape = SubResource( 1 )
[node name="Sprite" type="Sprite" parent="Placeholder 3/CollisionShape2D"]
position = Vector2( -0.158181, -0.0184715 )
scale = Vector2( 0.101337, 0.101337 )
texture = ExtResource( 1 )
[node name="Placeholder 1" type="StaticBody2D" parent="."]
position = Vector2( -79.375, 0 )
input_pickable = true
script = ExtResource( 4 )
__meta__ = {
"_edit_group_": true
}
retrievable = true
flavorText = "I Am Your Friend Now"
[node name="CollisionShape2D" type="CollisionShape2D" parent="Placeholder 1"]
position = Vector2( 669.45, 372.084 )
scale = Vector2( 5, 5 )
shape = SubResource( 1 )
[node name="Sprite" type="Sprite" parent="Placeholder 1/CollisionShape2D"]
position = Vector2( -0.158181, -0.0184715 )
scale = Vector2( 0.101337, 0.101337 )
texture = ExtResource( 1 )
[node name="ItemList" type="ItemList" parent="."]
margin_left = 16.0
margin_top = 494.0
margin_right = 612.0
margin_bottom = 587.0
rect_pivot_offset = Vector2( 5, 0 )
custom_constants/hseparation = 10
max_columns = 5
same_column_width = true
icon_mode = 0
fixed_icon_size = Vector2( 60, 60 )
__meta__ = {
"_edit_use_anchors_": false
}
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/189066690_228150108704696_3850052974465333899_n.png-cf5807caff2a78602b3b4c6fd5d206c7.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/189066690_228150108704696_3850052974465333899_n.png"
dest_files=[ "res://.import/189066690_228150108704696_3850052974465333899_n.png-cf5807caff2a78602b3b4c6fd5d206c7.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
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/189801287_3006482753008337_1093330247503879151_n.jpg-5599abf2cfb812e408f1be5a6169d212.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/189801287_3006482753008337_1093330247503879151_n.jpg"
dest_files=[ "res://.import/189801287_3006482753008337_1093330247503879151_n.jpg-5599abf2cfb812e408f1be5a6169d212.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
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/placeholder item.png-cd6e4c1231156687d87915032ec4361d.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/placeholder item.png"
dest_files=[ "res://.import/placeholder item.png-cd6e4c1231156687d87915032ec4361d.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
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/placeholder.png-98e7930e828c35923f039562160474e1.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/placeholder.png"
dest_files=[ "res://.import/placeholder.png-98e7930e828c35923f039562160474e1.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
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/room zoom out.png-486eb2ecc698d67d477079a1747ee105.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/room zoom out.png"
dest_files=[ "res://.import/room zoom out.png-486eb2ecc698d67d477079a1747ee105.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
[gd_resource type="Environment" load_steps=2 format=2]
[sub_resource type="ProceduralSky" id=1]
[resource]
background_mode = 2
background_sky = SubResource( 1 )
icon.png

3.23 KB

[remap]
importer="texture"
type="StreamTexture"
path="res://.import/icon.png-487276ed1e3a0c39cad0279d744ee560.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://icon.png"
dest_files=[ "res://.import/icon.png-487276ed1e3a0c39cad0279d744ee560.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
Clicked on Placeholder 2
; Engine configuration file.
; It's best edited using the editor UI and not directly,
; since the parameters that go here are not all obvious.
;
; Format:
; [section] ; section goes between []
; param=value ; assign values to parameters
config_version=4
[application]
config/name="Thesis practice"
run/main_scene="res://PointnClick.tscn"
config/icon="res://icon.png"
[physics]
common/enable_pause_aware_picking=true
[rendering]
environment/default_environment="res://default_env.tres"
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