rust/lib-hwengine-future/src/ai/attack_tests.rs
branchtransitional_engine
changeset 16082 85d7d6b71087
equal deleted inserted replaced
16081:6633961698ad 16082:85d7d6b71087
       
     1 use crate::ai::ammo::AmmoType;
       
     2 use crate::ai::Target;
       
     3 use crate::GameField;
       
     4 
       
     5 fn analyze_grenade(game_field: &GameField, targets: &[Target], my_x: f32, my_y: f32) {}
       
     6 
       
     7 impl AmmoType {
       
     8     pub(crate) fn analyze_attacks(
       
     9         &self,
       
    10         game_field: &GameField,
       
    11         targets: &[Target],
       
    12         my_x: f32,
       
    13         my_y: f32,
       
    14     ) {
       
    15         match self {
       
    16             AmmoType::Grenade => analyze_grenade(game_field, targets, my_x, my_y),
       
    17             _ => {}
       
    18         }
       
    19     }
       
    20 }