Skip to content
Snippets Groups Projects
scorers.rs 416 B
Newer Older
use bevy::prelude::*;
use crate::ScorerEnt;
#[derive(Debug, Clone, Default)]
pub struct Score {
Kat Marchán's avatar
Kat Marchán committed
    pub value: f32,
    pub weight: f32,
}

/**
This trait defines new considerations. In general, you should use the [derive macro](derive.Consideration.html) instead.
*/
#[typetag::deserialize]
pub trait Scorer: std::fmt::Debug + Sync + Send {
    fn build(&self, entity: Entity, cmd: &mut Commands) -> ScorerEnt;
Kat Marchán's avatar
Kat Marchán committed
}