0.1.0-0-pre.1
This commit is contained in:
14
crates/engines/engine-v1-common/Cargo.toml
Normal file
14
crates/engines/engine-v1-common/Cargo.toml
Normal file
@@ -0,0 +1,14 @@
|
||||
# file: crates/engines/engine-v1-common/Cargo.toml
|
||||
# version: 1
|
||||
|
||||
[package]
|
||||
name = "engine-v1-common"
|
||||
version.workspace = true
|
||||
edition.workspace = true
|
||||
license.workspace = true
|
||||
repository.workspace = true
|
||||
authors.workspace = true
|
||||
publish.workspace = true
|
||||
|
||||
[lints]
|
||||
workspace = true
|
||||
21
crates/engines/engine-v1-common/src/action.rs
Normal file
21
crates/engines/engine-v1-common/src/action.rs
Normal file
@@ -0,0 +1,21 @@
|
||||
// file: crates/engines/engine-v1-common/src/action.rs
|
||||
// version: 1
|
||||
|
||||
/// Logical game actions independent from physical input devices.
|
||||
#[derive(Clone, Copy, Debug, Eq, PartialEq)]
|
||||
pub enum GameAction {
|
||||
/// Move or select left.
|
||||
Left,
|
||||
/// Move or select right.
|
||||
Right,
|
||||
/// Move or select upward.
|
||||
Up,
|
||||
/// Move or select downward.
|
||||
Down,
|
||||
/// Trigger the primary game action.
|
||||
Primary,
|
||||
/// Trigger the secondary game action.
|
||||
Secondary,
|
||||
/// Pause or resume the game.
|
||||
Pause,
|
||||
}
|
||||
13
crates/engines/engine-v1-common/src/lib.rs
Normal file
13
crates/engines/engine-v1-common/src/lib.rs
Normal file
@@ -0,0 +1,13 @@
|
||||
// file: crates/engines/engine-v1-common/src/lib.rs
|
||||
// version: 1
|
||||
|
||||
#![warn(missing_docs)]
|
||||
#![deny(unreachable_pub)]
|
||||
#![forbid(unsafe_code)]
|
||||
|
||||
//! Common, platform-independent primitives for engine generation V1.
|
||||
|
||||
mod action;
|
||||
|
||||
/// Re-export of the canonical logical input action used by engine V1 games.
|
||||
pub use self::action::GameAction;
|
||||
Reference in New Issue
Block a user