nightshade 0.55.0

A cross-platform data-oriented game engine.
Documentation
//! The camera controller composition for apps with one controller mode:
//! the active camera's component set picks the controller each frame.

use crate::app::{App, Plugin, Stage};

/// Drives the active camera every frame: pan-orbit when it carries
/// `PAN_ORBIT_CAMERA`, the fly controller otherwise. Games that switch
/// controllers on their own state, or drive first- or third-person
/// cameras, skip the plugin and call the per-controller systems from
/// their update systems instead.
pub struct CameraControllerPlugin;

impl Plugin for CameraControllerPlugin {
    fn build(&self, app: &mut App) {
        app.add_system(
            Stage::FrameUpdate,
            crate::ecs::camera::systems::camera_controllers_system,
        );
    }
}