pub fn new<P, S, I>(path: P, initial_state: S, init: I) -> Result<Application<'a, T>>
    where
        P: AsRef<Path>,
        S: State<T> + 'a,
        I: DataInit<T>,
    {
        ApplicationBuilder::new(path, initial_state)?.build(init)
    }
/// Creates a new Application with the given initial game state.
/// This will create and allocate all the needed resources for
/// the event loop of the game engine. It is a shortcut for convenience
/// if you need more control over how the engine is configured you should
/// be using [build](struct.Application.html#method.build) instead.
///
/// # Parameters
///
/// - `path`: The default path for asset loading.
///
/// - `initial_state`: The initial State handler of your game See
///   [State](trait.State.html) for more information on what this is.
///
/// # Returns
///
/// Returns a `Result` type wrapping the `Application` type. See
/// [errors](struct.Application.html#errors) for a full list of
/// possible errors that can happen in the creation of a Application object.
///
/// # Type Parameters
///
/// - `P`: The path type for your standard asset path.
///
/// - `S`: A type that implements the `State` trait. e.g. Your initial
///        game logic.
///
/// # Lifetimes
///
/// - `a`: The lifetime of the `State` objects.
/// - `b`: This lifetime is inherited from `specs` and `shred`, it is
///        the minimum lifetime of the systems used by `Application`
///
/// # Errors
///
/// Application will return an error if the internal thread pool fails
/// to initialize correctly because of systems resource limitations
///
/// # Examples
///
/// ~~~no_run
/// use amethyst::prelude::*;
///
/// struct NullState;
/// impl State<()> for NullState {}
///
/// let mut game = Application::new("assets/", NullState, ()).expect("Failed to initialize");
/// game.run();
/// ~~~
Creates a new Application with the given initial game state.
This will create and allocate all the needed resources for
the event loop of the game engine. It is a shortcut for convenience
if you need more control over how the engine is configured you should
be using [build](struct.Application.html#method.build) instead.
Creates a new Application with the given initial game state . This will create and allocate all the needed resources for the event loop of the game engine . It is a shortcut for convenience if you need more control over how the engine is configured you should be using [ build ] ( struct . Application . html#method . build ) instead .
pub fn new<P, S, I>(path: P, initial_state: S, init: I) -> Result<Application<'a, T>>
    where
        P: AsRef<Path>,
        S: State<T> + 'a,
        I: DataInit<T>,
    {
        ApplicationBuilder::new(path, initial_state)?.build(init)
    }
pub fn new < P , S , I > ( path : P , initial_state : S , init : I ) -> Result < Application < ' a , T > > where P : AsRef < Path > , S : State < T > + ' a , I : DataInit < T > , { ApplicationBuilder :: new ( path , initial_state ) ? . build ( init ) }
Creates a new Application with the given initial game state.
Creates a new Application with the given initial game state .
path
P
initial_state
S
init
I
Returns a `Result` type wrapping the `Application` type. See
[errors](struct.Application.html#errors) for a full list of
possible errors that can happen in the creation of a Application object.
Returns a ` Result ` type wrapping the ` Application ` type . See [ errors ] ( struct . Application . html#errors ) for a full list of possible errors that can happen in the creation of a Application object .
path
P
The default path for asset loading.
The default path for asset loading .
initial_state
S
The initial State handler of your game See
[State](trait.State.html) for more information on what this is.
The initial State handler of your game See [ State ] ( trait . State . html ) for more information on what this is .
init
I
P
The path type for your standard asset path.
The path type for your standard asset path .
S
A type that implements the `State` trait. e.g. Your initial
game logic.
A type that implements the ` State ` trait . e . g . Your initial game logic .
lifetimes
: The lifetime of the `State` objects.
: The lifetime of the ` State ` objects .
lifetimes
: This lifetime is inherited from `specs` and `shred`, it is
the minimum lifetime of the systems used by `Application`
: This lifetime is inherited from ` specs ` and ` shred ` it is the minimum lifetime of the systems used by ` Application `
errors
Application will return an error if the internal thread pool fails
to initialize correctly because of systems resource limitations
Application will return an error if the internal thread pool fails to initialize correctly because of systems resource limitations
examples
~~~no_run
use amethyst::prelude::*.

struct NullState;
impl State<()> for NullState {}

let mut game = Application::new("assets/", NullState, ()).expect("Failed to initialize");
game.run();
~~~
~~~no_run use amethyst :: prelude :: * . struct NullState ; impl State< () > for NullState {} let mut game = Application :: new ( " assets / " NullState () ) . expect ( " Failed to initialize " ) ; game . run () ; ~~~