module Oid::Components::PositionType::Helper

Direct including types

Defined in:

Instance Method Summary

Instance Method Detail

def add_component_position_type : Entitas::Entity #

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

entity.add_component_position_type

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

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

entity.add_component_position_type

def add_position_type(value : Oid::Enum::Position = Oid::Enum::Position::Relative) : Entitas::Entity #

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

entity.add_position_type(1)

def del_component_position_type : Entitas::Entity #

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

entity.del_position_type
entity.position_type # => nil

def del_position_type : Entitas::Entity #

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

entity.del_position_type
entity.position_type # => nil

def get_component_position_type : Oid::Components::PositionType #

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


def has_component_position_type? : Bool #

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


def has_position_type? : Bool #

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


def position_type : Oid::Components::PositionType #

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


def position_type? : Bool #

Alias. See #has_position_type?


def remove_component_position_type #

Append. Alias for #del_component_position_type


def remove_position_type #

Append. Alias for #del_position_type


def replace_component_position_type(component : Oid::Components::PositionType) #

Append. Alias for #replace_position_type


def replace_component_position_type(**args) #

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

entity.replace_position_type
entity.get_position_type # => (new_comp)

def replace_position_type(value : Oid::Enum::Position) #

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

entity.replace_position_type(value: 1)
entity.get_position_type # => (new_comp)

or

entity.replace_position_type(1)
entity.get_position_type # => (new_comp)

def replace_position_type(component : Oid::Components::PositionType) #

Will replace the current component with the new one provided

entity.replace_component_position_type(new_comp)
entity.get_position_type # => (new_comp)