module Oid::Components::MouseDown::Helper

Defined in:

Instance Method Summary

Instance Method Detail

def add_component_mouse_down : Entitas::Entity #

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

entity.add_component_mouse_down

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

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

entity.add_component_mouse_down

def add_mouse_down(position : Oid::Vector2) : Entitas::Entity #

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

entity.add_mouse_down(1)

def del_component_mouse_down : Entitas::Entity #

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

entity.del_mouse_down
entity.mouse_down # => nil

def del_mouse_down : Entitas::Entity #

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

entity.del_mouse_down
entity.mouse_down # => nil

def get_component_mouse_down : Oid::Components::MouseDown #

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


def has_component_mouse_down? : Bool #

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


def has_mouse_down? : Bool #

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


def mouse_down : Oid::Components::MouseDown #

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


def mouse_down? : Bool #

Alias. See #has_mouse_down?


def remove_component_mouse_down #

Append. Alias for #del_component_mouse_down


def remove_mouse_down #

Append. Alias for #del_mouse_down


def replace_component_mouse_down(component : Oid::Components::MouseDown) #

Append. Alias for #replace_mouse_down


def replace_component_mouse_down(**args) #

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

entity.replace_mouse_down
entity.get_mouse_down # => (new_comp)

def replace_mouse_down(position : Oid::Vector2) #

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

entity.replace_mouse_down(value: 1)
entity.get_mouse_down # => (new_comp)

or

entity.replace_mouse_down(1)
entity.get_mouse_down # => (new_comp)

def replace_mouse_down(component : Oid::Components::MouseDown) #

Will replace the current component with the new one provided

entity.replace_component_mouse_down(new_comp)
entity.get_mouse_down # => (new_comp)