Class: DraggableEntity

me. DraggableEntity

new DraggableEntity(x, y, settings)

Used to make a game entity draggable
Parameters:
Name Type Description
x Number the x coordinates of the entity object
y Number the y coordinates of the entity object
settings Object Entity properties (see me.Entity)
Source:
draggable.js, line 17

Extends

Members

alpha :Number

Define the renderable opacity
Set to zero if you do not wish an object to be drawn
Type:
  • Number
Inherited From:
Default Value:
  • 1.0
Source:
renderable.js, line 151
See:
  • me.Renderable#setOpacity
  • me.Renderable#getOpacity

ancestor :me.Container

a reference to the Container object that contains this renderable, or undefined if it has not been added to one.
Type:
Inherited From:
Default Value:
  • undefined
Source:
renderable.js, line 163

Methods

<static> destroy()

Destructor
Source:
draggable.js, line 142

<static> dragEnd(x)

Gets called when the user stops dragging the entity
Parameters:
Name Type Description
x Object the pointer event
Source:
draggable.js, line 127

<static> dragMove(x)

Gets called when the user drags this entity around
Parameters:
Name Type Description
x Object the pointer event
Source:
draggable.js, line 111

<static> dragStart(x)

Gets called when the user starts dragging the entity
Parameters:
Name Type Description
x Object the pointer event
Source:
draggable.js, line 94

<static> init(x, y, settings)

Constructor
Parameters:
Name Type Description
x Number the x postion of the entity
y Number the y postion of the entity
settings Object the additional entity settings
Source:
draggable.js, line 23

<static> initEvents()

Initializes the events the modules needs to listen to It translates the pointer events to me.events in order to make them pass through the system and to make this module testable. Then we subscribe this module to the transformed events.
Source:
draggable.js, line 42

<static> translatePointerEvent(e, translation)

Translates a pointer event to a me.event
Parameters:
Name Type Description
e Object the pointer event you want to translate
translation String the me.event you want to translate the event to
Source:
draggable.js, line 81
Copyright © 2011 - 2017, Olivier Biot, Jason Oster, Aaron McLeod
Documentation generated by JSDoc 3.4.0 on 2017-02-28T11:37:40+08:00 using the DocStrap template modified by codename-.