class PF::Entity

Overview

An entity is an object with a sprite and a physics body

Direct Known Subclasses

Defined in:

entity.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(sprite_path : String) #

[View source]
def self.new(sprite : Nil | PF::Sprite = nil) #

[View source]

Instance Method Detail

def distance(other : Entity) #

[View source]
def mass : Float64 #

[View source]
def mass=(mass : Float64) #

[View source]
def position : Vector2(Float64) #

[View source]
def position=(position : Vector2(Float64)) #

[View source]
def rotation : Float64 #

[View source]
def rotation=(rotation : Float64) #

[View source]
def rotation_speed : Float64 #

[View source]
def rotation_speed=(rotation_speed : Float64) #

[View source]
def sprite : Sprite | Nil #

[View source]
def sprite=(sprite : Sprite | Nil) #

[View source]
def update(dt : Float64) #

[View source]
def velocity : Vector2(Float64) #

[View source]
def velocity=(velocity : Vector2(Float64)) #

[View source]