me.DroptargetEntity(x, y, settings)

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)

Extends

Members

static, constant checkMethod :String

the checkmethod we want to use

static, constant CHECKMETHOD_CONTAINS :String

constant for the contains method

static, constant CHECKMETHOD_OVERLAP :String

constant for the overlaps method

alpha :Number

Define the renderable opacity
Set to zero if you do not wish an object to be drawn

Inherited From:
Default Value:
  • 1.0
See:
  • me.Renderable#setOpacity
  • me.Renderable#getOpacity

ancestor :me.Container|me.Entity

a reference to the parent object that contains this renderable

Inherited From:
Default Value:
  • undefined

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

static destroy()

Destructor

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

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

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)