more gdscript bindings

This commit is contained in:
Yannik
2023-04-20 16:17:59 +02:00
parent d867881678
commit 9c15f3413e
8 changed files with 55 additions and 28 deletions

View File

@@ -0,0 +1,4 @@
extends Node
func _process(delta):
DiscordSDK.coreupdate()

View File

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

View File

@@ -2,7 +2,8 @@
extends EditorPlugin
func _enter_tree():
add_autoload_singleton("Discord", "res://addons/discord-rpc-gd/loadaddon.gd")
add_autoload_singleton("discord_coreupdater", "res://addons/discord-rpc-gd/discord_coreupdater.gd")
func disable_plugin():
remove_autoload_singleton("Discord")
remove_autoload_singleton("discord_coreupdater")

View File

@@ -1,6 +1,7 @@
extends Node
# Called when the node enters the scene tree for the first time.
func _ready():
DiscordSDK.debug()
DiscordSDK.set_app_id(918857075105349632)
DiscordSDK.set_details("Made with GDExtension")
DiscordSDK.set_state("This is a test from GDScript in Godot 4") #TODO:Change functions to variables if possible
DiscordSDK.refresh_activity()

View File

@@ -19,7 +19,7 @@ config/icon="res://assets/Logo_V2.png"
[autoload]
Discord="*res://addons/discord-rpc-gd/loadaddon.gd"
discord_coreupdater="*res://addons/discord-rpc-gd/discord_coreupdater.gd"
[dotnet]