Added an illustration to the compass direction docs (issue 13664) (#13788)
i based the design on @mgi388 in the discussion about the issue. i added the illustration in such a way that it shows up when you hover your mouse over the type, i hope this is what was meant by the issue no unit tests were added bc obviously Fixes #13664
This commit is contained in:
parent
93f3432400
commit
2c5959a29d
@ -5,6 +5,17 @@ use bevy_reflect::Reflect;
|
||||
use bevy_reflect::{ReflectDeserialize, ReflectSerialize};
|
||||
|
||||
/// A compass enum with 4 directions.
|
||||
/// ``` ignore
|
||||
/// N (North)
|
||||
/// ▲
|
||||
/// │
|
||||
/// │
|
||||
/// W (West) ┼─────► E (East)
|
||||
/// │
|
||||
/// │
|
||||
/// ▼
|
||||
/// S (South)
|
||||
/// ```
|
||||
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
|
||||
#[cfg_attr(feature = "serialize", derive(serde::Serialize, serde::Deserialize))]
|
||||
#[cfg_attr(feature = "bevy_reflect", derive(Reflect), reflect(Debug, PartialEq))]
|
||||
@ -24,6 +35,17 @@ pub enum CompassQuadrant {
|
||||
}
|
||||
|
||||
/// A compass enum with 8 directions.
|
||||
/// ``` ignore
|
||||
/// N (North)
|
||||
/// ▲
|
||||
/// NW │ NE
|
||||
/// ╲ │ ╱
|
||||
/// W (West) ┼─────► E (East)
|
||||
/// ╱ │ ╲
|
||||
/// SW │ SE
|
||||
/// ▼
|
||||
/// S (South)
|
||||
/// ```
|
||||
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
|
||||
#[cfg_attr(feature = "serialize", derive(serde::Serialize, serde::Deserialize))]
|
||||
#[cfg_attr(feature = "bevy_reflect", derive(Reflect), reflect(Debug, PartialEq))]
|
||||
|
||||
Loading…
Reference in New Issue
Block a user