From c71366c2e0a9f0b454957feeb87b51f6b27d54bd Mon Sep 17 00:00:00 2001 From: Alexander Foremny Date: Fri, 15 Mar 2024 16:07:58 +0100 Subject: feat: add champions Select champions using the `--champion` flag. Valid values are `ranged` and `meele` (default). --- src/protocol.rs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/protocol.rs') diff --git a/src/protocol.rs b/src/protocol.rs index 3d4567d..7ec3dcb 100644 --- a/src/protocol.rs +++ b/src/protocol.rs @@ -1,3 +1,4 @@ +use crate::shared::champion::*; use crate::shared::cooldown::*; use crate::shared::health::*; use crate::shared::imperative::*; @@ -16,11 +17,11 @@ pub enum Inputs { impl UserAction for Inputs {} #[derive(Message, Serialize, Deserialize, Clone, Debug, PartialEq)] -pub struct Message1(pub usize); +pub struct SelectChampion(pub Champion); #[message_protocol(protocol = "MyProtocol")] pub enum Messages { - Message1(Message1), + SelectChampion(SelectChampion), } #[component_protocol(protocol = "MyProtocol")] @@ -33,10 +34,11 @@ pub enum Components { ProjectilePosition(ProjectilePosition), Cooldown(Cooldown), Health(Health), + Champion(Champion), } #[derive(Channel)] -struct Channel1; +pub struct Channel1; protocolize! { Self = MyProtocol, -- cgit v1.2.3