résolution du bug de swap d'item #94
This commit is contained in:
@@ -24,7 +24,7 @@ func _ready():
|
||||
object_sprite.apply_texture_to_sprite(item.icon, ITEM_SPRITE_SIZE)
|
||||
object_sprite.generate_particles(item.get_particles())
|
||||
|
||||
func pointer_text():
|
||||
func pointer_text() -> String:
|
||||
var name_suffix = ""
|
||||
|
||||
if item is Seed:
|
||||
@@ -41,12 +41,9 @@ func inspector_info() -> Inspector.Info:
|
||||
return item.inspector_info()
|
||||
|
||||
func interact(player : Player) -> bool:
|
||||
var swapped_item = player.pick_item(item)
|
||||
player.pick_item(item)
|
||||
|
||||
if swapped_item:
|
||||
item = swapped_item
|
||||
else :
|
||||
pickup_animation(player)
|
||||
pickup_animation(player)
|
||||
|
||||
return true
|
||||
|
||||
|
||||
Reference in New Issue
Block a user