This repository has been archived on 2020-09-30. You can view files and clone it, but cannot push or open issues or pull requests.
odyssey-old/Scenes/Game.gd
2020-07-07 19:52:44 +02:00

17 lines
444 B
GDScript

extends Node
class_name GameInstance
onready var ui = $CanvasLayer/ui as GameUI
onready var world = $world as GameWorld
func _ready():
ui.connect("command", world, "process_command")
$world/odyssey.queue_free()
func process_command(cmd: UICommand):
match cmd.cmd_type:
UICommand.CommandType.SetShipSpeed:
world.map.ship_speed = cmd.cmd_args[0]
UICommand.CommandType.SetShipDirection:
world.map.ship_direction = cmd.cmd_args[0]