Description

Move the position of the entity and the element. Returns object {x: , y: }

Usage

Parameters

  • x {Integer}

    Add position X

  • y {Integer} optional

    (optional) add position Y

Returns

Object

Example

In ready method

 var entity = Class.New("Entity", [stage]);
 entity.move(10, null); // Current position X + 10
 entity.move(null, 10); // Current position Y + 10

Discussion