module Oid::Components::MousePressed::Helper

Defined in:

Instance Method Summary

Instance Method Detail

def add_component_mouse_pressed : Entitas::Entity #

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

entity.add_component_mouse_pressed

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

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

entity.add_component_mouse_pressed

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

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

entity.add_mouse_pressed(1)

def del_component_mouse_pressed : Entitas::Entity #

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

entity.del_mouse_pressed
entity.mouse_pressed # => nil

def del_mouse_pressed : Entitas::Entity #

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

entity.del_mouse_pressed
entity.mouse_pressed # => nil

def get_component_mouse_pressed : Oid::Components::MousePressed #

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


def has_component_mouse_pressed? : Bool #

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


def has_mouse_pressed? : Bool #

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


def mouse_pressed : Oid::Components::MousePressed #

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


def mouse_pressed? : Bool #

Alias. See #has_mouse_pressed?


def remove_component_mouse_pressed #

Append. Alias for #del_component_mouse_pressed


def remove_mouse_pressed #

Append. Alias for #del_mouse_pressed


def replace_component_mouse_pressed(component : Oid::Components::MousePressed) #

Append. Alias for #replace_mouse_pressed


def replace_component_mouse_pressed(**args) #

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

entity.replace_mouse_pressed
entity.get_mouse_pressed # => (new_comp)

def replace_mouse_pressed(position : Oid::Vector2) #

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

entity.replace_mouse_pressed(value: 1)
entity.get_mouse_pressed # => (new_comp)

or

entity.replace_mouse_pressed(1)
entity.get_mouse_pressed # => (new_comp)

def replace_mouse_pressed(component : Oid::Components::MousePressed) #

Will replace the current component with the new one provided

entity.replace_component_mouse_pressed(new_comp)
entity.get_mouse_pressed # => (new_comp)