module Oid::Components::Asset::Helper

Direct including types

Defined in:

Instance Method Summary

Instance Method Detail

def add_asset(**args) : Entitas::Entity #

Add a Oid::Components::Asset to the entity. Returns self to allow chainables

entity.add_asset

def add_component_asset : Entitas::Entity #

Add a Oid::Components::Asset to the entity. Returns self to allow chainables

entity.add_component_asset

def add_component_asset(**args) : Entitas::Entity #

Add a Oid::Components::Asset to the entity. Returns self to allow chainables

entity.add_component_asset

Will return the component that is a Oid::Components::Asset or raise


def asset? : Bool #

Alias. See #has_asset?


def del_asset : Entitas::Entity #

Delete Oid::Components::Asset from the entity. Returns self to allow chainables

entity.del_asset
entity.asset # => nil

def del_component_asset : Entitas::Entity #

Delete Oid::Components::Asset from the entity. Returns self to allow chainables

entity.del_asset
entity.asset # => nil

def get_component_asset : Oid::Components::Asset #

Will return the component that is a Oid::Components::Asset or raise


def has_asset? : Bool #

Will return true if the entity has an component Oid::Components::Asset or false if it does not


def has_component_asset? : Bool #

Will return true if the entity has an component Oid::Components::Asset or false if it does not


def remove_asset #

Append. Alias for #del_asset


def remove_component_asset #

Append. Alias for #del_component_asset


def replace_asset(component : Oid::Components::Asset) #

Will replace the current component with the new one provided

entity.replace_component_asset(new_comp)
entity.get_asset # => (new_comp)

def replace_asset(**args) #

Will replace the current component with the new one generated from the provided arguments

entity.replace_asset
entity.get_asset # => (new_comp)

def replace_component_asset(component : Oid::Components::Asset) #

Append. Alias for #replace_asset


def replace_component_asset(**args) #

Will replace the current component with the new one generated from the provided arguments

entity.replace_asset
entity.get_asset # => (new_comp)