From 3c7796f066647090ed8436778bdfe25f11844c05 Mon Sep 17 00:00:00 2001 From: LLLL Colonq Date: Tue, 4 Aug 2026 04:35:44 -0400 Subject: Prepare for upload --- 2026/games/rpc2dot0/src/color.rs | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 2026/games/rpc2dot0/src/color.rs (limited to '2026/games/rpc2dot0/src/color.rs') diff --git a/2026/games/rpc2dot0/src/color.rs b/2026/games/rpc2dot0/src/color.rs new file mode 100644 index 0000000..ed81ec4 --- /dev/null +++ b/2026/games/rpc2dot0/src/color.rs @@ -0,0 +1,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, + } + } +} -- cgit v1.3.1