MAJOR rendering overhaul. Snow deformation, persistent light, flowmap out. Also ECS architexture overhaul
This commit is contained in:
25
src/systems/noclip.rs
Normal file
25
src/systems/noclip.rs
Normal file
@@ -0,0 +1,25 @@
|
||||
use crate::entity::EntityHandle;
|
||||
use crate::systems::camera::{start_camera_following, stop_camera_following};
|
||||
use crate::utility::input::InputState;
|
||||
use crate::world::World;
|
||||
|
||||
pub fn noclip_toggle_system(
|
||||
world: &mut World,
|
||||
input_state: &InputState,
|
||||
camera_entity: EntityHandle,
|
||||
noclip_mode: &mut bool,
|
||||
)
|
||||
{
|
||||
if input_state.noclip_just_pressed
|
||||
{
|
||||
*noclip_mode = !*noclip_mode;
|
||||
if *noclip_mode
|
||||
{
|
||||
stop_camera_following(world, camera_entity);
|
||||
}
|
||||
else
|
||||
{
|
||||
start_camera_following(world, camera_entity);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user