module Oid::Components::KeyPressed::Helper

Defined in:

Instance Method Summary

Instance Method Detail

def add_component_key_pressed : Entitas::Entity #

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

entity.add_component_key_pressed

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

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

entity.add_component_key_pressed

def add_key_pressed : Entitas::Entity #

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

entity.add_key_pressed

def del_component_key_pressed : Entitas::Entity #

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

entity.del_key_pressed
entity.key_pressed # => nil

def del_key_pressed : Entitas::Entity #

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

entity.del_key_pressed
entity.key_pressed # => nil

def get_component_key_pressed : Oid::Components::KeyPressed #

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


def has_component_key_pressed? : Bool #

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


def has_key_pressed? : Bool #

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


def key_pressed : Oid::Components::KeyPressed #

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


def key_pressed=(value : Bool) #

def key_pressed? : Bool #

Alias. See #has_key_pressed?


def remove_component_key_pressed #

Append. Alias for #del_component_key_pressed


def remove_key_pressed #

Append. Alias for #del_key_pressed


def replace_component_key_pressed(component : Oid::Components::KeyPressed) #

Append. Alias for #replace_key_pressed


def replace_component_key_pressed(**args) #

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

entity.replace_key_pressed
entity.get_key_pressed # => (new_comp)

def replace_key_pressed(component : Oid::Components::KeyPressed) #

Will replace the current component with the new one provided

entity.replace_component_key_pressed(new_comp)
entity.get_key_pressed # => (new_comp)

def replace_key_pressed #

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

entity.replace_key_pressed
entity.get_key_pressed # => (new_comp)