Some nice rounding in float representation
This commit is contained in:
parent
1982eb5e4e
commit
997e3c0982
6 changed files with 33 additions and 9 deletions
|
|
@ -10,3 +10,12 @@ class_name PlayerShip
|
|||
var selected_node: Node2D = null
|
||||
## Currency variable
|
||||
var money: float = 1000.0
|
||||
## Base which was requested to dock last
|
||||
var docking_base: Base = null
|
||||
|
||||
func destroy():
|
||||
super.destroy()
|
||||
if docking_base != null:
|
||||
docking_base.dock_ready()
|
||||
docking_base = null
|
||||
selected_node = null
|
||||
|
|
|
|||
|
|
@ -15,6 +15,7 @@ class_name StarSystem
|
|||
## Pause controller packed scene
|
||||
@export var pause_controller_scene: PackedScene
|
||||
|
||||
## Node which is colliding with mouse
|
||||
var targeted_node: Node2D = null
|
||||
|
||||
## Player ship reference. May be null.
|
||||
|
|
@ -53,11 +54,9 @@ func unpause():
|
|||
pause_controller.visible = false
|
||||
|
||||
func _process(_delta):
|
||||
# pausing
|
||||
if Input.is_action_just_released("pause"):
|
||||
unpause() if get_tree().paused else pause()
|
||||
|
||||
if player_ship != null:
|
||||
pause_controller.position = player_ship.global_position
|
||||
|
||||
func set_targeted_node(node):
|
||||
targeted_node = node
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue