From 761a3172bf4c15aed3836e4d1cd6f815b651b0e0 Mon Sep 17 00:00:00 2001 From: LLLL Colonq Date: Sat, 29 Aug 2026 04:06:51 -0400 Subject: Fix --- 2026/games/rpc2dot0/src/effects.rs | 58 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 2026/games/rpc2dot0/src/effects.rs (limited to '2026/games/rpc2dot0/src/effects.rs') diff --git a/2026/games/rpc2dot0/src/effects.rs b/2026/games/rpc2dot0/src/effects.rs new file mode 100644 index 0000000..02b33ef --- /dev/null +++ b/2026/games/rpc2dot0/src/effects.rs @@ -0,0 +1,58 @@ +use crate::color::EntityColor; +use crate::constants::*; + +#[derive(Debug, Clone)] +pub struct PacmanChase { + pub speed: f32, +} + +impl PacmanChase { + pub fn new(speed: f32) -> Self { + Self { speed } + } +} + +impl Default for PacmanChase { + fn default() -> Self { + Self::new(BASE_SPEED) + } +} +#[derive(Debug, Clone)] +pub struct Rogue { + pub until_ms: f32, + pub hover_color: EntityColor, +} + +impl Rogue { + pub fn new(until_ms: f32, hover_color: EntityColor) -> Self { + Self { + until_ms, + hover_color, + } + } +} + +impl Default for Rogue { + fn default() -> Self { + Self::new(ROGUE_DURATION_MS, EntityColor::Yellow) + } +} + +pub struct Explosion { + pub x: f32, + pub y: f32, + pub age_ms: f32, + pub duration_ms: f32, + pub radius: f32, +} +impl Explosion { + pub fn new(x: f32, y: f32) -> Self { + Self { + x, + y, + age_ms: 0.0, + duration_ms: 400.0, + radius: 8.0, + } + } +} -- cgit v1.3.1