Added player and a basic test level
This commit is contained in:
11
utilities/Util.gd
Normal file
11
utilities/Util.gd
Normal file
@@ -0,0 +1,11 @@
|
||||
class_name Util
|
||||
extends Node
|
||||
|
||||
#add effects
|
||||
static func add_effect_to_self(node: Node, effect: PackedScene) -> void:
|
||||
#instantiate the packed scene
|
||||
var nodeInstance: Node = effect.instantiate()
|
||||
#gets the nodes global postion and makes the node instance global position that
|
||||
nodeInstance.global_position = node.global_position
|
||||
#adds it to the scene
|
||||
node.get_parent().add_child(nodeInstance)
|
||||
Reference in New Issue
Block a user