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
#![crate_name = "amethyst"] #![crate_type = "lib"] //! Amethyst is a free and open source SDK (software development kit) written in //! idiomatic [Rust](https://www.rust-lang.org/) for building video games and //! interactive multimedia applications. //! //! # Example //! //! ```ignore //! extern crate amethyst; //! //! use amethyst::*; //! //! struct GameState; //! //! impl State for GameState { //! fn new() -> GameState { //! GameState //! } //! //! fn handle_events(&mut self, game: &Game, events: &Vec<Event>) { //! for e in events { //! match e { //! Event::Closed => game.quit(), //! Event::Resized(x, y) => println!("x: {}, y: {}", x, y), //! Event::KeyPressed(k) => if k == Key::Esc { game.quit() } //! } //! } //! } //! //! fn update(&mut self, game: &Game, delta: Duration) { //! println!("Computing some more whoop-ass..."); //! } //! } //! //! fn main() { //! let mut game = Application::new(GameState::new()); //! game.run(); //! } //! ``` pub mod engine; pub mod renderer;