17 lines
404 B
GDScript
17 lines
404 B
GDScript
tool
|
|
extends Node
|
|
class_name TK_TileMapTileDescriptor
|
|
|
|
export var texture: Texture setget _set_texture
|
|
|
|
# todo: More layer customizeability.
|
|
export var is_solid: bool
|
|
|
|
func is_traversible_for(_p_game_object: Node2D) -> bool:
|
|
return not is_solid
|
|
|
|
func _set_texture(p_texture: Texture) -> void:
|
|
texture = p_texture
|
|
if is_inside_tree():
|
|
get_parent().change_tile_texture(name, p_texture)
|