Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
To Do Break Down
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
breakdown
To Do Break Down
Commits
e8b8739c
Commit
e8b8739c
authored
Sep 21, 2021
by
Julia Santos
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
deleted NewItem
parent
db072f51
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
29 deletions
+0
-29
NewItem.gd
NewItem.gd
+0
-29
No files found.
NewItem.gd
deleted
100644 → 0
View file @
db072f51
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
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment