This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Stages and systems in scheduler: | |
0 Scheduler | |
1 ├ STAGE: 'startup' | |
2 │ └ Scheduler | |
3 │ ├ STAGE: 'pre_startup' | |
4 │ │ └ SystemStage | |
5 │ ├ STAGE: 'startup' | |
6 │ │ └ SystemStage | |
7 │ │ └ &bevy_input::gamepad::gamepad_event_system | |
8 │ └ STAGE: 'post_startup' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use bevy::prelude::*; | |
use bevy::diagnostic::{FrameTimeDiagnosticsPlugin, PrintDiagnosticsPlugin}; | |
use rand::Rng; | |
struct Fluxel2D { | |
width: u32, | |
height: u32, | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pub struct DeSavegameSystem; | |
impl<'a> System<'a> for DeSavegameSystem { | |
type SystemData = ( | |
Option<Write<'a, GameSessionData>>, | |
Option<Read<'a, SavegamePaths>>, | |
); | |
fn run(&mut self,( | |
session_data, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
args: | |
- name: | |
index: 1 | |
required: true | |
help: Sets the name of the component. | |
- tag_component: | |
short: t | |
long: tag | |
help: Create a tag-component with no fields and NullStorage. | |
- storage_type: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// 2D player following camera system. Needs to be dispatched after the Transform-Bundle, to avoid jittering, | |
/// but before the Render-Bundle. | |
pub struct FollowCameraSystem; | |
impl<'s> System<'s> for FollowCameraSystem{ | |
type SystemData = ( | |
WriteStorage<'s, Transform>, | |
ReadStorage<'s, CPlayer>, | |
ReadStorage<'s, Camera>, | |
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#[derive(PartialEq, Eq)] | |
enum ContainerType{ | |
HorizontalBox, //places contained_childrens in a horizontal manner | |
VerticalBox,//like above, but vertically | |
ScaleBox,//scales it's contents, e.g. to allow for a zoom-in on an item in the inventory | |
UniformGrid,//places all contained_children in a grid with uniformely sized and distributed boxes, ignoring desired_sizes, etc | |
//etc ... | |
} | |
//Containers hold Data for a LayoutSystem, that ONLY works on the layout. |