Update Tools.gd
This commit is contained in:
parent
e47c7691d7
commit
960c0277ae
1 changed files with 7 additions and 3 deletions
10
Tools.gd
10
Tools.gd
|
|
@ -1,8 +1,12 @@
|
||||||
extends Node
|
extends Node
|
||||||
|
|
||||||
func time_to_seconds(hours_value : int, seconds_value : int) -> int:
|
func time_to_seconds(hours_value : int, minutes_value : int) -> int:
|
||||||
return 0
|
var hour_seconds : int = hours_value * 60 * 60
|
||||||
|
var minutes_seconds : int = minutes_value * 60
|
||||||
|
return hour_seconds + minutes_seconds
|
||||||
|
|
||||||
func seconds_to_time(seconds : int) -> Dictionary:
|
func seconds_to_time(seconds : int) -> Dictionary:
|
||||||
return {"Hours":0,"Seconds":0}
|
var hours : int = floori(float(seconds)/3600)
|
||||||
|
var minutes : int = int(float(seconds % 3600)/60)
|
||||||
|
return {"h":hours,"m":minutes}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue