summaryrefslogtreecommitdiff
path: root/hello_world/demo/Main.gd
diff options
context:
space:
mode:
Diffstat (limited to 'hello_world/demo/Main.gd')
-rw-r--r--hello_world/demo/Main.gd9
1 files changed, 4 insertions, 5 deletions
diff --git a/hello_world/demo/Main.gd b/hello_world/demo/Main.gd
index 11b332b..c5174eb 100644
--- a/hello_world/demo/Main.gd
+++ b/hello_world/demo/Main.gd
@@ -1,12 +1,11 @@
extends Node2D
-var hello_world
+var hello_world_plugin : HelloWorldPlugin
func _ready():
- if Engine.has_singleton("HelloWorld"):
- hello_world = Engine.get_singleton("HelloWorld")
+ hello_world_plugin = preload("res://addons/hello_world_plugin/interface/hello_world_plugin.gd").new()
func _on_Button_pressed():
- if hello_world:
- hello_world.helloWorld()
+ if hello_world_plugin:
+ hello_world_plugin.helloWorld()