Skip to content
Snippets Groups Projects
Commit 7faced6a authored by Evy Storozhenko's avatar Evy Storozhenko
Browse files

initial battery work

parent 392d1945
No related branches found
No related tags found
No related merge requests found
Pipeline #103487 passed
use crate::power::{Capacity, Source};
use bevy::prelude::*;
#[derive(Bundle)]
pub struct BatteryBundle {
pub source: Source,
pub capacity: Capacity,
}
......@@ -7,6 +7,7 @@ use crate::{
use bevy::prelude::*;
mod cable;
mod battery;
pub const MACHINE_SIZE: Vec2 = Vec2::new(GRID_SIZE.x / 8.0, GRID_SIZE.y / 8.0);
......
......@@ -17,6 +17,9 @@ impl Plugin for PowerPlugin {
}
}
#[derive(Component, Copy, Clone, Debug, Deref)]
pub struct Capacity(pub f32);
/// Any entity that can emit power (a generator, cable, etc.) should have
/// source as one of it's components. The output field defines in which directions
/// the entity may output power and the power field controls the amount of
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment