abstract class Looper::Obj

Direct Known Subclasses

Defined in:

looper/obj.cr

Constant Summary

HIT_BOX_COLOR = Color::Red

Constructors

Instance Method Summary

Constructor Detail

def self.new(x : Float32 | Int32, y : Float32 | Int32, width : Int32, height : Int32, hit_box_color : Color = HIT_BOX_COLOR) #

[View source]

Instance Method Detail

def collision?(x, y, width, height) #

[View source]
def collision?(objs : Array(Obj)) #

[View source]
def collision?(rects : Array(Rectangle)) #

[View source]
def collision?(tris : Array(Triangle)) #

[View source]
def collision?(obj : Obj) #

[View source]
def collision?(rect : Rectangle) #

[View source]
def collision?(tri : Triangle) #

[View source]
def draw #

[View source]
def height : Int32 #

[View source]
def height=(height : Int32) #

[View source]
def hit_box #

[View source]
def inside?(x, y) #

[View source]
def update(frame_time) #

[View source]
def width : Int32 #

[View source]
def width=(width : Int32) #

[View source]
def x : Int32 | Float32 #

[View source]
def x=(x : Int32 | Float32) #

[View source]
def y : Int32 | Float32 #

[View source]
def y=(y : Int32 | Float32) #

[View source]