blob: ed81ec44ae5f6601abdf29ce489901464fec0845 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
use crate::assets;
#[derive(Debug, Copy, Clone, PartialEq, Eq)]
pub enum EntityColor {
Red = 0,
Green = 1,
Bleu = 2,
Yellow = 3,
}
pub trait ColorExt {
fn texture(&self) -> assets::Texture;
}
impl ColorExt for EntityColor {
fn texture(&self) -> assets::Texture {
match self {
EntityColor::Red => assets::Texture::Mrred,
EntityColor::Green => assets::Texture::Mrgreen,
EntityColor::Bleu => assets::Texture::Mrbleu,
EntityColor::Yellow => assets::Texture::Mryellow,
}
}
}
|