rust/hwphysics/src/common.rs
author Wuzzy <Wuzzy2@mail.ru>
Mon, 17 Jun 2019 19:33:43 +0200
changeset 15173 e1dbe2c9026f
parent 15125 febccab419b1
child 15268 24828281c9c5
permissions -rw-r--r--
ACF10: Show proper messages when everyone dies If everyone died, the game cannot continue, but you still win (since it's a sandbox mission).

pub type GearId = u16;
pub trait GearData {}

pub trait GearDataProcessor<T: GearData> {
    fn add(&mut self, gear_id: GearId, gear_data: T);
}

pub trait GearDataAggregator<T: GearData> {
    fn find_processor(&mut self) -> &mut GearDataProcessor<T>;
}