abstract class Entity
- Entity
- SF::Transformable
- Reference
- Object
Included Modules
- SF::Drawable
Direct Known Subclasses
Defined in:
entity.crConstructors
Instance Method Summary
- #add(entity : Entity)
- #children : Array(Entity)
- #children=(children : Array(Entity))
-
#draw(target : SF::RenderTarget, states : SF::RenderStates)
Draw the object to a render target.
-
#finalize
Virtual destructor
- #load
- #offset : Proc(Vector)
- #offset=(offset : Proc(Vector))
- #owner : Entity | Nil
- #owner=(owner : Entity | Nil)
-
#position
get the position of the object
- #remove(entity : Entity)
- #render(target, states)
- #unload
- #update : Bool
Constructor Detail
Instance Method Detail
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
def position
#
Description copied from class SF::Transformable
get the position of the object
Returns: Current position
See also: position=