abstract class Entity

Included Modules

Direct Known Subclasses

Defined in:

entity.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new #

[View source]

Instance Method Detail

def add(entity : Entity) #

[View source]
def children : Array(Entity) #

[View source]
def children=(children : Array(Entity)) #

[View source]
def draw(target : SF::RenderTarget, states : SF::RenderStates) #
Description copied from module SF::Drawable

Draw the object to a render target.

This is an abstract method that has to be implemented by the including class to define how the drawable should be drawn.

  • target - Render target to draw to
  • states - Current render states

[View source]
def finalize #
Description copied from class SF::Transformable

Virtual destructor


[View source]
def load #

[View source]
def offset : Proc(Vector) #

[View source]
def offset=(offset : Proc(Vector)) #

[View source]
def owner : Entity | Nil #

[View source]
def owner=(owner : Entity | Nil) #

[View source]
def position #
Description copied from class SF::Transformable

get the position of the object

Returns: Current position

See also: position=


[View source]
def remove(entity : Entity) #

[View source]
def render(target, states) #

[View source]
def unload #

[View source]
def update : Bool #

[View source]