[−][src]Struct rust_action_heroes::assets::game_level::LevelFormat
LevelFormat, like RonFormat, is a file format for storing data.
Amethyst requires I implement this to store custom meta-data.
I tried for a long time to store levels in Ron format, but storing an entire level in Ron was unweildy.
Instead I opted to write my own ascii-art level file format and write a parser for it. The parser just goes character by character and adds coordinates for different entity types to the GameLevel struct.
As an added bonus, you can write your own levels for Rust Action heroes pretty easiliy!
- W | w | # -> Wall
- H | h -> Prince horizontival the first
- V | v -> Duke vert the pure
- G | g -> Grabaron the wise
- C | c -> Crate
- E | e -> Exit
- K | k -> Key (for locks)
- L | l -> Locks (for keys)
- S | s -> Switch (for doors)
- D | d -> Door (for switches)
| -> Floor
Example level
######
#g h #
# v s#####
#ksc lde#
##########
This has all three playable characters, a crate, a key, a lock, a two switches, a door, and an exit. Is that level even beatable?
Trait Implementations
impl Clone for LevelFormat
[src]
fn clone(&self) -> LevelFormat
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Copy for LevelFormat
[src]
impl Debug for LevelFormat
[src]
impl Default for LevelFormat
[src]
fn default() -> LevelFormat
[src]
impl Format<GameLevel> for LevelFormat
[src]
Auto Trait Implementations
impl RefUnwindSafe for LevelFormat
impl Send for LevelFormat
impl Sync for LevelFormat
impl Unpin for LevelFormat
impl UnwindSafe for LevelFormat
Blanket Implementations
impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for S where
D: AdaptFrom<S, Swp, Dwp, T>,
Dwp: WhitePoint,
Swp: WhitePoint,
T: Component + Float,
[src]
D: AdaptFrom<S, Swp, Dwp, T>,
Dwp: WhitePoint,
Swp: WhitePoint,
T: Component + Float,
fn adapt_into_using<M>(self, method: M) -> D where
M: TransformMatrix<Swp, Dwp, T>,
[src]
M: TransformMatrix<Swp, Dwp, T>,
fn adapt_into(self) -> D
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Any for T where
T: Any,
T: Any,
fn get_type_id(&self) -> TypeId
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Clone for T where
T: Clone,
[src]
T: Clone,
impl<T> Event for T where
T: Send + Sync + 'static,
T: Send + Sync + 'static,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Resource for T where
T: Any + Send + Sync,
T: Any + Send + Sync,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T> SetParameter for T
fn set<T>(&mut self, value: T) -> <T as Parameter<Self>>::Result where
T: Parameter<Self>,
T: Parameter<Self>,
impl<SS, SP> SupersetOf<SS> for SP where
SS: SubsetOf<SP>,
SS: SubsetOf<SP>,
fn to_subset(&self) -> Option<SS>
fn is_in_subset(&self) -> bool
unsafe fn to_subset_unchecked(&self) -> SS
fn from_subset(element: &SS) -> SP
impl<T> Supports<T> for T
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T> TryDefault for T where
T: Default,
T: Default,
fn try_default() -> Result<T, String>
fn unwrap_default() -> Self
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,