module Oid::Components::Keyboard::Helper
Defined in:
Instance Method Summary
-
#add_component_keyboard : Entitas::Entity
Add a
Oid::Components::Keyboard
to the entity. -
#add_component_keyboard(**args) : Entitas::Entity
Add a
Oid::Components::Keyboard
to the entity. -
#add_keyboard(key : Oid::Enum::Key) : Entitas::Entity
Add a
Oid::Components::Keyboard
to the entity. -
#del_component_keyboard : Entitas::Entity
Delete
Oid::Components::Keyboard
from the entity. -
#del_keyboard : Entitas::Entity
Delete
Oid::Components::Keyboard
from the entity. -
#get_component_keyboard : Oid::Components::Keyboard
Will return the component that is a
Oid::Components::Keyboard
or raise -
#has_component_keyboard? : Bool
Will return true if the entity has an component
Oid::Components::Keyboard
or false if it does not -
#has_keyboard? : Bool
Will return true if the entity has an component
Oid::Components::Keyboard
or false if it does not -
#keyboard : Oid::Components::Keyboard
Will return the component that is a
Oid::Components::Keyboard
or raise -
#keyboard? : Bool
Alias.
-
#remove_component_keyboard
Append.
-
#remove_keyboard
Append.
-
#replace_component_keyboard(component : Oid::Components::Keyboard)
Append.
-
#replace_component_keyboard(**args)
Will replace the current component with the new one generated from the provided arguments
-
#replace_keyboard(key : Oid::Enum::Key)
Will replace the current component with the new one generated from the provided arguments
-
#replace_keyboard(component : Oid::Components::Keyboard)
Will replace the current component with the new one provided
Instance Method Detail
Add a Oid::Components::Keyboard
to the entity. Returns self
to allow chainables
entity.add_component_keyboard
Add a Oid::Components::Keyboard
to the entity. Returns self
to allow chainables
entity.add_component_keyboard
Add a Oid::Components::Keyboard
to the entity. Returns self
to allow chainables
entity.add_keyboard(1)
Delete Oid::Components::Keyboard
from the entity. Returns self
to allow chainables
entity.del_keyboard
entity.keyboard # => nil
Delete Oid::Components::Keyboard
from the entity. Returns self
to allow chainables
entity.del_keyboard
entity.keyboard # => nil
Will return the component that is a Oid::Components::Keyboard
or raise
Will return true if the entity has an component Oid::Components::Keyboard
or false if it does not
Will return true if the entity has an component Oid::Components::Keyboard
or false if it does not
Will return the component that is a Oid::Components::Keyboard
or raise
Append. Alias for #replace_keyboard
Will replace the current component with the new one generated from the provided arguments
entity.replace_keyboard
entity.get_keyboard # => (new_comp)
Will replace the current component with the new one generated from the provided arguments
entity.replace_keyboard(value: 1)
entity.get_keyboard # => (new_comp)
or
entity.replace_keyboard(1)
entity.get_keyboard # => (new_comp)
Will replace the current component with the new one provided
entity.replace_component_keyboard(new_comp)
entity.get_keyboard # => (new_comp)