renamed "DiscordSDK" to "DiscordActivity"
This commit is contained in:
Binary file not shown.
@@ -1,4 +1,4 @@
|
||||
extends Node
|
||||
|
||||
func _process(delta):
|
||||
DiscordSDK.coreupdate()
|
||||
DiscordActivity.coreupdate()
|
||||
|
@@ -1,7 +1,7 @@
|
||||
extends Node
|
||||
|
||||
func _ready():
|
||||
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()
|
||||
DiscordActivity.set_app_id(918857075105349632)
|
||||
DiscordActivity.set_details("Made with GDExtension")
|
||||
DiscordActivity.set_state("This is a test from GDScript in Godot 4") #TODO:Change functions to variables if possible
|
||||
DiscordActivity.refresh_activity()
|
||||
|
@@ -18,7 +18,7 @@ void gdextension_initialize(ModuleInitializationLevel p_level)
|
||||
ClassDB::register_class<DiscordSDK>();
|
||||
|
||||
discordsdk = memnew(DiscordSDK);
|
||||
Engine::get_singleton()->register_singleton("DiscordSDK", DiscordSDK::get_singleton());
|
||||
Engine::get_singleton()->register_singleton("DiscordActivity", DiscordSDK::get_singleton()); // Cant change the class name in the cpp files for some reason
|
||||
}
|
||||
}
|
||||
|
||||
@@ -26,7 +26,7 @@ void gdextension_terminate(ModuleInitializationLevel p_level)
|
||||
{
|
||||
if (p_level == MODULE_INITIALIZATION_LEVEL_SCENE)
|
||||
{
|
||||
Engine::get_singleton()->unregister_singleton("DiscordSDK");
|
||||
Engine::get_singleton()->unregister_singleton("DiscordActivity");
|
||||
memdelete(discordsdk);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user