Function game_logic::entrypoint [−][src]
pub async fn entrypoint(force_recreate_savefiles: bool)
Expand description
This is the game logic entrypoint. Despite being async, +
Function game_logic::entrypoint [−][src]
pub async fn entrypoint(force_recreate_savefiles: bool)
Expand description
This is the game logic entrypoint. Despite being async, this is expected to block the main thread for rendering and stuff.
Setting force_recreate_savefiles
will cause the game to recreate its settings and savestate files.
Crate game_logic[−][src]
Expand description
This file is the main entry point for the game logic.
+Crate game_logic
Version 0.1.0
Crate game_logic[−][src]
Expand description
This file is the main entry point for the game logic.
Overview
The main function in this module is entrypoint()
. This is called from desktop_wrapper
to start the game.
This module also includes all the other sub-modules of the game. If you are viewing this document from the web, click on the modules below to see more info.
diff --git a/rustdoc/src/game_logic/lib.rs.html b/rustdoc/src/game_logic/lib.rs.html index 756e90a6..83f85042 100644 --- a/rustdoc/src/game_logic/lib.rs.html +++ b/rustdoc/src/game_logic/lib.rs.html @@ -100,6 +100,14 @@ 98 99 100 +101 +102 +103 +104 +105 +106 +107 +108//! This file is the main entry point for the game logic.
//!
//! ## Overview
@@ -123,6 +131,8 @@
//! - If you want to add data to the save state file or settings file, check out the [`persistent`](persistent/index.html) module.
#![doc(issue_tracker_base_url = "https://github.com/Ewpratten/ludum-dare-50/issues/")]
+use discord_sdk::activity::Assets;
+
use crate::{
asset_manager::load_json_structure,
discord::{DiscordRpcSignal, DiscordRpcThreadHandle},
@@ -171,6 +181,12 @@
.expect("Failed to connect to Discord RPC");
let event_loop_discord_tx = discord.get_channel();
let discord_task_handle = discord.begin_thread_non_blocking();
+ event_loop_discord_tx
+ .send(DiscordRpcSignal::ChangeAssets(Assets::default().large(
+ project_constants.discord.artwork.get("logo").unwrap(),
+ Some(""),
+ )))
+ .await.unwrap();
// Blocking call to the graphics rendering loop.
rendering::event_loop::handle_graphics_blocking(