2020-03-22 16:04:01 +00:00
|
|
|
extends Control
|
|
|
|
|
|
|
|
|
|
|
|
func _ready():
|
|
|
|
$stats_window.popup()
|
|
|
|
|
2020-03-22 16:31:06 +00:00
|
|
|
func change_douleur( value ):
|
|
|
|
$stats_window/douleur.value += value
|
|
|
|
if value > 0.0:
|
|
|
|
$stats_window/oubli.value -= value/2
|
|
|
|
|
|
|
|
func change_oubli( value ):
|
|
|
|
$stats_window/oubli.value += value
|
|
|
|
if value > 0.0:
|
|
|
|
$stats_window/douleur.value -= value/2
|
|
|
|
|
|
|
|
func change_trauma( value ):
|
|
|
|
$stats_window/trauma.value += value
|
|
|
|
|
2020-03-22 16:04:01 +00:00
|
|
|
func set_douleur( value ):
|
2020-03-22 16:31:06 +00:00
|
|
|
var delta = value - $stats_window/douleur.value
|
2020-03-22 16:04:01 +00:00
|
|
|
$stats_window/douleur.value = value
|
2020-03-22 16:31:06 +00:00
|
|
|
if delta > 0.0:
|
|
|
|
$stats_window/oubli.value -= delta/2
|
2020-03-22 16:04:01 +00:00
|
|
|
func set_oubli( value ):
|
2020-03-22 16:31:06 +00:00
|
|
|
var delta = value - $stats_window/oubli.value
|
|
|
|
$stats_window/oubli.value = value
|
|
|
|
if delta > 0.0:
|
|
|
|
$stats_window/douleur.value -= delta/2
|
2020-03-22 16:04:01 +00:00
|
|
|
func set_trauma( value ):
|
|
|
|
$stats_window/trauma.value = value
|