mirror of
https://github.com/creyD/ludum_dare_46.git
synced 2026-06-13 14:02:23 +02:00
changed dependencies
This commit is contained in:
@@ -38,7 +38,7 @@ func _reset_grids():
|
|||||||
|
|
||||||
|
|
||||||
func _ready():
|
func _ready():
|
||||||
var walls = get_tree().current_scene.get_child(1)
|
var walls = get_tree().current_scene.get_node("../FloorTileMap")
|
||||||
offset = walls.global_position
|
offset = walls.global_position
|
||||||
#todo put in grid_lul
|
#todo put in grid_lul
|
||||||
for x in range(14):
|
for x in range(14):
|
||||||
@@ -117,9 +117,9 @@ func get_nearest(position, kind):
|
|||||||
|
|
||||||
func _update_grid():
|
func _update_grid():
|
||||||
_reset_grids()
|
_reset_grids()
|
||||||
var world = get_tree().current_scene.get_child(2)
|
var world = get_tree().current_scene.get_node("../YSort")
|
||||||
for node in world.get_children():
|
for node in world.get_children():
|
||||||
var node_kind = node.get_child(0)
|
var node_kind = node.get_node("Kind")
|
||||||
var grid_corrds = _pixel_to_grid_coords(node.global_position)
|
var grid_corrds = _pixel_to_grid_coords(node.global_position)
|
||||||
if (_is_in_grid(grid_corrds)):
|
if (_is_in_grid(grid_corrds)):
|
||||||
if(node_kind.general != Kind.FIELD and node_kind.general != Kind.WALL):
|
if(node_kind.general != Kind.FIELD and node_kind.general != Kind.WALL):
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ func _on_Hurtbox_area_entered(area):
|
|||||||
var Hearts = load("res://Objects/Heart/Heart.tscn")
|
var Hearts = load("res://Objects/Heart/Heart.tscn")
|
||||||
|
|
||||||
#index of ysort
|
#index of ysort
|
||||||
var world = get_tree().current_scene.get_child(2)
|
var world = get_tree().current_scene.get_node("YSort")
|
||||||
if(randf()<GreenDrop):
|
if(randf()<GreenDrop):
|
||||||
var green = GreenRubies.instance()
|
var green = GreenRubies.instance()
|
||||||
world.add_child(green)
|
world.add_child(green)
|
||||||
|
|||||||
Reference in New Issue
Block a user