module Oid::Components::Actor::Helper

Direct including types

Defined in:

Instance Method Summary

Instance Method Detail

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


def actor? : Bool #

Alias. See #has_actor?


def add_actor(name : String) : Entitas::Entity #

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

entity.add_actor(1)

def add_actor_listener(value : Oid::Components::Actor::Listener) #

def add_component_actor : Entitas::Entity #

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

entity.add_component_actor

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

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

entity.add_component_actor

def del_actor : Entitas::Entity #

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

entity.del_actor
entity.actor # => nil

def del_component_actor : Entitas::Entity #

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

entity.del_actor
entity.actor # => nil

def get_component_actor : Oid::Components::Actor #

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


def has_actor? : Bool #

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


def has_component_actor? : Bool #

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


def remove_actor #

Append. Alias for #del_actor


def remove_actor_listener(value : Oid::Components::Actor::Listener, remove_comp_when_empty = false) #

def remove_component_actor #

Append. Alias for #del_component_actor


def replace_actor(name : String) #

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

entity.replace_actor(value: 1)
entity.get_actor # => (new_comp)

or

entity.replace_actor(1)
entity.get_actor # => (new_comp)

def replace_actor(component : Oid::Components::Actor) #

Will replace the current component with the new one provided

entity.replace_component_actor(new_comp)
entity.get_actor # => (new_comp)

def replace_component_actor(component : Oid::Components::Actor) #

Append. Alias for #replace_actor


def replace_component_actor(**args) #

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

entity.replace_actor
entity.get_actor # => (new_comp)