generated from hheik/bevy-template
Adjusted movement responsiveness and cleaned comments
parent
c8fa0bf4ed
commit
8d091fec47
|
|
@ -137,8 +137,8 @@ pub fn apply_piece_movement(
|
||||||
*input_repeat = Some(InputRepeatState {
|
*input_repeat = Some(InputRepeatState {
|
||||||
input_type: movement,
|
input_type: movement,
|
||||||
cumulated_time: 0.0,
|
cumulated_time: 0.0,
|
||||||
next_interval: 0.1,
|
next_interval: 0.2,
|
||||||
interval_reduction: 0.5,
|
interval_reduction: 0.0,
|
||||||
min_interval: 0.03,
|
min_interval: 0.03,
|
||||||
});
|
});
|
||||||
move_piece = true;
|
move_piece = true;
|
||||||
|
|
@ -159,12 +159,7 @@ pub fn apply_piece_movement(
|
||||||
pub fn handle_placed_piece(trigger: Trigger<OnPiecePlaced>, world: &mut World) {
|
pub fn handle_placed_piece(trigger: Trigger<OnPiecePlaced>, world: &mut World) {
|
||||||
let game_area = trigger.target();
|
let game_area = trigger.target();
|
||||||
let event = *trigger.event();
|
let event = *trigger.event();
|
||||||
// for game_area in world
|
|
||||||
// .run_system_cached(place_blocks)
|
|
||||||
// .iter()
|
|
||||||
// .flatten()
|
|
||||||
// .cloned()
|
|
||||||
// {
|
|
||||||
world
|
world
|
||||||
.run_system_cached_with(place_blocks, (event, game_area))
|
.run_system_cached_with(place_blocks, (event, game_area))
|
||||||
.expect("Placing piece");
|
.expect("Placing piece");
|
||||||
|
|
@ -180,9 +175,6 @@ pub fn handle_placed_piece(trigger: Trigger<OnPiecePlaced>, world: &mut World) {
|
||||||
},
|
},
|
||||||
game_area,
|
game_area,
|
||||||
);
|
);
|
||||||
// world
|
|
||||||
// .run_system_cached_with(clear_rows, cleared_rows)
|
|
||||||
// .expect("Clearing full rows");
|
|
||||||
world.flush();
|
world.flush();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -194,7 +186,6 @@ pub fn handle_placed_piece(trigger: Trigger<OnPiecePlaced>, world: &mut World) {
|
||||||
.run_system_cached_with(create_next_piece, game_area)
|
.run_system_cached_with(create_next_piece, game_area)
|
||||||
.expect("Creating new piece");
|
.expect("Creating new piece");
|
||||||
world.flush();
|
world.flush();
|
||||||
// }
|
|
||||||
|
|
||||||
// TODO: Finish up clearing the piece / lines
|
// TODO: Finish up clearing the piece / lines
|
||||||
// TODO: Lose condition
|
// TODO: Lose condition
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue