#13 suite du developpement d'inventaire avec le rajout des ItemObjects, description sur le GUI, items d'exemple et corrections mineures
This commit was merged in pull request #35.
This commit is contained in:
@@ -14,7 +14,7 @@ func _init():
|
||||
if not terrainData:
|
||||
terrainData = TerrainData.new()
|
||||
|
||||
func add_entity(e : Node2D, container : Node2D):
|
||||
func add_entity(e : Node2D, container : Node2D = entityContainer):
|
||||
if e.get_parent():
|
||||
e.get_parent().remove_child(e)
|
||||
|
||||
@@ -33,6 +33,11 @@ func create_entity_container() -> Node2D:
|
||||
|
||||
return container
|
||||
|
||||
func drop_item(item: Item, item_position : Vector2):
|
||||
var item_object = ItemObject.new(item)
|
||||
add_entity(item_object)
|
||||
item_object.global_position = item_position
|
||||
|
||||
func create_border_limit() -> StaticBody2D:
|
||||
var staticBody = StaticBody2D.new()
|
||||
var staticBodyCollision = CollisionPolygon2D.new()
|
||||
|
||||
Reference in New Issue
Block a user