Class Fz2D.Plugins.Touch.TouchControl

Defined in: src/plugins/touch/touch_control.coffee

Overview

Public: Touch Control

Subclasses

Fz2D.Plugins.Touch.TouchControlJoystick, Fz2D.Plugins.Touch.TouchControlJoystickButton

Instance Method Summary

Constructor Details

::constructor(w, h, config) Source

Public: Constructor. w - width of game h - height of game config - configuration hash

Parameters:

  • wwidth of game
  • hheight of game
  • configconfiguration hash

Instance Method Details

::draw(ctx) Source

Public: Draws touch control on every frame. ctx - Fz2D.Canvas

Parameters:

::moved(touch, input) Source

Public: Fired on move. touch - Hash input - Fz2D.Input

Parameters:

  • touchHash
  • (Fz2D.Input) inputFz2D.Input

::pressed(touch, input) Source

Public: Fired on press. touch - Hash input - Fz2D.Input

Parameters:

  • touchHash
  • (Fz2D.Input) inputFz2D.Input

::released(touch, input) Source

Public: Fired on release. input - Fz2D.Input

Parameters:

::update(timer, input) Source

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

Parameters: