Some nice rounding in float representation

This commit is contained in:
2ndbeam 2024-05-14 08:07:29 +03:00
commit 997e3c0982
6 changed files with 33 additions and 9 deletions

View file

@ -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