class Gsw::Unit

Direct Known Subclasses

Defined in:

gsw/units/unit.cr

Constant Summary

SPEED = 100

Constructors

Instance Method Summary

Instance methods inherited from class Gsw::Obj

collision?(other : Vector) collision?, draw(_parent_x, _parent_y) draw, height : Int32 | Float32 height, position : Vector position, rotation : Int32 | Float32 | Float64 rotation, update(_frame_time) update, width : Int32 | Float32 width, x(*args, **options)
x(*args, **options, &)
x
, y(*args, **options)
y(*args, **options, &)
y

Constructor methods inherited from class Gsw::Obj

new(x, y, width : Float32 | Int32, height : Float32 | Int32, rotation : Float32 | Float64 | Int32 = 0) new

Constructor Detail

def self.new(name, x, y) #

[View source]

Instance Method Detail

def deselect #

[View source]
def draw(parent_x, parent_y) #

[View source]
def finish #

[View source]
def move(direction : Vector, frame_time) #

[View source]
def queue(action : Action) #

[View source]
def rotate_to(target : Vector) #

[View source]
def select(target : Vector) #

[View source]
def select(selection : SelectionBox) #

[View source]
def selected? : Bool #

[View source]
def sprite : Sprite #

[View source]
def update(frame_time) #

[View source]