module Oid::Components::Keyboard::Helper

Defined in:

Instance Method Summary

Instance Method Detail

def add_component_keyboard : Entitas::Entity #

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

entity.add_component_keyboard

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

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

entity.add_component_keyboard

def add_keyboard(key : Oid::Enum::Key) : Entitas::Entity #

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

entity.add_keyboard(1)

def del_component_keyboard : Entitas::Entity #

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

entity.del_keyboard
entity.keyboard # => nil

def del_keyboard : Entitas::Entity #

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

entity.del_keyboard
entity.keyboard # => nil

def get_component_keyboard : Oid::Components::Keyboard #

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


def has_component_keyboard? : Bool #

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


def has_keyboard? : Bool #

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


def keyboard : Oid::Components::Keyboard #

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


def keyboard? : Bool #

Alias. See #has_keyboard?


def remove_component_keyboard #

Append. Alias for #del_component_keyboard


def remove_keyboard #

Append. Alias for #del_keyboard


def replace_component_keyboard(component : Oid::Components::Keyboard) #

Append. Alias for #replace_keyboard


def replace_component_keyboard(**args) #

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

entity.replace_keyboard
entity.get_keyboard # => (new_comp)

def replace_keyboard(key : Oid::Enum::Key) #

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)

def replace_keyboard(component : Oid::Components::Keyboard) #

Will replace the current component with the new one provided

entity.replace_component_keyboard(new_comp)
entity.get_keyboard # => (new_comp)