Class Fz2D.Gui.Countdown

Defined in: src/scene/objects/gui/countdown.coffee
Inherits: Fz2D.Object

Overview

Public: Countdown

Instance Method Summary

Inherited Method Summary

Methods inherited from Fz2D.Object

.constructor, .kill, .reset, .show, .hide, .draw, .update

Constructor Details

::constructor(count, x, y, font) Source

Public: Constructor count - initial number to count down from x - position on the X axis y - position on the Y axis font - Fz2D.Font

Parameters:

  • countinitial number to count down from
  • xposition on the X axis
  • yposition on the Y axis
  • (Fz2D.Font) fontFz2D.Font

Instance Method Details

::draw(ctx) Source

Public: Draw counter on every frame. ctx - Fz2D.Canvas

Parameters:

::onend(countdown) Source

Public: On end(ed) callback. countdown - Fz2D.Gui.Countdown

Parameters:

::reset() Source

Public: Resets the counter.

::update(timer, input) Source

Public: Updates counter on every frame. timer - Fz2D.Timer input - Fz2D.Input

Parameters: