1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-10 13:00:37 +00:00

Completed the support for plugins! It is not possible to add plugins.

Not all APIs are provided yet, please request whathever you are missing.
Some example plugins are provided in demos/plugins. Just copy them to a folder in your project named addons/ and then enable them from the project settings.
Have fun!
This commit is contained in:
Juan Linietsky
2016-02-27 23:10:44 -03:00
parent a97c1ca8f9
commit 6fc1c3a4d1
50 changed files with 2070 additions and 706 deletions

View File

@@ -0,0 +1,12 @@
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())

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 809 B

View File

@@ -0,0 +1,18 @@
tool
extends EditorPlugin
func _enter_tree():
# When this plugin node enters tree, add the custom type
add_custom_type("Heart","Node2D",preload("res://addons/custom_node/heart.gd"),preload("res://addons/custom_node/heart_icon.png"))
func _exit_tree():
# When the plugin node exits the tree, remove the custom type
remove_custom_type("Heart")

View File

@@ -0,0 +1,14 @@
[plugin]
name="Heart"
description="Adds a new Heart node in 2D"
author="Juan Linietsky"
version="1.0"
script="heart_plugin.gd"