mirror of
https://github.com/git-learning-game/oh-my-git.git
synced 2025-05-01 20:42:01 +02:00
Badges when you don't use cards
This commit is contained in:
parent
e87e29a3ed
commit
aed852122b
10 changed files with 278 additions and 12 deletions
scenes
21
scenes/cli_badge.gd
Normal file
21
scenes/cli_badge.gd
Normal file
|
@ -0,0 +1,21 @@
|
|||
extends TextureRect
|
||||
|
||||
export var active = true setget _set_active
|
||||
export var sparkling = true setget _set_sparkling
|
||||
|
||||
|
||||
func _ready():
|
||||
_set_sparkling(sparkling)
|
||||
|
||||
func _set_active(new_active):
|
||||
active = new_active
|
||||
if active:
|
||||
self.modulate = Color(1, 1, 1)
|
||||
else:
|
||||
self.modulate = Color(0.2, 0.2, 0.2)
|
||||
sparkling = false
|
||||
|
||||
func _set_sparkling(new_sparkling):
|
||||
sparkling = new_sparkling
|
||||
if $Particles2D:
|
||||
$Particles2D.emitting = sparkling
|
Loading…
Add table
Add a link
Reference in a new issue