#20 #26 ajout d'une autre plante et de la mécanique de récolte, avec plusieurs graines possibles

This commit is contained in:
2025-08-20 09:31:40 +02:00
parent 1f301815be
commit 9de869b7af
20 changed files with 414 additions and 42 deletions

View File

@@ -4,8 +4,9 @@ class_name ItemObjectSprite
@onready var iconSprite = $Icon
func apply_texture_to_sprite(texture, item_sprite_size = 50.):
iconSprite.texture = texture
iconSprite.scale = Vector2(
1./(texture.get_width()/item_sprite_size),
1./(texture.get_height()/item_sprite_size)
)
if texture:
iconSprite.texture = texture
iconSprite.scale = Vector2(
1./(texture.get_width()/item_sprite_size),
1./(texture.get_height()/item_sprite_size)
)