added addon as plugin to simplefy gdscript user code
This commit is contained in:
Binary file not shown.
11
project/addons/discord-rpc-gd/loadaddon.gd
Normal file
11
project/addons/discord-rpc-gd/loadaddon.gd
Normal file
@@ -0,0 +1,11 @@
|
||||
extends Node
|
||||
|
||||
|
||||
# Called when the node enters the scene tree for the first time.
|
||||
func _ready():
|
||||
pass # Replace with function body.
|
||||
|
||||
|
||||
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
||||
func _process(delta):
|
||||
DiscordSDK.update()
|
7
project/addons/discord-rpc-gd/plugin.cfg
Normal file
7
project/addons/discord-rpc-gd/plugin.cfg
Normal file
@@ -0,0 +1,7 @@
|
||||
[plugin]
|
||||
|
||||
name="DiscordRPC"
|
||||
description="Takes the activity manager part from the discord-game-sdk and adds GDscript functionality."
|
||||
author="vaporvee"
|
||||
version="0.1"
|
||||
script="plugin.gd"
|
8
project/addons/discord-rpc-gd/plugin.gd
Normal file
8
project/addons/discord-rpc-gd/plugin.gd
Normal file
@@ -0,0 +1,8 @@
|
||||
@tool
|
||||
extends EditorPlugin
|
||||
|
||||
func _enter_tree():
|
||||
add_autoload_singleton("Discord", "res://addons/discord-rpc-gd/loadaddon.gd")
|
||||
|
||||
func disable_plugin():
|
||||
remove_autoload_singleton("Discord")
|
Reference in New Issue
Block a user