use rapier2d::{dynamics::RigidBodySet, geometry::ColliderHandle}; use std::collections::HashMap; use super::ShipControllerStruct; use crate::{ objects::{ShipControls, SySimShip}, StepResources, }; /// The Null controller is assigned to objects that are static or not controlled by the computer. /// Most notably, the player's ship has a Null controller. #[derive(Debug, Clone)] pub struct NullShipController {} impl NullShipController { /// Create a new ship controller pub fn new() -> Self { Self {} } } impl ShipControllerStruct for NullShipController { fn update_controls( &mut self, _res: &StepResources, _rigid_bodies: &RigidBodySet, _ships: &HashMap, _this_ship: ColliderHandle, ) -> Option { None } }