Conveyor
This commit is contained in:
parent
cb9aef6761
commit
222960a824
19 changed files with 282 additions and 22 deletions
|
@ -13,6 +13,9 @@ class_name Structure
|
|||
get:
|
||||
return dimensions
|
||||
|
||||
## Inventory of this structure
|
||||
@export var inventory : Inventory
|
||||
|
||||
## Debug draw of points
|
||||
func _draw() -> void:
|
||||
if Engine.is_editor_hint():
|
||||
|
@ -23,7 +26,9 @@ func _draw() -> void:
|
|||
## Get structure at tile coordinates relative to this structure [br]
|
||||
## dv : Vector2 - get position in tiles [br]
|
||||
func get_relative(dv : Vector2) -> Structure:
|
||||
return get_parent().get_at(global_position+dv*Globals.GRID_SIZE)
|
||||
if get_parent() is GridController:
|
||||
return get_parent().get_at(global_position+dv*Globals.GRID_SIZE)
|
||||
return null
|
||||
|
||||
## Check structure is in zone and does not collide with any other structures [br]
|
||||
## Returns true if structure is in zone and does not collide with any other structure [br]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue