ajout de la porte et équilibrage des mutations
This commit is contained in:
@@ -19,11 +19,28 @@ func _ready():
|
||||
func set_item(i : Item = item):
|
||||
item = i
|
||||
if is_node_ready():
|
||||
%ParticleSprite1.visible = false
|
||||
%ParticleSprite2.visible = false
|
||||
%ParticleSprite1.modulate = Color.WHITE
|
||||
%ParticleSprite2.modulate = Color.WHITE
|
||||
%ItemIconSprite.texture = null
|
||||
|
||||
if i and i.icon:
|
||||
%ItemIconSprite.texture = i.icon
|
||||
%ItemIconSprite.pixel_size = SPRITE_SIZE / i.icon.get_width()
|
||||
else:
|
||||
%ItemIconSprite.texture = null
|
||||
|
||||
for j in range(len(i.get_particles())):
|
||||
print(i.get_particles()[j])
|
||||
if j == 0:
|
||||
%ParticleSprite1.visible = true
|
||||
%ParticleSprite1.texture = i.get_particles()[j].texture
|
||||
%ParticleSprite1.modulate = i.get_particles()[j].color
|
||||
if j == 1:
|
||||
%ParticleSprite2.visible = true
|
||||
%ParticleSprite2.texture = i.get_particles()[j].texture
|
||||
%ParticleSprite2.modulate = i.get_particles()[j].color
|
||||
|
||||
|
||||
|
||||
func set_state(s := state):
|
||||
state = s
|
||||
|
||||
Reference in New Issue
Block a user