class Gsw::Sprite

Defined in:

gsw/utils/sprite.cr

Constant Summary

DEBUG = false
SPRITE_ASSET_PATH = "../../../assets/sprites"

Constructors

Class Method Summary

Instance Method Summary

Constructor Detail

def self.new(asset_file : String, frames : Int32, rows : Int32) #

[View source]

Class Method Detail

def self.get(asset_file) #

[View source]
def self.get_texture(asset_file) #

[View source]
def self.load(asset_file : String, frames, rows) #

[View source]
def self.load(sprites : Array(NamedTuple(asset_file: String, frames: Int32, rows: Int32))) #

[View source]
def self.load_texture(asset_file) #

[View source]

Instance Method Detail

def asset_file : String #

[View source]
def draw(x, y, frame = 0, row = 0, rotation = 0, tint = LibRay::WHITE) #

[View source]
def draw_partial(x, y, source_width = width, source_height = height, frame = 0, row = 0, rotation = 0, tint = LibRay::WHITE) #

[View source]
def frames : Int32 #

[View source]
def get_texture #

[View source]
def height : Int32 #

[View source]
def rows : Int32 #

[View source]
def texture : LibRay::Texture2D #

[View source]
def width : Int32 #

[View source]