diff options
author | Alexander Foremny <aforemny@posteo.de> | 2024-03-15 16:07:58 +0100 |
---|---|---|
committer | Alexander Foremny <aforemny@posteo.de> | 2024-03-15 16:08:00 +0100 |
commit | c71366c2e0a9f0b454957feeb87b51f6b27d54bd (patch) | |
tree | 843e35d09a27275babf4008b58ef72302c18c4ff /src/protocol.rs | |
parent | fdee6aa8cf2c51d5004d914458ff661da366e883 (diff) |
feat: add champions
Select champions using the `--champion` flag. Valid values are `ranged`
and `meele` (default).
Diffstat (limited to 'src/protocol.rs')
-rw-r--r-- | src/protocol.rs | 8 |
1 files changed, 5 insertions, 3 deletions
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, |