Add new module for game bits
This commit is contained in:
38
src/game/mod.rs
Normal file
38
src/game/mod.rs
Normal file
@@ -0,0 +1,38 @@
|
|||||||
|
|
||||||
|
use bevy::prelude::*;
|
||||||
|
|
||||||
|
/// Data component for info about the player's current set of cards.
|
||||||
|
///
|
||||||
|
/// [`Self::capacity`] is the maximum hand size.
|
||||||
|
///
|
||||||
|
/// [`Self::low_water_mark`] is the threshold for drawing new cards on-room-enter.
|
||||||
|
#[derive(Component)]
|
||||||
|
pub struct PlayerHand{
|
||||||
|
cards: Vec<Entity>,
|
||||||
|
capacity: u8,
|
||||||
|
low_water_mark: u8,
|
||||||
|
}
|
||||||
|
|
||||||
|
pub mod machines {
|
||||||
|
|
||||||
|
use bevy::prelude::*;
|
||||||
|
|
||||||
|
#[derive(Component)]
|
||||||
|
pub struct CuttingMachine;
|
||||||
|
|
||||||
|
#[derive(Component)]
|
||||||
|
pub struct RotatingMachine;
|
||||||
|
|
||||||
|
#[derive(Component)]
|
||||||
|
pub struct FlippingMachine;
|
||||||
|
|
||||||
|
#[derive(Component)]
|
||||||
|
pub struct TransposingMachine;
|
||||||
|
}
|
||||||
|
|
||||||
|
pub mod consumables {
|
||||||
|
use bevy::prelude::*;
|
||||||
|
|
||||||
|
#[derive(Component)]
|
||||||
|
pub struct Fuel(u32);
|
||||||
|
}
|
||||||
@@ -3,6 +3,7 @@ use bevy_inspector_egui::{bevy_egui::EguiPlugin, quick::WorldInspectorPlugin};
|
|||||||
|
|
||||||
mod assets;
|
mod assets;
|
||||||
mod card;
|
mod card;
|
||||||
|
mod game;
|
||||||
mod resources;
|
mod resources;
|
||||||
mod widgets;
|
mod widgets;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user