Skip to content

Audio Source

Engine representation of an audio source.

Properties

file_path: str

File path of the audio source.

Methods

None.

Font

Engine representation of a font.

Properties

file_path: str
File path of the font.

uid: str
Unique identifier for the font.

size: int
Size of the font.

Methods

None.

Texture

Engine representation of a texture.

Properties

file_path: str

The file path of the texture.

wrap_s: str

The wrap s of the texture. Defaults to clamp_to_border.

wrap_t: str

The wrap t of the texture. Defaults to clamp_to_border.

nearest_neighbor: bool

Determines if nearest neighbor is applied to the texture. Useful for pixel art.

Methods

None.

Animation

Engine representation of an animation.

Properties

name: str

The name of the animation.

speed: int

The speed of the animation in milliseconds per frame.

loops: bool

Whether or not the animation loops automatically when finished.

frames: List[crescent_api.AnimationFrame]

A list of AnimationFrames.

Methods

None.

Animation Frame

Engine representation of an animation frame.

Properties

frame: int

Current frame number within an animation.

texture_path: str

The texture path of the current animation frame.

draw_source: crescent_api.Rect2

The draw source rectangle of the animation frame.

Methods

None.

Input Action

Engine representation of an input action.

Properties

name: int

The name of the input action

values: List[str]

List of input values for an action.

device_id: int

The device id (e.g. used for multiple controllers). Defaults to the first device at 0.

Methods

None.