Class: DroptargetEntity

me. DroptargetEntity

new DroptargetEntity(x, y, settings)

Used to make a game entity a droptarget
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:
droptarget.js, line 17

Extends

Members

<static, constant> checkMethod :String

the checkmethod we want to use
Type:
  • String
Source:
droptarget.js, line 51

<static, constant> CHECKMETHOD_CONTAINS :String

constant for the contains method
Type:
  • String
Source:
droptarget.js, line 42

<static, constant> CHECKMETHOD_OVERLAP :String

constant for the overlaps method
Type:
  • String
Source:
droptarget.js, line 33

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> checkOnMe(draggableEntity)

Checks if a dropped entity is dropped on the current entity
Parameters:
Name Type Description
draggableEntity Object the draggable entity that is dropped
Source:
droptarget.js, line 80

<static> destroy()

Destructor
Source:
droptarget.js, line 103

<static> drop(draggableEntity)

Gets called when a draggable entity is dropped on the current entity
Parameters:
Name Type Description
draggableEntity Object the draggable entity that is dropped
Source:
droptarget.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:
droptarget.js, line 23

<static> setCheckMethod(checkMethod)

Sets the collision method which is going to be used to check a valid drop
Parameters:
Name Type Description
checkMethod Constant the checkmethod (defaults to CHECKMETHOD_OVERLAP)
Source:
droptarget.js, line 65
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-.