This version introduces new class System
which does nothing new but helps making code shorter, by omitting QGodot
calls.
Simply extends the system class with extends QGodot.System
and say Goodbye to the constant QGodot
callings!
extends QGodot.System
# 'QGodot.query' gets shortened to just 'query'
onready var owned_horses := query("KinematicBody2D", ["Inventory", "horse"])
func _ready() -> void:
# 'QGodot.to_signal' gets shortened to just 'to_signal'
yield(to_signal("game_loaded"), "completed")
print("Game is fully loaded!")
func _process(_delta: float) -> void:
# Only API reference that has been changed, you must call it as function instead
# 'QGodot.is_second_frame' -> 'is_second_frame()'
if is_second_frame():
print("This is second frame.")