logo
pub struct System { /* private fields */ }
Expand description

Provides access to all the different subsystems implemented on each platform.

Implementations

Starts up d2, this should usually be the first thing a game does.

Request to load an asset pack described by the given manifest.

The entity at the root of the hierarchy

The global volume applied to all sounds, defaults to 1

Gets the current clock time, in seconds since January 1, 1970. Depending on the platform, this may be slightly more efficient than Date.now().getTime().

The Stage subsystem, for controlling the display viewport

The Storage subsystem, for persisting values

The Pointer subsystem, for unified mouse/touch events

The Mouse subsystem, for direct access to the mouse

The Touch subsystem, for direct access to the multi-touch

The Keyboard subsystem, for keyboard events

The Web subsystem, for using the device’s web browser

The External subsystem, for interaction with external code

Gets the RFC 4646 language tag of the environment. For example, “en-US”, “pt”, or None if the locale is unknown

The Motion subsystem, for events from the device’s motion sensors

The Renderer subsystem, for creating textures and accessing the GPU

True when the app is not currently visible, such as when minimized or placed in a background browser tab. While hidden, frame updates may be paused or throttled.

Emitted when an uncaught exception occurs, if the platform supports it

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Typed getter

Inspect the context.

Inspect the context.

Inspect the context.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Convert into color

The alignment of pointer.

The type for initializers.

Initializes a with the given initializer. Read more

Dereferences the given pointer. Read more

Mutably dereferences the given pointer. Read more

Drops the object pointed to by the given pointer. Read more

Sets value as a parameter of self.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.