class Collider::Circle

Defined in:

entities/collider.cr

Constructors

Instance Method Summary

Instance methods inherited from class Collider

bounds bounds, collidable : Bool collidable, collidable=(collidable : Bool) collidable=, collide(collider : Collider) : Bool
collide(collider : Rectangle) : Bool
collide(collider : Circle) : Bool
collide(collider : Capsule) : Bool
collide(collider : Group) : Bool
collide
, handlers : Array(Collider -> Nil) handlers, handlers=(handlers : Array(Collider -> _)) handlers=, load load, on(&block : Collider -> Nil) on, trigger(collider) trigger, unload unload

Instance methods inherited from class Entity

add(entity : Entity) add, children : Array(Entity) children, children=(children : Array(Entity)) children=, draw(target : SF::RenderTarget, states : SF::RenderStates) draw, finalize finalize, load load, offset : Proc(Vector) offset, offset=(offset : Proc(Vector)) offset=, owner : Entity | Nil owner, owner=(owner : Entity | Nil) owner=, position position, remove(entity : Entity) remove, render(target, states) render, unload unload, update : Bool update

Constructor methods inherited from class Entity

new new

Constructor Detail

def self.new(origin : SF::Vector2(Float32), radius : Float32) #

[View source]

Instance Method Detail

def bounds #

[View source]
def collide(collider : Circle) : Bool #

[View source]
def collide(collider : Rectangle) : Bool #

[View source]
def collide(collider : Capsule) : Bool #

[View source]
def load #

[View source]
def origin : SF::Vector2(Float32) #
Description copied from class SF::Transformable

get the local origin of the object

Returns: Current origin

See also: #origin=


[View source]
def origin=(origin : SF::Vector2(Float32)) #

[View source]
def radius : Float32 #

[View source]
def radius=(radius : Float32) #

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

[View source]