more gdscript bindings
This commit is contained in:
Binary file not shown.
4
project/addons/discord-rpc-gd/discord_coreupdater.gd
Normal file
4
project/addons/discord-rpc-gd/discord_coreupdater.gd
Normal file
@@ -0,0 +1,4 @@
|
||||
extends Node
|
||||
|
||||
func _process(delta):
|
||||
DiscordSDK.coreupdate()
|
@@ -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()
|
@@ -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")
|
||||
|
@@ -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()
|
||||
|
@@ -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]
|
||||
|
||||
|
Reference in New Issue
Block a user