Some nice rounding in float representation
This commit is contained in:
parent
1982eb5e4e
commit
997e3c0982
6 changed files with 33 additions and 9 deletions
|
|
@ -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