Gamalto

Fork me on GitHub

Object ScrollingRegion Overview

Gamalto. ScrollingRegion

new Gamalto.ScrollingRegion(box, loopopt)

Creates an object defining the movable region of a scroller.

Parameters
Name Type Attributes Description
box Gamalto.IBox

Bounds of the region to be scrolled.

loop boolean <optional>

Whether to loop the scrolling area.

Extends

Members

loop :boolean

Gets or sets the loop state of the scrolling.

moving :Gamalto.IPoint

readonly

Current expected displacement of the region in pixels.

tag :object

inherited

Utility property to exchange data between objects.

Inherited From

Methods

clone() object

inherited abstract

Clones the object. It will be shallow copy unless otherwise specfied.

Inherited From
Returns
  • New instance of the object. Defaults to null.

reset()

inherited

Resets the motion properties of the movable entity.

Inherited From

setSpeed(sx, sy)

inherited

Sets the maximum motion speed of the entity.

Parameters
Name Type Description
sx number

Maximum horizontal speed in pixels per second.

sy number

Maximum vertical speed in pixels per second.

Inherited From

toString() string

inherited abstract

Converts the object into a string.

Inherited From
Returns
  • string

update(timer, dx, dy) Gamalto.Vector2

inherited

Updates the internal motion state of the movable entity.

Parameters
Name Type Description
timer Gamalto.ITiming

Timer from which the elapsed time will be read.

dx number

Value beween -1 and +1 indicating the horizontal drection.

dy number

Value beween -1 and +1 indicating the vertical direction.

Inherited From
Returns
  • Effective displacement to be applied to the entity in pixels.

Documentation generated by JSDoc 3.3.2 on Sun Sep 13 2015 20:13:31 GMT+0200 (CEST)