1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
use bevy::{
    ecs::{component::Component, system::Resource},
    reflect::Reflect,
};
use serde::{Deserialize, Serialize};

/// The type of collision the spell has.
#[derive(
    Debug,
    Default,
    Clone,
    Copy,
    PartialEq,
    Eq,
    Hash,
    Component,
    Resource,
    Serialize,
    Deserialize,
    Reflect,
)]
#[serde(rename_all = "camelCase")]
pub enum SpellCollision {
    /// The spell has no collision.
    #[default]
    None,
    /// The spell has a point collision. (e.g. a stone dart or similar projectile)
    Point,
    /// The spell has a line collision. (e.g. a lightning bolt or vine whip)
    Line,
    /// The spell has a cone collision. (e.g. cone of frost)
    Cone,
    /// The spell has a circle collision. (e.g. a fireball)
    Circle,
    /// The spell has a rectangle collision. (e.g. a wall of fire)
    Rectangle,
}