Class Fz2D.Object

Defined in: src/scene/object.coffee

Overview

Public: Object

Subclasses

Fz2D.Entity, Fz2D.Group, Fz2D.Gui.Countdown, Fz2D.Gui.Label

Instance Method Summary

Constructor Details

::constructor(x, y, w, h) Source

Public: Constructor. x - position on the X axis y - position on the Y axis w - width h - height

Parameters:

  • xposition on the X axis
  • yposition on the Y axis
  • wwidth
  • hheight

Instance Method Details

::draw(ctx) Source

Public: Draws the object on every frame. ctx - Fz2D.Canvas

Parameters:

::hide() Source

Public: Hides the object.

::kill() Source

Public: Kills the object.

::reset(x = null, y = null, angle = null) Source

Public: Resets the object. x - position on the X axis y - position on the Y axis angle - rotation angle

Parameters:

  • xposition on the X axis
  • yposition on the Y axis
  • anglerotation angle

::show() Source

Public: Shows the object.

::update(timer, input) Source

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

Parameters: