mirror of
https://github.com/git-learning-game/oh-my-git.git
synced 2025-05-05 05:02:02 +02:00
Show the current state of the badge in a level, instead of the future one
This commit is contained in:
parent
21f55fd705
commit
94462e9123
3 changed files with 23 additions and 6 deletions
scenes
|
@ -2,6 +2,7 @@ extends TextureRect
|
|||
|
||||
export var active = true setget _set_active
|
||||
export var sparkling = true setget _set_sparkling
|
||||
export var impossible = false setget _set_impossible
|
||||
|
||||
|
||||
func _ready():
|
||||
|
@ -10,12 +11,16 @@ func _ready():
|
|||
func _set_active(new_active):
|
||||
active = new_active
|
||||
if active:
|
||||
self.modulate = Color(1, 1, 1)
|
||||
self.self_modulate = Color(1, 1, 1)
|
||||
else:
|
||||
self.modulate = Color(0.2, 0.2, 0.2)
|
||||
self.self_modulate = Color(0.2, 0.2, 0.2)
|
||||
sparkling = false
|
||||
|
||||
func _set_sparkling(new_sparkling):
|
||||
sparkling = new_sparkling
|
||||
if $Particles2D:
|
||||
$Particles2D.emitting = sparkling
|
||||
|
||||
func _set_impossible(new_impossible):
|
||||
impossible = new_impossible
|
||||
$Nope.visible = impossible
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue