module Oid::Components::Position::Helper
Direct including types
Defined in:
Instance Method Summary
-
#add_component_position : Entitas::Entity
Add a
Oid::Components::Position
to the entity. -
#add_component_position(**args) : Entitas::Entity
Add a
Oid::Components::Position
to the entity. -
#add_position(value : Oid::Vector3 = Oid::Vector3.zero) : Entitas::Entity
Add a
Oid::Components::Position
to the entity. - #add_position_listener(value : Oid::Components::Position::Listener)
-
#del_component_position : Entitas::Entity
Delete
Oid::Components::Position
from the entity. -
#del_position : Entitas::Entity
Delete
Oid::Components::Position
from the entity. -
#get_component_position : Oid::Components::Position
Will return the component that is a
Oid::Components::Position
or raise -
#has_component_position? : Bool
Will return true if the entity has an component
Oid::Components::Position
or false if it does not -
#has_position? : Bool
Will return true if the entity has an component
Oid::Components::Position
or false if it does not -
#position : Oid::Components::Position
Will return the component that is a
Oid::Components::Position
or raise -
#position? : Bool
Alias.
-
#remove_component_position
Append.
-
#remove_position
Append.
- #remove_position_listener(value : Oid::Components::Position::Listener, remove_comp_when_empty = false)
-
#replace_component_position(component : Oid::Components::Position)
Append.
-
#replace_component_position(**args)
Will replace the current component with the new one generated from the provided arguments
-
#replace_position(value : Oid::Vector3)
Will replace the current component with the new one generated from the provided arguments
-
#replace_position(component : Oid::Components::Position)
Will replace the current component with the new one provided
Instance Method Detail
Add a Oid::Components::Position
to the entity. Returns self
to allow chainables
entity.add_component_position
Add a Oid::Components::Position
to the entity. Returns self
to allow chainables
entity.add_component_position
Add a Oid::Components::Position
to the entity. Returns self
to allow chainables
entity.add_position(1)
Delete Oid::Components::Position
from the entity. Returns self
to allow chainables
entity.del_position
entity.position # => nil
Delete Oid::Components::Position
from the entity. Returns self
to allow chainables
entity.del_position
entity.position # => nil
Will return the component that is a Oid::Components::Position
or raise
Will return true if the entity has an component Oid::Components::Position
or false if it does not
Will return true if the entity has an component Oid::Components::Position
or false if it does not
Will return the component that is a Oid::Components::Position
or raise
Append. Alias for #replace_position
Will replace the current component with the new one generated from the provided arguments
entity.replace_position
entity.get_position # => (new_comp)
Will replace the current component with the new one generated from the provided arguments
entity.replace_position(value: 1)
entity.get_position # => (new_comp)
or
entity.replace_position(1)
entity.get_position # => (new_comp)
Will replace the current component with the new one provided
entity.replace_component_position(new_comp)
entity.get_position # => (new_comp)