#42 ajout d'un inspecteur
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
extends Interactable
|
||||
class_name ItemObject
|
||||
|
||||
const ITEM_AREA_WIDTH = 10
|
||||
const ITEM_AREA_WIDTH = 20
|
||||
const ITEM_SPRITE_SIZE = 40.
|
||||
const SPRITE_SCENE : PackedScene = preload("res://entities/interactables/item_object/item_object_sprite.tscn")
|
||||
|
||||
@@ -19,7 +19,10 @@ func _init(_item = null):
|
||||
item = _item
|
||||
|
||||
func _ready():
|
||||
generate_collision(10)
|
||||
generate_collision(ITEM_AREA_WIDTH)
|
||||
|
||||
func inspected_text():
|
||||
return item.name + (" Seed" if item is Seed else "")
|
||||
|
||||
func interact(player : Player) -> bool:
|
||||
var swapped_item = player.inventory.get_item()
|
||||
|
||||
Reference in New Issue
Block a user