module Oid::Components::Prop::Helper

Direct including types

Defined in:

Instance Method Summary

Instance Method Detail

def add_component_prop : Entitas::Entity #

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

entity.add_component_prop

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

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

entity.add_component_prop

def add_prop(name : String) : Entitas::Entity #

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

entity.add_prop(1)

def add_prop_listener(value : Oid::Components::Prop::Listener) #

def del_component_prop : Entitas::Entity #

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

entity.del_prop
entity.prop # => nil

def del_prop : Entitas::Entity #

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

entity.del_prop
entity.prop # => nil

def get_component_prop : Oid::Components::Prop #

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


def has_component_prop? : Bool #

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


def has_prop? : Bool #

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


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


def prop? : Bool #

Alias. See #has_prop?


def remove_component_prop #

Append. Alias for #del_component_prop


def remove_prop #

Append. Alias for #del_prop


def remove_prop_listener(value : Oid::Components::Prop::Listener, remove_comp_when_empty = false) #

def replace_component_prop(component : Oid::Components::Prop) #

Append. Alias for #replace_prop


def replace_component_prop(**args) #

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

entity.replace_prop
entity.get_prop # => (new_comp)

def replace_prop(name : String) #

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

entity.replace_prop(value: 1)
entity.get_prop # => (new_comp)

or

entity.replace_prop(1)
entity.get_prop # => (new_comp)

def replace_prop(component : Oid::Components::Prop) #

Will replace the current component with the new one provided

entity.replace_component_prop(new_comp)
entity.get_prop # => (new_comp)