File hp/display/DisplayObject.lua

Functions

M:copyParams (params) Set the parameter setter function.
M:hitTestObject (prop, object) If the object will collide with the screen, it returns true.
TODO:If you are rotating, it will not work.
M:hitTestScreen (screenX, screenY, screenZ) If the object will collide with the screen, it returns true.
M:hitTestWorld (worldX, worldY, worldZ) If the object will collide with the world, it returns true.
M:init (...) The constructor.
M:new (...) Instance generating functions.
Unlike an ordinary class, and based on the MOAI_CLASS.
To inherit this function is not recommended.
M:setLayer (layer) Set the MOAILayer instance.

Tables

DisplayObject The base class for all display objects.


Functions

M:copyParams (params)
Set the parameter setter function.

Parameters

  • params: Parameter is set to Object.
    (params:left, top, layer)
M:hitTestObject (prop, object)
If the object will collide with the screen, it returns true.
TODO:If you are rotating, it will not work.

Parameters

  • prop:
  • object: MOAIProp object

Return value:

If the object is a true conflict
M:hitTestScreen (screenX, screenY, screenZ)
If the object will collide with the screen, it returns true.

Parameters

  • screenX: x of screen
  • screenY: y of screen
  • screenZ: (option)z of screen

Return value:

If the object is a true conflict
M:hitTestWorld (worldX, worldY, worldZ)
If the object will collide with the world, it returns true.

Parameters

  • worldX: world x of layer
  • worldY: world y of layer
  • worldZ: (option)world z of layer

Return value:

If the object is a true conflict
M:init (...)
The constructor.

Parameters

  • ...:
M:new (...)
Instance generating functions.
Unlike an ordinary class, and based on the MOAI_CLASS.
To inherit this function is not recommended.

Parameters

  • ...: params.

Return value:

instance.
M:setLayer (layer)
Set the MOAILayer instance.

Parameters

  • layer:

Tables

DisplayObject
The base class for all display objects.
To inherit MOAIPropUtil, you can use the convenience function.
To inherit EventDispatcher, you can use the event notification.

Use the MOAIProp class.
By changing the M.MOAI_CLASS, you can change to another class.
See MOAIProp.
Base Classes => EventDispatcher, MOAIPropUtil

Valid XHTML 1.0!