summaryrefslogtreecommitdiff
path: root/2026/games/rpc2dot0/src/color.rs
diff options
context:
space:
mode:
authorLLLL Colonq <llll@colonq>2026-08-04 04:35:44 -0400
committerLLLL Colonq <llll@colonq>2026-08-04 04:35:44 -0400
commit3c7796f066647090ed8436778bdfe25f11844c05 (patch)
tree0644a101004d91af4fcdc2f51fcc2e03f7f255ce /2026/games/rpc2dot0/src/color.rs
parenta75221ab93f59d688f90cd83f0284ff98951fcfa (diff)
Prepare for upload
Diffstat (limited to '2026/games/rpc2dot0/src/color.rs')
-rw-r--r--2026/games/rpc2dot0/src/color.rs25
1 files changed, 25 insertions, 0 deletions
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,
+ }
+ }
+}