mirror of
https://github.com/godotengine/godot-demo-projects.git
synced 2026-01-04 06:09:46 +03:00
Made a new material IO plugin because the old one wasn't working. The new material IO plugin uses JSON instead of a custom resource because you currently cannot save custom resources from GDScript.
13 lines
223 B
GDScript
13 lines
223 B
GDScript
tool
|
|
extends Node2D
|
|
|
|
|
|
var heart = preload("res://addons/custom_node/heart.png")
|
|
|
|
func _draw():
|
|
draw_texture(heart,-heart.get_size()/2)
|
|
|
|
func _get_item_rect():
|
|
#override
|
|
return Rect2(-heart.get_size()/2,heart.get_size())
|