abstract class PF::Game

Defined in:

game.cr

Constant Summary

FPS_INTERVAL = 1.0
SHOW_FPS = true

Constructors

Instance Method Summary

Constructor Detail

def self.new(width : Int32, height : Int32, scale : Int32 = 1, title : String = self.class.name, flags = SDL::Renderer::Flags::ACCELERATED, window_flags : SDL::Window::Flags = SDL::Window::Flags::SHOWN) #

[View source]

Instance Method Detail

def clear(r = 0, g = 0, b = 0) #

[View source]
abstract def draw #

[View source]
def draw_circle(*args, **options) #

[View source]
def draw_circle(*args, **options, &) #

[View source]
def draw_curve(*args, **options) #

[View source]
def draw_curve(*args, **options, &) #

[View source]
def draw_line(*args, **options) #

[View source]
def draw_line(*args, **options, &) #

[View source]
def draw_point(*args, **options) #

[View source]
def draw_point(*args, **options, &) #

[View source]
def draw_rect(*args, **options) #

[View source]
def draw_rect(*args, **options, &) #

[View source]
def draw_shape(*args, **options) #

[View source]
def draw_shape(*args, **options, &) #

[View source]
def draw_string(*args, **options) #

[View source]
def draw_string(*args, **options, &) #

[View source]
def draw_triangle(*args, **options) #

[View source]
def draw_triangle(*args, **options, &) #

[View source]
def elapsed_seconds #

[View source]
def elapsed_time #

[View source]
def fill_circle(*args, **options) #

[View source]
def fill_circle(*args, **options, &) #

[View source]
def fill_rect(*args, **options) #

[View source]
def fill_rect(*args, **options, &) #

[View source]
def fill_shape(*args, **options) #

[View source]
def fill_shape(*args, **options, &) #

[View source]
def fill_triangle(*args, **options) #

[View source]
def fill_triangle(*args, **options, &) #

[View source]
def height : Int32 #

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

[View source]
def on_exit #

To be overridden


[View source]
def run! #

[View source]
def running : Bool #

[View source]
def running=(running : Bool) #

[View source]
def scale : Int32 #

[View source]
def scan_line(*args, **options) #

[View source]
def scan_line(*args, **options, &) #

[View source]
def screen : Sprite #

[View source]
def screen=(screen : Sprite) #

[View source]
def title : String #

[View source]
abstract def update(dt : Float64, event : SDL::Event) #

[View source]
def viewport #

[View source]
def width : Int32 #

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

[View source]