module Oid::Components::Direction::Helper

Direct including types

Defined in:

Instance Method Summary

Instance Method Detail

def add_component_direction : Entitas::Entity #

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

entity.add_component_direction

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

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

entity.add_component_direction

def add_direction(value : Float64) : Entitas::Entity #

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

entity.add_direction(1)

def del_component_direction : Entitas::Entity #

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

entity.del_direction
entity.direction # => nil

def del_direction : Entitas::Entity #

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

entity.del_direction
entity.direction # => nil

def direction : Oid::Components::Direction #

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


def direction? : Bool #

Alias. See #has_direction?


def get_component_direction : Oid::Components::Direction #

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


def has_component_direction? : Bool #

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


def has_direction? : Bool #

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


def remove_component_direction #

Append. Alias for #del_component_direction


def remove_direction #

Append. Alias for #del_direction


def replace_component_direction(component : Oid::Components::Direction) #

Append. Alias for #replace_direction


def replace_component_direction(**args) #

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

entity.replace_direction
entity.get_direction # => (new_comp)

def replace_direction(value : Float64) #

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

entity.replace_direction(value: 1)
entity.get_direction # => (new_comp)

or

entity.replace_direction(1)
entity.get_direction # => (new_comp)

def replace_direction(component : Oid::Components::Direction) #

Will replace the current component with the new one provided

entity.replace_component_direction(new_comp)
entity.get_direction # => (new_comp)