31 lines
847 B
GDScript
31 lines
847 B
GDScript
extends Control
|
|
|
|
|
|
func _ready():
|
|
$stats_window.popup()
|
|
|
|
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
|
|
|
|
func set_douleur( value ):
|
|
var delta = value - $stats_window/douleur.value
|
|
$stats_window/douleur.value = value
|
|
if delta > 0.0:
|
|
$stats_window/oubli.value -= delta/2
|
|
func set_oubli( value ):
|
|
var delta = value - $stats_window/oubli.value
|
|
$stats_window/oubli.value = value
|
|
if delta > 0.0:
|
|
$stats_window/douleur.value -= delta/2
|
|
func set_trauma( value ):
|
|
$stats_window/trauma.value = value
|