API Document Index



Class me.InvisibleEntity


Extends me.Rect.

Defined in: <build/melonJS-0.9.3.js>.

Class Summary
Constructor Attributes Constructor Name and Description
 
me.InvisibleEntity(x, y, settings)
Fields borrowed from class me.Rect:
bottom, height, left, pos, right, top, width
Method Summary
Method Attributes Method Name and Description
 
onCollision(res, obj)
onCollision Event function
called by the game manager when the object collide with shtg
by default, if the object type is Collectable, the destroy function is called
 
OnDestroy Notification function
Called by engine before deleting the object
 
updateColRect(x, w, y, h)
specify the size of the hit box for collision detection
(allow to have a specific size for each object)
e.g.
Methods borrowed from class me.Rect:
contains, containsPoint, getRect, overlaps, set, union, within
Class Detail
me.InvisibleEntity(x, y, settings)
Parameters:
{int} x
the x coordinates of the object
{int} y
the y coordinates of the object
{me.ObjectSettings} settings
object settings
Method Detail
onCollision(res, obj)
onCollision Event function
called by the game manager when the object collide with shtg
by default, if the object type is Collectable, the destroy function is called
Parameters:
{me.Vector2d} res
collision vector
{me.ObjectEntity} obj
the other object that hit this object

onDestroyEvent()
OnDestroy Notification function
Called by engine before deleting the object

updateColRect(x, w, y, h)
specify the size of the hit box for collision detection
(allow to have a specific size for each object)
e.g. : object with resized collision box :
Parameters:
{int} x
x offset (specify -1 to not change the width)
{int} w
width of the hit box
{int} y
y offset (specify -1 to not change the height)
{int} h
height of the hit box

Documentation generated by JsDoc Toolkit 2.4.0 on Tue May 01 2012 12:00:49 GMT+0800 (CST)