Commented notice() function

This commit is contained in:
Noah 2022-10-28 15:17:54 -05:00
parent f02ab01606
commit cd6396cada

View File

@ -7,13 +7,21 @@ var local_version # The version installed on this computer
var os_name # The simplified name of the OS (linux, or windows)
var suffix #
# Load in the Notice_msg scene (Will be instanced)
var Notice_msg = load("res://Notice_msg.tscn")
# Define notice()
# Takes a message and a type, then instances a new Notice_msg instance
func notice(msg, type):
# Get a new Notice_msg instance,
var notice = Notice_msg.instance()
# Pass arguments to notice node
notice.message = msg
notice.type = type
# Set the position
notice.set_position(Vector2(20, $Notices.get_child_count()*30))
$Notices.add_child(notice)
# Every _process tick