mirror of
https://github.com/kristoferssolo/maze-ascension.git
synced 2025-10-21 19:20:34 +00:00
Merge pull request #28 from kristoferssolo/fix/asset-loading
This commit is contained in:
commit
69eacd42d5
6
.github/workflows/ci.yaml
vendored
6
.github/workflows/ci.yaml
vendored
@ -21,17 +21,13 @@ jobs:
|
||||
uses: dtolnay/rust-toolchain@stable
|
||||
- name: Install dependencies
|
||||
run: sudo apt-get update; sudo apt-get install --no-install-recommends libasound2-dev libudev-dev libwayland-dev libxkbcommon-dev
|
||||
- name: Install cargo-nextest
|
||||
run: cargo install cargo-nextest
|
||||
- name: Populate target directory from cache
|
||||
uses: Leafwing-Studios/cargo-cache@v2
|
||||
with:
|
||||
sweep-cache: true
|
||||
- name: Run tests
|
||||
run: |
|
||||
cargo nextest run --locked --workspace --no-default-features --all-targets
|
||||
# Run doctests separately since nextest doesn't support them
|
||||
cargo test --doc --locked --workspace --no-default-features
|
||||
cargo test --locked --workspace --no-default-features
|
||||
# Run clippy lints.
|
||||
clippy:
|
||||
name: Clippy
|
||||
|
||||
2
Cargo.lock
generated
2
Cargo.lock
generated
@ -3129,7 +3129,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "maze-ascension"
|
||||
version = "1.0.1"
|
||||
version = "1.0.2"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"bevy",
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
[package]
|
||||
name = "maze-ascension"
|
||||
authors = ["Kristofers Solo <dev@kristofers.xyz>"]
|
||||
version = "1.0.1"
|
||||
version = "1.0.2"
|
||||
edition = "2021"
|
||||
|
||||
[dependencies]
|
||||
|
||||
@ -37,8 +37,8 @@ pub struct MazeAssets {
|
||||
impl MazeAssets {
|
||||
/// Creates a new instance of MazeAssets with all necessary meshes and materials.
|
||||
pub fn new(
|
||||
meshes: &mut ResMut<Assets<Mesh>>,
|
||||
materials: &mut ResMut<Assets<StandardMaterial>>,
|
||||
meshes: &mut Assets<Mesh>,
|
||||
materials: &mut Assets<StandardMaterial>,
|
||||
global_config: &GlobalMazeConfig,
|
||||
) -> Self {
|
||||
let custom_materials = RosePineDawn::iter()
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
mod assets;
|
||||
pub mod assets;
|
||||
pub mod commands;
|
||||
pub mod components;
|
||||
mod systems;
|
||||
|
||||
@ -4,6 +4,8 @@
|
||||
use bevy::prelude::*;
|
||||
|
||||
use crate::{
|
||||
hint::assets::HintAssets,
|
||||
player::assets::PlayerAssets,
|
||||
screens::Screen,
|
||||
theme::{interaction::InteractionAssets, prelude::*},
|
||||
};
|
||||
@ -33,6 +35,10 @@ fn continue_to_title_screen(mut next_screen: ResMut<NextState<Screen>>) {
|
||||
next_screen.set(Screen::Title);
|
||||
}
|
||||
|
||||
const fn all_assets_loaded(interaction_assets: Option<Res<InteractionAssets>>) -> bool {
|
||||
interaction_assets.is_some()
|
||||
const fn all_assets_loaded(
|
||||
player_assets: Option<Res<PlayerAssets>>,
|
||||
interaction_assets: Option<Res<InteractionAssets>>,
|
||||
hints_assets: Option<Res<HintAssets>>,
|
||||
) -> bool {
|
||||
player_assets.is_some() && interaction_assets.is_some() && hints_assets.is_some()
|
||||
}
|
||||
|
||||
@ -1,20 +1,17 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="description"
|
||||
content="Maze exploration game built using the Bevy engine">
|
||||
<meta name="description" content="Maze exploration game built using the Bevy engine">
|
||||
<meta name="keywords" content="game, bevy">
|
||||
<title>Maze Ascension: The Labyrinth of Echoes</title>
|
||||
<link data-trunk rel="copy-dir" href="../assets" />
|
||||
<link data-trunk rel="inline" href="style.css" />
|
||||
<link data-trunk rel="inline" type="module" href="restart-audio-context.js" />
|
||||
<link data-trunk
|
||||
rel="rust"
|
||||
data-cargo-no-default-features
|
||||
data-wasm-opt="s"
|
||||
href="../" />
|
||||
<link data-trunk rel="rust" data-cargo-no-default-features data-wasm-opt="s" href="../" />
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="game" class="center">
|
||||
<div id="loading-screen" class="center">
|
||||
@ -35,4 +32,5 @@
|
||||
observer.observe(bevy, {attributeFilter: ["height"]});
|
||||
</script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user