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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
//! Amethyst is a free and open source game engine written in idiomatic
//! [Rust][rs] for building video games and interactive multimedia applications.
//! The source code is available for download on [GitHub][gh]. See the
//! [online book][bk] for a complete guide to using Amethyst.
//!
//! [rs]: https://www.rust-lang.org/
//! [gh]: https://github.com/amethyst/amethyst
//! [bk]: https://www.amethyst.rs/book/master/
//!
//! This project is a work in progress and is very incomplete. Pardon the dust!
//!
//! # Example
//!
//! ```rust,no_run
//! extern crate amethyst;
//!
//! use amethyst::prelude::*;
//! use amethyst::renderer::{Event, KeyboardInput, VirtualKeyCode, WindowEvent};
//!
//! struct GameState;
//!
//! impl State<()> for GameState {
//!     fn on_start(&mut self, _: StateData<()>) {
//!         println!("Starting game!");
//!     }
//!
//!     fn handle_event(&mut self, _: StateData<()>, event: Event) -> Trans<()> {
//!         match event {
//!             Event::WindowEvent { event, .. } => match event {
//!                 WindowEvent::KeyboardInput {
//!                     input: KeyboardInput { virtual_keycode: Some(VirtualKeyCode::Escape), .. }, ..
//!                 } |
//!                 WindowEvent::CloseRequested => Trans::Quit,
//!                 _ => Trans::None,
//!             },
//!             _ => Trans::None,
//!         }
//!     }
//!
//!     fn update(&mut self, _: StateData<()>) -> Trans<()> {
//!         println!("Computing some more whoop-ass...");
//!         Trans::Quit
//!     }
//! }
//!
//! fn main() {
//!     let mut game = Application::new("assets/", GameState, ()).expect("Fatal error");
//!     game.run();
//! }
//! ```

#![warn(missing_docs)]
#![doc(html_logo_url = "https://tinyurl.com/jtmm43a")]

#[macro_use]
#[cfg(feature = "profiler")]
pub extern crate thread_profiler;

pub extern crate amethyst_animation as animation;
pub extern crate amethyst_assets as assets;
pub extern crate amethyst_audio as audio;
pub extern crate amethyst_config as config;
pub extern crate amethyst_controls as controls;
pub extern crate amethyst_core as core;
pub extern crate amethyst_input as input;
pub extern crate amethyst_locale as locale;
pub extern crate amethyst_renderer as renderer;
pub extern crate amethyst_ui as ui;
pub extern crate amethyst_utils as utils;
pub extern crate winit;

#[macro_use]
extern crate derivative;
extern crate fern;
#[macro_use]
extern crate log;
extern crate rayon;
extern crate rustc_version_runtime;

pub use self::app::{Application, ApplicationBuilder};
pub use self::error::{Error, Result};
pub use self::game_data::{DataInit, GameData, GameDataBuilder};
pub use self::logger::{start_logger, LevelFilter as LogLevelFilter, LoggerConfig};
pub use self::state::{State, StateData, StateMachine, Trans};
pub use core::shred;
pub use core::shrev;
pub use core::specs as ecs;

pub mod prelude;

mod app;
mod error;
mod game_data;
mod logger;
mod state;
mod vergen;