aboutsummaryrefslogtreecommitdiffstats
path: root/src/shared/imperative.rs
blob: afdf244066065ed6631320fe29cbfa6324b8f66c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
use crate::shared::ability::*;
use crate::shared::player::*;
use crate::shared::*;
use serde::Deserialize;
use serde::Serialize;

#[derive(Component, Message, Copy, Clone, PartialEq, Debug, Deserialize, Serialize)]
pub enum Imperative {
    Idle,
    WalkTo(Vec2),
    AttackTarget(TargetedAbility, PlayerId),
    AttackDirection(DirectionalAbility, Vec2),
}

#[derive(Resource, Copy, Clone, PartialEq, Debug, Deserialize, Serialize)]
pub enum AttackKey {
    A,
    Q,
    W,
    E,
    R,
    F,
    G,
}