module Oid::Components::Rotation::Helper

Direct including types

Defined in:

Instance Method Summary

Instance Method Detail

def add_component_rotation : Entitas::Entity #

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

entity.add_component_rotation

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

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

entity.add_component_rotation

def add_rotation(value : Oid::Vector3 = Oid::Vector3.zero) : Entitas::Entity #

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

entity.add_rotation(1)

def del_component_rotation : Entitas::Entity #

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

entity.del_rotation
entity.rotation # => nil

def del_rotation : Entitas::Entity #

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

entity.del_rotation
entity.rotation # => nil

def get_component_rotation : Oid::Components::Rotation #

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


def has_component_rotation? : Bool #

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


def has_rotation? : Bool #

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


def remove_component_rotation #

Append. Alias for #del_component_rotation


def remove_rotation #

Append. Alias for #del_rotation


def replace_component_rotation(component : Oid::Components::Rotation) #

Append. Alias for #replace_rotation


def replace_component_rotation(**args) #

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

entity.replace_rotation
entity.get_rotation # => (new_comp)

def replace_rotation(value : Oid::Vector3) #

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

entity.replace_rotation(value: 1)
entity.get_rotation # => (new_comp)

or

entity.replace_rotation(1)
entity.get_rotation # => (new_comp)

def replace_rotation(component : Oid::Components::Rotation) #

Will replace the current component with the new one provided

entity.replace_component_rotation(new_comp)
entity.get_rotation # => (new_comp)

def rotation : Oid::Components::Rotation #

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


def rotation? : Bool #

Alias. See #has_rotation?