rust/hwphysics/src/common.rs
author Wuzzy <Wuzzy2@mail.ru>
Fri, 07 Jun 2019 11:35:13 +0200 (2019-06-07)
changeset 15127 f3f09c71ff6c
parent 15120 febccab419b1
child 15263 24828281c9c5
permissions -rw-r--r--
End turn immediately when hedgehog health reaches 0
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>;
}