module Oid::Components::Prop::Helper
Direct including types
Defined in:
Instance Method Summary
-
#add_component_prop : Entitas::Entity
Add a
Oid::Components::Prop
to the entity. -
#add_component_prop(**args) : Entitas::Entity
Add a
Oid::Components::Prop
to the entity. -
#add_prop(name : String) : Entitas::Entity
Add a
Oid::Components::Prop
to the entity. - #add_prop_listener(value : Oid::Components::Prop::Listener)
-
#del_component_prop : Entitas::Entity
Delete
Oid::Components::Prop
from the entity. -
#del_prop : Entitas::Entity
Delete
Oid::Components::Prop
from the entity. -
#get_component_prop : Oid::Components::Prop
Will return the component that is a
Oid::Components::Prop
or raise -
#has_component_prop? : Bool
Will return true if the entity has an component
Oid::Components::Prop
or false if it does not -
#has_prop? : Bool
Will return true if the entity has an component
Oid::Components::Prop
or false if it does not -
#prop : Oid::Components::Prop
Will return the component that is a
Oid::Components::Prop
or raise -
#prop? : Bool
Alias.
-
#remove_component_prop
Append.
-
#remove_prop
Append.
- #remove_prop_listener(value : Oid::Components::Prop::Listener, remove_comp_when_empty = false)
-
#replace_component_prop(component : Oid::Components::Prop)
Append.
-
#replace_component_prop(**args)
Will replace the current component with the new one generated from the provided arguments
-
#replace_prop(name : String)
Will replace the current component with the new one generated from the provided arguments
-
#replace_prop(component : Oid::Components::Prop)
Will replace the current component with the new one provided
Instance Method Detail
Add a Oid::Components::Prop
to the entity. Returns self
to allow chainables
entity.add_component_prop
Add a Oid::Components::Prop
to the entity. Returns self
to allow chainables
entity.add_component_prop
Add a Oid::Components::Prop
to the entity. Returns self
to allow chainables
entity.add_prop(1)
Delete Oid::Components::Prop
from the entity. Returns self
to allow chainables
entity.del_prop
entity.prop # => nil
Delete Oid::Components::Prop
from the entity. Returns self
to allow chainables
entity.del_prop
entity.prop # => nil
Will return the component that is a Oid::Components::Prop
or raise
Will return true if the entity has an component Oid::Components::Prop
or false if it does not
Will return true if the entity has an component Oid::Components::Prop
or false if it does not
Will return the component that is a Oid::Components::Prop
or raise
Will replace the current component with the new one generated from the provided arguments
entity.replace_prop
entity.get_prop # => (new_comp)
Will replace the current component with the new one generated from the provided arguments
entity.replace_prop(value: 1)
entity.get_prop # => (new_comp)
or
entity.replace_prop(1)
entity.get_prop # => (new_comp)
Will replace the current component with the new one provided
entity.replace_component_prop(new_comp)
entity.get_prop # => (new_comp)