Merge branch 'master' into ewpratten/colliders_api
This commit is contained in:
commit
3a37d7b715
BIN
game/dist/assets/audio/button_click.ogg
vendored
Normal file
BIN
game/dist/assets/audio/button_click.ogg
vendored
Normal file
Binary file not shown.
@ -10,11 +10,15 @@
|
|||||||
//! The resources are loaded via [`asset_manager`](./asset_manager/index.html) in their own thread so we do not block the renderer.
|
//! The resources are loaded via [`asset_manager`](./asset_manager/index.html) in their own thread so we do not block the renderer.
|
||||||
|
|
||||||
use poll_promise::Promise;
|
use poll_promise::Promise;
|
||||||
use raylib::{RaylibHandle, RaylibThread};
|
use raylib::{RaylibHandle, RaylibThread, audio::Sound};
|
||||||
|
|
||||||
|
use crate::asset_manager::load_sound_from_internal_data;
|
||||||
|
|
||||||
/// Global resource package
|
/// Global resource package
|
||||||
#[derive(Debug)]
|
#[derive(Debug)]
|
||||||
pub struct GlobalResources {}
|
pub struct GlobalResources {
|
||||||
|
pub button_click_sound: Sound
|
||||||
|
}
|
||||||
|
|
||||||
impl GlobalResources {
|
impl GlobalResources {
|
||||||
/// Load the resources (**blocking**)
|
/// Load the resources (**blocking**)
|
||||||
@ -24,6 +28,12 @@ impl GlobalResources {
|
|||||||
raylib: &mut RaylibHandle,
|
raylib: &mut RaylibHandle,
|
||||||
rl_thread: &RaylibThread,
|
rl_thread: &RaylibThread,
|
||||||
) -> Self {
|
) -> Self {
|
||||||
Self {}
|
|
||||||
|
// Load the button click sound
|
||||||
|
let button_click_sound = load_sound_from_internal_data("assets/audio/button_click.ogg").unwrap();
|
||||||
|
|
||||||
|
Self {
|
||||||
|
button_click_sound
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -33,14 +33,14 @@ extern crate approx; // For the macro `relative_eq!`
|
|||||||
extern crate log; // For the `info!`, `warn!`, etc. macros
|
extern crate log; // For the `info!`, `warn!`, etc. macros
|
||||||
|
|
||||||
pub(crate) mod asset_manager;
|
pub(crate) mod asset_manager;
|
||||||
|
pub(crate) mod coord_convert;
|
||||||
pub(crate) mod discord;
|
pub(crate) mod discord;
|
||||||
pub(crate) mod global_resource_package;
|
pub(crate) mod global_resource_package;
|
||||||
|
pub(crate) mod model;
|
||||||
pub(crate) mod persistent;
|
pub(crate) mod persistent;
|
||||||
pub(crate) mod project_constants;
|
pub(crate) mod project_constants;
|
||||||
pub(crate) mod rendering;
|
pub(crate) mod rendering;
|
||||||
pub(crate) mod scenes;
|
pub(crate) mod scenes;
|
||||||
pub(crate) mod model;
|
|
||||||
pub(crate) mod coord_convert;
|
|
||||||
|
|
||||||
/// This is the game logic entrypoint. Despite being async,
|
/// This is the game logic entrypoint. Despite being async,
|
||||||
/// this is expected to block the main thread for rendering and stuff.
|
/// this is expected to block the main thread for rendering and stuff.
|
||||||
@ -84,6 +84,8 @@ pub async fn entrypoint(force_recreate_savefiles: bool) {
|
|||||||
project_constants.target_fps,
|
project_constants.target_fps,
|
||||||
&project_constants,
|
&project_constants,
|
||||||
event_loop_discord_tx,
|
event_loop_discord_tx,
|
||||||
|
&mut settings,
|
||||||
|
&mut save_state,
|
||||||
)
|
)
|
||||||
.await;
|
.await;
|
||||||
|
|
||||||
|
@ -10,12 +10,15 @@ use serde::{Deserialize, Serialize};
|
|||||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||||
pub struct PersistentGameSettings {
|
pub struct PersistentGameSettings {
|
||||||
// TODO: Add data here.
|
// TODO: Add data here.
|
||||||
|
pub volume: Option<f32>,
|
||||||
}
|
}
|
||||||
|
|
||||||
// Add any default values here.
|
// Add any default values here.
|
||||||
impl Default for PersistentGameSettings {
|
impl Default for PersistentGameSettings {
|
||||||
fn default() -> Self {
|
fn default() -> Self {
|
||||||
Self {}
|
Self {
|
||||||
|
volume: Some(0.5),
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -10,10 +10,13 @@
|
|||||||
use std::cell::RefCell;
|
use std::cell::RefCell;
|
||||||
|
|
||||||
use crate::discord::DiscordChannel;
|
use crate::discord::DiscordChannel;
|
||||||
|
use crate::persistent::save_state::GameSaveState;
|
||||||
|
use crate::persistent::settings::PersistentGameSettings;
|
||||||
use crate::project_constants::ProjectConstants;
|
use crate::project_constants::ProjectConstants;
|
||||||
use crate::rendering::core_renderer_sm::{PreloadState, RenderBackendStates};
|
use crate::rendering::core_renderer_sm::{PreloadState, RenderBackendStates};
|
||||||
use crate::rendering::screens::sm_failure_screen;
|
use crate::rendering::screens::sm_failure_screen;
|
||||||
use crate::scenes::SceneRenderDelegate;
|
use crate::scenes::SceneRenderDelegate;
|
||||||
|
use raylib::audio::RaylibAudio;
|
||||||
use raylib::consts::KeyboardKey;
|
use raylib::consts::KeyboardKey;
|
||||||
use raylib::prelude::RaylibDraw;
|
use raylib::prelude::RaylibDraw;
|
||||||
use raylib::RaylibBuilder;
|
use raylib::RaylibBuilder;
|
||||||
@ -24,6 +27,8 @@ pub async fn handle_graphics_blocking<ConfigBuilder>(
|
|||||||
target_frames_per_second: u32,
|
target_frames_per_second: u32,
|
||||||
constants: &ProjectConstants,
|
constants: &ProjectConstants,
|
||||||
discord_signaling: DiscordChannel,
|
discord_signaling: DiscordChannel,
|
||||||
|
game_settings: &mut PersistentGameSettings,
|
||||||
|
save_state: &mut GameSaveState
|
||||||
) where
|
) where
|
||||||
ConfigBuilder: FnOnce(&mut RaylibBuilder),
|
ConfigBuilder: FnOnce(&mut RaylibBuilder),
|
||||||
{
|
{
|
||||||
@ -42,13 +47,24 @@ pub async fn handle_graphics_blocking<ConfigBuilder>(
|
|||||||
raylib_handle.set_exit_key(None);
|
raylib_handle.set_exit_key(None);
|
||||||
raylib_handle.set_target_fps(target_frames_per_second);
|
raylib_handle.set_target_fps(target_frames_per_second);
|
||||||
|
|
||||||
|
// Set up audio
|
||||||
|
debug!("Set up Audio");
|
||||||
|
let audio_subsystem = RaylibAudio::init_audio_device();
|
||||||
|
audio_subsystem.set_master_volume(0.4);
|
||||||
|
|
||||||
// Set up the internal screens
|
// Set up the internal screens
|
||||||
let mut loading_screen = crate::rendering::screens::loading_screen::LoadingScreen::new();
|
let mut loading_screen = crate::rendering::screens::loading_screen::LoadingScreen::new();
|
||||||
let mut sm_failure_screen = sm_failure_screen::SmFailureScreen::new();
|
let mut sm_failure_screen = sm_failure_screen::SmFailureScreen::new();
|
||||||
|
|
||||||
// Set up the main render delegate
|
// Set up the main render delegate
|
||||||
let mut render_delegate =
|
let mut render_delegate = SceneRenderDelegate::on_game_start(
|
||||||
SceneRenderDelegate::on_game_start(&mut raylib_handle, &raylib_thread, constants);
|
&mut raylib_handle,
|
||||||
|
&raylib_thread,
|
||||||
|
constants,
|
||||||
|
audio_subsystem,
|
||||||
|
game_settings,
|
||||||
|
save_state,
|
||||||
|
);
|
||||||
|
|
||||||
// Handle loading the resources and rendering the loading screen
|
// Handle loading the resources and rendering the loading screen
|
||||||
log::trace!("Running event loop");
|
log::trace!("Running event loop");
|
||||||
@ -109,6 +125,8 @@ pub async fn handle_graphics_blocking<ConfigBuilder>(
|
|||||||
&discord_signaling,
|
&discord_signaling,
|
||||||
&global_resources,
|
&global_resources,
|
||||||
constants,
|
constants,
|
||||||
|
game_settings,
|
||||||
|
save_state,
|
||||||
)
|
)
|
||||||
.await;
|
.await;
|
||||||
|
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
//! This scene encompasses the main menu system
|
//! This scene encompasses the main menu system
|
||||||
|
|
||||||
|
use na::Vector1;
|
||||||
use nalgebra as na;
|
use nalgebra as na;
|
||||||
use raylib::{
|
use raylib::{
|
||||||
ffi::{GetMouseX, GetMouseY, IsMouseButtonDown, Texture},
|
ffi::{GetMouseX, GetMouseY, IsMouseButtonDown, Texture},
|
||||||
@ -9,7 +10,7 @@ use raylib::{
|
|||||||
use crate::{
|
use crate::{
|
||||||
discord::{DiscordChannel, DiscordRpcSignal},
|
discord::{DiscordChannel, DiscordRpcSignal},
|
||||||
global_resource_package::GlobalResources,
|
global_resource_package::GlobalResources,
|
||||||
project_constants::ProjectConstants,
|
project_constants::ProjectConstants, persistent::settings::PersistentGameSettings,
|
||||||
};
|
};
|
||||||
|
|
||||||
#[derive(Debug, Clone)]
|
#[derive(Debug, Clone)]
|
||||||
@ -25,6 +26,7 @@ pub enum MenuStateSignal {
|
|||||||
#[derive(Debug)]
|
#[derive(Debug)]
|
||||||
pub struct MainMenu {
|
pub struct MainMenu {
|
||||||
pub has_updated_discord_rpc: bool,
|
pub has_updated_discord_rpc: bool,
|
||||||
|
volume_percentage: f32,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl MainMenu {
|
impl MainMenu {
|
||||||
@ -33,9 +35,11 @@ impl MainMenu {
|
|||||||
raylib_handle: &mut RaylibHandle,
|
raylib_handle: &mut RaylibHandle,
|
||||||
thread: &RaylibThread,
|
thread: &RaylibThread,
|
||||||
constants: &ProjectConstants,
|
constants: &ProjectConstants,
|
||||||
|
game_settings: &mut PersistentGameSettings
|
||||||
) -> Self {
|
) -> Self {
|
||||||
Self {
|
Self {
|
||||||
has_updated_discord_rpc: false,
|
has_updated_discord_rpc: false,
|
||||||
|
volume_percentage: game_settings.volume.unwrap_or(0.5),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -46,6 +50,8 @@ impl MainMenu {
|
|||||||
discord: &DiscordChannel,
|
discord: &DiscordChannel,
|
||||||
global_resources: &GlobalResources,
|
global_resources: &GlobalResources,
|
||||||
constants: &ProjectConstants,
|
constants: &ProjectConstants,
|
||||||
|
audio_subsystem: &mut RaylibAudio,
|
||||||
|
game_settings: &mut PersistentGameSettings
|
||||||
) -> MenuStateSignal {
|
) -> MenuStateSignal {
|
||||||
// Handle updating discord RPC
|
// Handle updating discord RPC
|
||||||
if !self.has_updated_discord_rpc {
|
if !self.has_updated_discord_rpc {
|
||||||
@ -70,73 +76,278 @@ impl MainMenu {
|
|||||||
let mouse_x = draw.get_mouse_x();
|
let mouse_x = draw.get_mouse_x();
|
||||||
let mouse_y = draw.get_mouse_y();
|
let mouse_y = draw.get_mouse_y();
|
||||||
|
|
||||||
//I wanna see where mouseeee
|
//TODO Errase later
|
||||||
draw.draw_text(&mouse_x.to_string(), 20, 5, 20, Color::BLACK);
|
draw.draw_text(&mouse_x.to_string(), 20, 5, 20, Color::BLACK);
|
||||||
draw.draw_text(&mouse_y.to_string(), 70, 5, 20, Color::BLACK);
|
draw.draw_text(&mouse_y.to_string(), 70, 5, 20, Color::BLACK);
|
||||||
|
|
||||||
|
//Screen Size
|
||||||
|
let window_height = draw.get_screen_height();
|
||||||
|
let window_width = draw.get_screen_width();
|
||||||
|
|
||||||
// TODO: Render stuff
|
// TODO: Render stuff
|
||||||
|
//Label Colors
|
||||||
|
let label_colors = Color::BLACK;
|
||||||
|
let label_shadow_colors = Color::GRAY;
|
||||||
|
|
||||||
//Initial Option placeholder words in the main menu
|
//Initial Option placeholder words in the main menu
|
||||||
draw.draw_text("Game Title", 100, 90, 60, Color::BLACK);
|
draw.draw_text("Game Title", 100, 90, 60, label_colors);
|
||||||
draw.draw_text("Start Game", 100, 190, 34, Color::BLACK);
|
draw.draw_text("Start Game", 100, 190, 34, label_colors);
|
||||||
draw.draw_text("Options", 100, 250, 34, Color::BLACK);
|
draw.draw_text("Credits", 100, 410, 34, label_colors);
|
||||||
draw.draw_text("Volume", 100, 300, 34, Color::BLACK);
|
draw.draw_text("Leaderboard", 100, 470, 34, label_colors);
|
||||||
draw.draw_text("Credits", 100, 410, 34, Color::BLACK);
|
draw.draw_text("Exit", 100, 550, 34, label_colors);
|
||||||
draw.draw_text("Leaderboard", 100, 470, 34, Color::BLACK);
|
|
||||||
draw.draw_text("Exit", 100, 550, 34, Color::BLACK);
|
|
||||||
|
|
||||||
//First two are starting X and Y position, last two finishing X and Y. Made to resemble a box
|
//First two are starting X and Y position, last two finishing X and Y. Made to resemble a box
|
||||||
|
|
||||||
if mouse_x >= 100 && mouse_y >= 193 && mouse_x <= 290 && mouse_y <= 216 {
|
if mouse_x >= 100 && mouse_y >= 193 && mouse_x <= 290 && mouse_y <= 216 {
|
||||||
//Insides while make a lil shade for it to look cool
|
//Insides while make a lil shade for it to look cool
|
||||||
draw.draw_text("Start Game", 103, 191, 34, Color::GRAY);
|
draw.draw_text("Start Game", 103, 191, 34, label_shadow_colors);
|
||||||
draw.draw_text("Start Game", 100, 190, 34, Color::BLACK);
|
draw.draw_text("Start Game", 100, 190, 34, label_colors);
|
||||||
if draw.is_mouse_button_pressed(MouseButton::MOUSE_LEFT_BUTTON) {
|
if draw.is_mouse_button_pressed(MouseButton::MOUSE_LEFT_BUTTON) {
|
||||||
|
audio_subsystem.play_sound(&global_resources.button_click_sound);
|
||||||
return MenuStateSignal::StartGame;
|
return MenuStateSignal::StartGame;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if mouse_x >= 100 && mouse_y >= 250 && mouse_x <= 222 && mouse_y <= 275 {
|
|
||||||
draw.draw_text("Options", 103, 251, 34, Color::GRAY);
|
|
||||||
draw.draw_text("Options", 100, 250, 34, Color::BLACK);
|
|
||||||
if draw.is_mouse_button_pressed(MouseButton::MOUSE_LEFT_BUTTON) {
|
|
||||||
return MenuStateSignal::DoOptions;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if mouse_x >= 100 && mouse_y >= 410 && mouse_x <= 222 && mouse_y <= 437 {
|
if mouse_x >= 100 && mouse_y >= 410 && mouse_x <= 222 && mouse_y <= 437 {
|
||||||
draw.draw_text("Credits", 103, 411, 34, Color::GRAY);
|
draw.draw_text("Credits", 103, 411, 34, label_shadow_colors);
|
||||||
draw.draw_text("Credits", 100, 410, 34, Color::BLACK);
|
draw.draw_text("Credits", 100, 410, 34, label_colors);
|
||||||
if draw.is_mouse_button_pressed(MouseButton::MOUSE_LEFT_BUTTON) {
|
if draw.is_mouse_button_pressed(MouseButton::MOUSE_LEFT_BUTTON) {
|
||||||
|
audio_subsystem.play_sound(&global_resources.button_click_sound);
|
||||||
return MenuStateSignal::DoCredits;
|
return MenuStateSignal::DoCredits;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if mouse_x >= 100 && mouse_y >= 470 && mouse_x <= 316 && mouse_y <= 496 {
|
if mouse_x >= 100 && mouse_y >= 470 && mouse_x <= 316 && mouse_y <= 496 {
|
||||||
draw.draw_text("Leaderboard", 103, 471, 34, Color::GRAY);
|
draw.draw_text("Leaderboard", 103, 471, 34, label_shadow_colors);
|
||||||
draw.draw_text("Leaderboard", 100, 470, 34, Color::BLACK);
|
draw.draw_text("Leaderboard", 100, 470, 34, label_colors);
|
||||||
if draw.is_mouse_button_pressed(MouseButton::MOUSE_LEFT_BUTTON) {
|
if draw.is_mouse_button_pressed(MouseButton::MOUSE_LEFT_BUTTON) {
|
||||||
|
audio_subsystem.play_sound(&global_resources.button_click_sound);
|
||||||
return MenuStateSignal::DoLeaderboard;
|
return MenuStateSignal::DoLeaderboard;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if mouse_x >= 100 && mouse_y >= 300 && mouse_x <= 215 && mouse_y <= 330 {
|
//Volume Controller
|
||||||
draw.draw_text("Volume", 103, 301, 34, Color::GRAY);
|
//Color Pallete Variables
|
||||||
draw.draw_text("Volume", 100, 300, 34, Color::BLACK);
|
let tile_color = Color::new(158, 93, 65, 255);
|
||||||
|
let outer_ring_color = Color::new(255, 191, 113, 255);
|
||||||
|
let inner_ring_color = Color::new(244, 203, 184, 255);
|
||||||
|
let button_color = Color::new(82, 135, 195, 255);
|
||||||
|
let button_shadow_color = Color::new(123, 201, 244, 255);
|
||||||
|
|
||||||
|
//Inner pieces of the controller
|
||||||
|
draw.draw_ring(
|
||||||
|
Vector2::new((window_width as f32) - 90.0, (window_height as f32) - 140.0),
|
||||||
|
50.0,
|
||||||
|
15.0,
|
||||||
|
275.0,
|
||||||
|
235.0,
|
||||||
|
0,
|
||||||
|
tile_color,
|
||||||
|
); //tile1
|
||||||
|
draw.draw_ring(
|
||||||
|
Vector2::new((window_width as f32) - 90.0, (window_height as f32) - 140.0),
|
||||||
|
50.0,
|
||||||
|
15.0,
|
||||||
|
225.0,
|
||||||
|
185.0,
|
||||||
|
0,
|
||||||
|
tile_color,
|
||||||
|
); //tile2
|
||||||
|
|
||||||
|
//- button
|
||||||
|
draw.draw_rectangle(window_width - 133, window_height - 128, 21, 5, button_color);
|
||||||
|
//+ button
|
||||||
|
draw.draw_rectangle(window_width - 62, window_height - 135, 5, 20, button_color); // vertical line
|
||||||
|
draw.draw_rectangle(window_width - 70, window_height - 128, 21, 5, button_color); //horizontal line
|
||||||
|
|
||||||
|
//Drawing external ring and internal ring
|
||||||
|
draw.draw_ring_lines(
|
||||||
|
Vector2::new((window_width as f32) - 90.0, (window_height as f32) - 140.0),
|
||||||
|
50.0,
|
||||||
|
15.0,
|
||||||
|
315.0,
|
||||||
|
45.0,
|
||||||
|
1,
|
||||||
|
outer_ring_color,
|
||||||
|
); //Outer
|
||||||
|
draw.draw_ring(
|
||||||
|
Vector2::new((window_width as f32) - 90.0, (window_height as f32) - 140.0),
|
||||||
|
50.0,
|
||||||
|
15.0,
|
||||||
|
275.0,
|
||||||
|
85.0,
|
||||||
|
1,
|
||||||
|
inner_ring_color,
|
||||||
|
); //Inner
|
||||||
|
|
||||||
|
//Tiles shown depending on volume_percentage's value
|
||||||
|
if self.volume_percentage == 1.0 {
|
||||||
|
draw.draw_ring(
|
||||||
|
Vector2::new((window_width as f32) - 90.0, (window_height as f32) - 140.0),
|
||||||
|
50.0,
|
||||||
|
15.0,
|
||||||
|
125.0,
|
||||||
|
85.0,
|
||||||
|
0,
|
||||||
|
tile_color,
|
||||||
|
); //tile4
|
||||||
|
draw.draw_ring(
|
||||||
|
Vector2::new((window_width as f32) - 90.0, (window_height as f32) - 140.0),
|
||||||
|
50.0,
|
||||||
|
15.0,
|
||||||
|
175.0,
|
||||||
|
135.0,
|
||||||
|
0,
|
||||||
|
tile_color,
|
||||||
|
); //tile3
|
||||||
|
draw.draw_ring(
|
||||||
|
Vector2::new((window_width as f32) - 90.0, (window_height as f32) - 140.0),
|
||||||
|
50.0,
|
||||||
|
15.0,
|
||||||
|
225.0,
|
||||||
|
185.0,
|
||||||
|
0,
|
||||||
|
tile_color,
|
||||||
|
); //tile2
|
||||||
|
draw.draw_ring(
|
||||||
|
Vector2::new((window_width as f32) - 90.0, (window_height as f32) - 140.0),
|
||||||
|
50.0,
|
||||||
|
15.0,
|
||||||
|
275.0,
|
||||||
|
235.0,
|
||||||
|
0,
|
||||||
|
tile_color,
|
||||||
|
); //tile1
|
||||||
|
} else if self.volume_percentage == 0.75 {
|
||||||
|
draw.draw_ring(
|
||||||
|
Vector2::new((window_width as f32) - 90.0, (window_height as f32) - 140.0),
|
||||||
|
50.0,
|
||||||
|
15.0,
|
||||||
|
175.0,
|
||||||
|
135.0,
|
||||||
|
0,
|
||||||
|
tile_color,
|
||||||
|
); //tile3
|
||||||
|
draw.draw_ring(
|
||||||
|
Vector2::new((window_width as f32) - 90.0, (window_height as f32) - 140.0),
|
||||||
|
50.0,
|
||||||
|
15.0,
|
||||||
|
225.0,
|
||||||
|
185.0,
|
||||||
|
0,
|
||||||
|
tile_color,
|
||||||
|
); //tile2
|
||||||
|
draw.draw_ring(
|
||||||
|
Vector2::new((window_width as f32) - 90.0, (window_height as f32) - 140.0),
|
||||||
|
50.0,
|
||||||
|
15.0,
|
||||||
|
275.0,
|
||||||
|
235.0,
|
||||||
|
0,
|
||||||
|
tile_color,
|
||||||
|
); //tile1
|
||||||
|
} else if self.volume_percentage == 0.5 {
|
||||||
|
draw.draw_ring(
|
||||||
|
Vector2::new((window_width as f32) - 90.0, (window_height as f32) - 140.0),
|
||||||
|
50.0,
|
||||||
|
15.0,
|
||||||
|
225.0,
|
||||||
|
185.0,
|
||||||
|
0,
|
||||||
|
tile_color,
|
||||||
|
); //tile2
|
||||||
|
draw.draw_ring(
|
||||||
|
Vector2::new((window_width as f32) - 90.0, (window_height as f32) - 140.0),
|
||||||
|
50.0,
|
||||||
|
15.0,
|
||||||
|
275.0,
|
||||||
|
235.0,
|
||||||
|
0,
|
||||||
|
tile_color,
|
||||||
|
); //tile1
|
||||||
|
} else if self.volume_percentage == 0.25 {
|
||||||
|
draw.draw_ring(
|
||||||
|
Vector2::new((window_width as f32) - 90.0, (window_height as f32) - 140.0),
|
||||||
|
50.0,
|
||||||
|
15.0,
|
||||||
|
275.0,
|
||||||
|
235.0,
|
||||||
|
0,
|
||||||
|
tile_color,
|
||||||
|
); //tile1
|
||||||
|
} else if self.volume_percentage == 0.0 {
|
||||||
|
}
|
||||||
|
|
||||||
|
//- Button functionality
|
||||||
|
if mouse_x >= (window_width - 133)
|
||||||
|
&& mouse_y >= (window_height - 135)
|
||||||
|
&& mouse_x <= (window_width - 112)
|
||||||
|
&& mouse_y <= (window_height - 115)
|
||||||
|
{
|
||||||
|
draw.draw_rectangle(
|
||||||
|
window_width - 130,
|
||||||
|
window_height - 127,
|
||||||
|
21,
|
||||||
|
5,
|
||||||
|
button_shadow_color,
|
||||||
|
);
|
||||||
|
draw.draw_rectangle(window_width - 133, window_height - 128, 21, 5, button_color);
|
||||||
|
|
||||||
if draw.is_mouse_button_pressed(MouseButton::MOUSE_LEFT_BUTTON) {
|
if draw.is_mouse_button_pressed(MouseButton::MOUSE_LEFT_BUTTON) {
|
||||||
//Function for Volume here
|
audio_subsystem.play_sound(&global_resources.button_click_sound);
|
||||||
|
if self.volume_percentage <= 1.0 && self.volume_percentage > 0.0 {
|
||||||
|
self.volume_percentage = self.volume_percentage - 0.25
|
||||||
|
} else if self.volume_percentage <= 0.0 {
|
||||||
|
self.volume_percentage = 0.0;
|
||||||
|
}
|
||||||
|
audio_subsystem.set_master_volume(self.volume_percentage);
|
||||||
|
game_settings.volume = Some(self.volume_percentage);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//Exit button has no function yet
|
// + Button functionallity
|
||||||
if mouse_x >= 100 && mouse_y >= 550 && mouse_x <= 162 && mouse_y <= 575 {
|
if mouse_x >= (window_width - 70)
|
||||||
draw.draw_text("Exit", 103, 551, 34, Color::GRAY);
|
&& mouse_y >= (window_height - 135)
|
||||||
draw.draw_text("Exit", 100, 550, 34, Color::BLACK);
|
&& mouse_x <= (window_width - 49)
|
||||||
|
&& mouse_y <= (window_height - 115)
|
||||||
|
{
|
||||||
|
draw.draw_rectangle(
|
||||||
|
window_width - 59,
|
||||||
|
window_height - 134,
|
||||||
|
5,
|
||||||
|
20,
|
||||||
|
button_shadow_color,
|
||||||
|
); //Vertical Line
|
||||||
|
draw.draw_rectangle(
|
||||||
|
window_width - 67,
|
||||||
|
window_height - 127,
|
||||||
|
21,
|
||||||
|
5,
|
||||||
|
button_shadow_color,
|
||||||
|
);
|
||||||
|
|
||||||
|
draw.draw_rectangle(window_width - 62, window_height - 135, 5, 20, button_color); // vertical line
|
||||||
|
draw.draw_rectangle(window_width - 70, window_height - 128, 21, 5, button_color); //horizontal line
|
||||||
|
|
||||||
if draw.is_mouse_button_pressed(MouseButton::MOUSE_LEFT_BUTTON) {
|
if draw.is_mouse_button_pressed(MouseButton::MOUSE_LEFT_BUTTON) {
|
||||||
|
audio_subsystem.play_sound(&global_resources.button_click_sound);
|
||||||
|
if self.volume_percentage < 1.0 && self.volume_percentage >= 0.0 {
|
||||||
|
self.volume_percentage = self.volume_percentage + 0.25
|
||||||
|
} else if self.volume_percentage <= 0.0 {
|
||||||
|
self.volume_percentage = 0.0;
|
||||||
|
}
|
||||||
|
audio_subsystem.set_master_volume(self.volume_percentage);
|
||||||
|
game_settings.volume = Some(self.volume_percentage);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//Exit button
|
||||||
|
if mouse_x >= 100 && mouse_y >= 550 && mouse_x <= 162 && mouse_y <= 575 {
|
||||||
|
draw.draw_text("Exit", 103, 551, 34, label_shadow_colors);
|
||||||
|
draw.draw_text("Exit", 100, 550, 34, label_colors);
|
||||||
|
if draw.is_mouse_button_pressed(MouseButton::MOUSE_LEFT_BUTTON) {
|
||||||
|
audio_subsystem.play_sound(&global_resources.button_click_sound);
|
||||||
return MenuStateSignal::QuitGame;
|
return MenuStateSignal::QuitGame;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// Return MenuStateSignal::StartGame if you want the game to start.
|
// Return MenuStateSignal::StartGame if you want the game to start.
|
||||||
// Otherwise, keep returning MenuStateSignal::DoMainMenu until the player clicks the start button
|
// Otherwise, keep returning MenuStateSignal::DoMainMenu until the player clicks the start button
|
||||||
return MenuStateSignal::DoMainMenu;
|
return MenuStateSignal::DoMainMenu;
|
||||||
@ -150,37 +361,8 @@ impl MainMenu {
|
|||||||
global_resources: &GlobalResources,
|
global_resources: &GlobalResources,
|
||||||
constants: &ProjectConstants,
|
constants: &ProjectConstants,
|
||||||
) -> MenuStateSignal {
|
) -> MenuStateSignal {
|
||||||
|
//Options Errased, Block of code left for precaution
|
||||||
//Draw declared
|
return MenuStateSignal::DoMainMenu;
|
||||||
let mut draw = raylib.begin_drawing(rl_thread);
|
|
||||||
draw.clear_background(Color::WHITE);
|
|
||||||
//Mouse Position
|
|
||||||
let mouse_x = draw.get_mouse_x();
|
|
||||||
let mouse_y = draw.get_mouse_y();
|
|
||||||
//Show mouse position
|
|
||||||
draw.draw_text(&mouse_x.to_string(), 20, 5, 20, Color::BLACK);
|
|
||||||
draw.draw_text(&mouse_y.to_string(), 70, 5, 20, Color::BLACK);
|
|
||||||
|
|
||||||
//Top Label
|
|
||||||
draw.draw_text("Options", 25, 30, 55, Color::BLACK);
|
|
||||||
|
|
||||||
//Window size storing variables
|
|
||||||
let window_height = draw.get_screen_height();
|
|
||||||
let window_width = draw.get_screen_width();
|
|
||||||
|
|
||||||
//Return button variables
|
|
||||||
let button_pos_x = 100; //116 Wide
|
|
||||||
let button_pos_y = window_height - (window_height/5); //26 height
|
|
||||||
|
|
||||||
draw.draw_text("Return", button_pos_x, button_pos_y, 34, Color::BLACK);
|
|
||||||
if mouse_x >= 100 && mouse_y >= button_pos_y && mouse_x <= 216 && mouse_y <= (window_height - (window_height/5)) + 26 {
|
|
||||||
draw.draw_text("Return", button_pos_x + 3, button_pos_y + 1, 34, Color::GRAY);
|
|
||||||
draw.draw_text("Return", button_pos_x, button_pos_y, 34, Color::BLACK);
|
|
||||||
if draw.is_mouse_button_down(MouseButton::MOUSE_LEFT_BUTTON) {
|
|
||||||
return MenuStateSignal::DoMainMenu; //Goes back to main menu
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return MenuStateSignal::DoOptions;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
pub async fn render_credits_frame(
|
pub async fn render_credits_frame(
|
||||||
@ -190,13 +372,20 @@ impl MainMenu {
|
|||||||
discord: &DiscordChannel,
|
discord: &DiscordChannel,
|
||||||
global_resources: &GlobalResources,
|
global_resources: &GlobalResources,
|
||||||
constants: &ProjectConstants,
|
constants: &ProjectConstants,
|
||||||
|
audio_subsystem: &mut RaylibAudio,
|
||||||
) -> MenuStateSignal {
|
) -> MenuStateSignal {
|
||||||
|
//Colors
|
||||||
|
let label_colors = Color::BLACK;
|
||||||
|
let label_shadow_colors = Color::GRAY;
|
||||||
|
let credits_colours = Color::new(82, 135, 195, 255);
|
||||||
|
|
||||||
let mut draw = raylib.begin_drawing(rl_thread);
|
let mut draw = raylib.begin_drawing(rl_thread);
|
||||||
draw.clear_background(Color::WHITE);
|
draw.clear_background(Color::WHITE);
|
||||||
//Mouse Position
|
//Mouse Position
|
||||||
let mouse_x = draw.get_mouse_x();
|
let mouse_x = draw.get_mouse_x();
|
||||||
let mouse_y = draw.get_mouse_y();
|
let mouse_y = draw.get_mouse_y();
|
||||||
//Show mouse position
|
|
||||||
|
//TODO Errase in the end Show mouse position
|
||||||
draw.draw_text(&mouse_x.to_string(), 20, 5, 20, Color::BLACK);
|
draw.draw_text(&mouse_x.to_string(), 20, 5, 20, Color::BLACK);
|
||||||
draw.draw_text(&mouse_y.to_string(), 70, 5, 20, Color::BLACK);
|
draw.draw_text(&mouse_y.to_string(), 70, 5, 20, Color::BLACK);
|
||||||
|
|
||||||
@ -204,27 +393,86 @@ impl MainMenu {
|
|||||||
let window_height = draw.get_screen_height();
|
let window_height = draw.get_screen_height();
|
||||||
let window_width = draw.get_screen_width();
|
let window_width = draw.get_screen_width();
|
||||||
|
|
||||||
draw.draw_text("Credits", (window_width/2) - 100, 30, 55, Color::BLACK);
|
draw.draw_text("Credits", (window_width / 2) - 100, 30, 55, label_colors);
|
||||||
|
|
||||||
draw.draw_text("Carter Tomlenovich", (window_width/2) - 170, 120, 40, Color::DARKBLUE);
|
draw.draw_text(
|
||||||
draw.draw_text("Emilia Firas", (window_width/2) - 170, 160, 40, Color::DARKBLUE);
|
"Carter Tomlenovich",
|
||||||
draw.draw_text("Emmet Logue", (window_width/2) - 170, 200, 40, Color::DARKBLUE);
|
(window_width / 2) - 170,
|
||||||
draw.draw_text("Evan Pratten", (window_width/2) - 170, 240, 40, Color::DARKBLUE);
|
120,
|
||||||
draw.draw_text("James Nickoli", (window_width/2) - 170, 280, 40, Color::DARKBLUE);
|
40,
|
||||||
draw.draw_text("Marcelo Geldres", (window_width/2) - 170, 320, 40, Color::DARKBLUE);
|
credits_colours,
|
||||||
draw.draw_text("Percy", (window_width/2) - 170, 360, 40, Color::DARKBLUE);
|
);
|
||||||
draw.draw_text("Silas Bartha", (window_width/2) - 170, 400, 40, Color::DARKBLUE);
|
draw.draw_text(
|
||||||
draw.draw_text("Taya Armstrong", (window_width/2) - 170, 440, 40, Color::DARKBLUE);
|
"Emilia Firas",
|
||||||
|
(window_width / 2) - 170,
|
||||||
|
160,
|
||||||
|
40,
|
||||||
|
credits_colours,
|
||||||
|
);
|
||||||
|
draw.draw_text(
|
||||||
|
"Emmet Logue",
|
||||||
|
(window_width / 2) - 170,
|
||||||
|
200,
|
||||||
|
40,
|
||||||
|
credits_colours,
|
||||||
|
);
|
||||||
|
draw.draw_text(
|
||||||
|
"Evan Pratten",
|
||||||
|
(window_width / 2) - 170,
|
||||||
|
240,
|
||||||
|
40,
|
||||||
|
credits_colours,
|
||||||
|
);
|
||||||
|
draw.draw_text(
|
||||||
|
"James Nickoli",
|
||||||
|
(window_width / 2) - 170,
|
||||||
|
280,
|
||||||
|
40,
|
||||||
|
credits_colours,
|
||||||
|
);
|
||||||
|
draw.draw_text(
|
||||||
|
"Marcelo Geldres",
|
||||||
|
(window_width / 2) - 170,
|
||||||
|
320,
|
||||||
|
40,
|
||||||
|
credits_colours,
|
||||||
|
);
|
||||||
|
draw.draw_text("Percy", (window_width / 2) - 170, 360, 40, credits_colours);
|
||||||
|
draw.draw_text(
|
||||||
|
"Silas Bartha",
|
||||||
|
(window_width / 2) - 170,
|
||||||
|
400,
|
||||||
|
40,
|
||||||
|
credits_colours,
|
||||||
|
);
|
||||||
|
draw.draw_text(
|
||||||
|
"Taya Armstrong",
|
||||||
|
(window_width / 2) - 170,
|
||||||
|
440,
|
||||||
|
40,
|
||||||
|
credits_colours,
|
||||||
|
);
|
||||||
|
|
||||||
//Return button variables
|
//Return button variables
|
||||||
let button_pos_x = 100; //116 Wide
|
let button_pos_x = 100; //116 Wide
|
||||||
let button_pos_y = window_height - (window_height/5); //26 height
|
let button_pos_y = window_height - (window_height / 5); //26 height
|
||||||
|
|
||||||
draw.draw_text("Return", button_pos_x, button_pos_y, 34, Color::BLACK);
|
draw.draw_text("Return", button_pos_x, button_pos_y, 34, label_colors);
|
||||||
if mouse_x >= 100 && mouse_y >= button_pos_y && mouse_x <= 216 && mouse_y <= (window_height - (window_height/5)) + 26 {
|
if mouse_x >= 100
|
||||||
draw.draw_text("Return", button_pos_x + 3, button_pos_y + 1, 34, Color::GRAY);
|
&& mouse_y >= button_pos_y
|
||||||
draw.draw_text("Return", button_pos_x, button_pos_y, 34, Color::BLACK);
|
&& mouse_x <= 216
|
||||||
|
&& mouse_y <= (window_height - (window_height / 5)) + 26
|
||||||
|
{
|
||||||
|
draw.draw_text(
|
||||||
|
"Return",
|
||||||
|
button_pos_x + 3,
|
||||||
|
button_pos_y + 1,
|
||||||
|
34,
|
||||||
|
label_shadow_colors,
|
||||||
|
);
|
||||||
|
draw.draw_text("Return", button_pos_x, button_pos_y, 34, label_colors);
|
||||||
if draw.is_mouse_button_down(MouseButton::MOUSE_LEFT_BUTTON) {
|
if draw.is_mouse_button_down(MouseButton::MOUSE_LEFT_BUTTON) {
|
||||||
|
audio_subsystem.play_sound(&global_resources.button_click_sound);
|
||||||
return MenuStateSignal::DoMainMenu; //Goes back to main menu
|
return MenuStateSignal::DoMainMenu; //Goes back to main menu
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -239,7 +487,12 @@ impl MainMenu {
|
|||||||
discord: &DiscordChannel,
|
discord: &DiscordChannel,
|
||||||
global_resources: &GlobalResources,
|
global_resources: &GlobalResources,
|
||||||
constants: &ProjectConstants,
|
constants: &ProjectConstants,
|
||||||
|
audio_subsystem: &mut RaylibAudio,
|
||||||
) -> MenuStateSignal {
|
) -> MenuStateSignal {
|
||||||
|
//Colors
|
||||||
|
let label_colors = Color::BLACK;
|
||||||
|
let label_shadow_colors = Color::GRAY;
|
||||||
|
|
||||||
let mut draw = raylib.begin_drawing(rl_thread);
|
let mut draw = raylib.begin_drawing(rl_thread);
|
||||||
draw.clear_background(Color::WHITE);
|
draw.clear_background(Color::WHITE);
|
||||||
//Mouse Position
|
//Mouse Position
|
||||||
@ -250,22 +503,39 @@ impl MainMenu {
|
|||||||
let window_height = draw.get_screen_height();
|
let window_height = draw.get_screen_height();
|
||||||
let window_width = draw.get_screen_width();
|
let window_width = draw.get_screen_width();
|
||||||
|
|
||||||
//Show mouse position
|
//TODO errase later
|
||||||
draw.draw_text(&mouse_x.to_string(), 20, 5, 20, Color::BLACK);
|
draw.draw_text(&mouse_x.to_string(), 20, 5, 20, Color::BLACK);
|
||||||
draw.draw_text(&mouse_y.to_string(), 70, 5, 20, Color::BLACK);
|
draw.draw_text(&mouse_y.to_string(), 70, 5, 20, Color::BLACK);
|
||||||
|
|
||||||
let window_width = draw.get_screen_width();
|
let window_width = draw.get_screen_width();
|
||||||
draw.draw_text("Leaderboard", (window_width/2) - 176, 30, 55, Color::BLACK);
|
draw.draw_text(
|
||||||
|
"Leaderboard",
|
||||||
|
(window_width / 2) - 176,
|
||||||
|
30,
|
||||||
|
55,
|
||||||
|
label_colors,
|
||||||
|
);
|
||||||
|
|
||||||
//Return button variables
|
//Return button variables
|
||||||
let button_pos_x = 100; //116 Wide
|
let button_pos_x = 100; //116 Wide
|
||||||
let button_pos_y = window_height - (window_height/5); //26 height
|
let button_pos_y = window_height - (window_height / 5); //26 height
|
||||||
|
|
||||||
draw.draw_text("Return", button_pos_x, button_pos_y, 34, Color::BLACK);
|
draw.draw_text("Return", button_pos_x, button_pos_y, 34, label_colors);
|
||||||
if mouse_x >= 100 && mouse_y >= button_pos_y && mouse_x <= 216 && mouse_y <= (window_height - (window_height/5)) + 26 {
|
if mouse_x >= 100
|
||||||
draw.draw_text("Return", button_pos_x + 3, button_pos_y + 1, 34, Color::GRAY);
|
&& mouse_y >= button_pos_y
|
||||||
draw.draw_text("Return", button_pos_x, button_pos_y, 34, Color::BLACK);
|
&& mouse_x <= 216
|
||||||
|
&& mouse_y <= (window_height - (window_height / 5)) + 26
|
||||||
|
{
|
||||||
|
draw.draw_text(
|
||||||
|
"Return",
|
||||||
|
button_pos_x + 3,
|
||||||
|
button_pos_y + 1,
|
||||||
|
34,
|
||||||
|
label_shadow_colors,
|
||||||
|
);
|
||||||
|
draw.draw_text("Return", button_pos_x, button_pos_y, 34, label_colors);
|
||||||
if draw.is_mouse_button_down(MouseButton::MOUSE_LEFT_BUTTON) {
|
if draw.is_mouse_button_down(MouseButton::MOUSE_LEFT_BUTTON) {
|
||||||
|
audio_subsystem.play_sound(&global_resources.button_click_sound);
|
||||||
return MenuStateSignal::DoMainMenu; //Goes back to main menu
|
return MenuStateSignal::DoMainMenu; //Goes back to main menu
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -7,7 +7,7 @@ use raylib::prelude::*;
|
|||||||
|
|
||||||
use crate::{
|
use crate::{
|
||||||
discord::DiscordChannel, global_resource_package::GlobalResources,
|
discord::DiscordChannel, global_resource_package::GlobalResources,
|
||||||
project_constants::ProjectConstants,
|
project_constants::ProjectConstants, persistent::{save_state::GameSaveState, settings::PersistentGameSettings},
|
||||||
};
|
};
|
||||||
|
|
||||||
use self::{
|
use self::{
|
||||||
@ -37,15 +37,14 @@ impl SceneRenderDelegate {
|
|||||||
raylib: &mut RaylibHandle,
|
raylib: &mut RaylibHandle,
|
||||||
rl_thread: &RaylibThread,
|
rl_thread: &RaylibThread,
|
||||||
constants: &ProjectConstants,
|
constants: &ProjectConstants,
|
||||||
|
audio_subsystem: RaylibAudio,
|
||||||
|
game_settings: &mut PersistentGameSettings,
|
||||||
|
save_state: &mut GameSaveState
|
||||||
) -> Self {
|
) -> Self {
|
||||||
// Set up audio
|
|
||||||
let audio_subsystem = RaylibAudio::init_audio_device();
|
|
||||||
audio_subsystem.set_master_volume(0.4);
|
|
||||||
|
|
||||||
// Init some scenes
|
// Init some scenes
|
||||||
let scene_test_fox = TestFoxScene::new(raylib, rl_thread);
|
let scene_test_fox = TestFoxScene::new(raylib, rl_thread);
|
||||||
let scene_playable = PlayableScene::new(raylib, rl_thread, constants);
|
let scene_playable = PlayableScene::new(raylib, rl_thread, constants);
|
||||||
let scene_main_menu = MainMenu::new(raylib, rl_thread, constants);
|
let scene_main_menu = MainMenu::new(raylib, rl_thread, constants, game_settings);
|
||||||
|
|
||||||
Self {
|
Self {
|
||||||
menu_control_signal: MenuStateSignal::DoMainMenu,
|
menu_control_signal: MenuStateSignal::DoMainMenu,
|
||||||
@ -67,13 +66,21 @@ impl SceneRenderDelegate {
|
|||||||
discord: &DiscordChannel,
|
discord: &DiscordChannel,
|
||||||
global_resources: &GlobalResources,
|
global_resources: &GlobalResources,
|
||||||
constants: &ProjectConstants,
|
constants: &ProjectConstants,
|
||||||
|
game_settings: &mut PersistentGameSettings,
|
||||||
|
save_state: &mut GameSaveState
|
||||||
) {
|
) {
|
||||||
|
|
||||||
// Render the main menu if in it, otherwise, render the game
|
// Render the main menu if in it, otherwise, render the game
|
||||||
match self.menu_control_signal {
|
match self.menu_control_signal {
|
||||||
MenuStateSignal::StartGame => {
|
MenuStateSignal::StartGame => {
|
||||||
self.scene_playable
|
self.scene_playable
|
||||||
.render_frame(raylib, rl_thread, &discord, global_resources, constants, &mut self.audio_subsystem)
|
.render_frame(
|
||||||
|
raylib,
|
||||||
|
rl_thread,
|
||||||
|
&discord,
|
||||||
|
global_resources,
|
||||||
|
constants,
|
||||||
|
&mut self.audio_subsystem,
|
||||||
|
)
|
||||||
.await;
|
.await;
|
||||||
self.scene_playable.update_physics(raylib, constants).await;
|
self.scene_playable.update_physics(raylib, constants).await;
|
||||||
|
|
||||||
@ -86,7 +93,15 @@ impl SceneRenderDelegate {
|
|||||||
MenuStateSignal::DoMainMenu => {
|
MenuStateSignal::DoMainMenu => {
|
||||||
self.menu_control_signal = self
|
self.menu_control_signal = self
|
||||||
.scene_main_menu
|
.scene_main_menu
|
||||||
.render_main_menu_frame(raylib, rl_thread, discord, global_resources, constants)
|
.render_main_menu_frame(
|
||||||
|
raylib,
|
||||||
|
rl_thread,
|
||||||
|
discord,
|
||||||
|
global_resources,
|
||||||
|
constants,
|
||||||
|
&mut self.audio_subsystem,
|
||||||
|
game_settings
|
||||||
|
)
|
||||||
.await;
|
.await;
|
||||||
|
|
||||||
// Clear the ingame discord status
|
// Clear the ingame discord status
|
||||||
@ -101,7 +116,14 @@ impl SceneRenderDelegate {
|
|||||||
MenuStateSignal::DoCredits => {
|
MenuStateSignal::DoCredits => {
|
||||||
self.menu_control_signal = self
|
self.menu_control_signal = self
|
||||||
.scene_main_menu
|
.scene_main_menu
|
||||||
.render_credits_frame(raylib, rl_thread, discord, global_resources, constants)
|
.render_credits_frame(
|
||||||
|
raylib,
|
||||||
|
rl_thread,
|
||||||
|
discord,
|
||||||
|
global_resources,
|
||||||
|
constants,
|
||||||
|
&mut self.audio_subsystem,
|
||||||
|
)
|
||||||
.await
|
.await
|
||||||
}
|
}
|
||||||
MenuStateSignal::DoLeaderboard => {
|
MenuStateSignal::DoLeaderboard => {
|
||||||
@ -113,6 +135,7 @@ impl SceneRenderDelegate {
|
|||||||
discord,
|
discord,
|
||||||
global_resources,
|
global_resources,
|
||||||
constants,
|
constants,
|
||||||
|
&mut self.audio_subsystem,
|
||||||
)
|
)
|
||||||
.await
|
.await
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user