glitch-in-the-system/Nodes/Pickup.gd

8 lines
200 B
GDScript3
Raw Normal View History

2019-11-04 02:31:05 +01:00
extends Node2D
var tileMap
func _ready():
var tileMap = get_node("/root/World/TileMap")
var tilePos = tileMap.world_to_map(position)
if(tileMap.get_cell(tilePos.x, tilePos.y) != 0):
queue_free()