Class: TMXTiledMap
- Module
- cocos.nodes
- Defined In
- nodes/TMXTiledMap.js
- Extends
- Node
Public Properties
| Property | Defined By | |
|---|---|---|
| Expand anchorPoint |
anchorPoint : geometry.Point
Anchor point for scaling and rotation. 0x0 is top left and 1x1 is bottom right
|
Node |
| Expand anchorPointInPixels |
anchorPointInPixels : geometry.Point
Anchor point for scaling and rotation in pixels from top left
|
Node |
| Expand boundingBox | boundingBox : geometry.Rect <read-only> | Node |
| Expand children |
children : cocos.nodes.Node[]
The child Nodes
|
Node |
| Expand contentSize |
contentSize : geometry.Size
Size of the node
|
Node |
| Expand id |
id : Integer
<read-only>
Unique ID for this object
|
BObject |
| Expand opacity |
opacity : Float
Opacity of the Node. 0 is totally transparent, 255 is totally opaque
|
Node |
| Expand parent |
parent : cocos.nodes.Node
Parent node
|
Node |
| Expand position |
position : geometry.Point
Position relative to parent node
|
Node |
| Expand rotation |
rotation : Float
Rotation angle in degrees
|
Node |
| Expand scale | scale : Float | Node |
| Expand scaleX |
scaleX : Float
X scale factor
|
Node |
| Expand scaleY |
scaleY : Float
Y scale factor
|
Node |
| Expand tag |
tag : *
Unique tag to identify the node
|
Node |
| Expand visible |
visible : boolean
Is the node visible
|
Node |
| Expand visibleRect |
visibleRect : geometry.Rect
<read-only>
The area of the node currently visible on screen. Returns an rect even
if visible is false.
|
Node |
| Expand worldBoundingBox | worldBoundingBox : geometry.Rect <read-only> | Node |
| Expand zOrder |
zOrder : Integer
Nodes Z index. i.e. draw order
|
Node |
Public Methods
| Method | Defined By | |
|---|---|---|
| Expand TMXTiledMap |
new
TMXTiledMap ()
:
cocos.nodes.TMXTiledMap
<constructor>
A TMX Map loaded from a .tmx file
Named Arguments
Returns
|
TMXTiledMap |
| Expand addChild |
addChild ()
:
cocos.nodes.Node
Add a child Node
Named Arguments
Returns
|
Node |
| Expand bindTo |
bindTo (key:String,target:BOject,[targetKey:String],[noNotify:Boolean])
:
void
Bind the value of a property on this object to that of another object so
they always have the same value. Setting the value on either object will update
the other too.
Arguments
Returns
|
BObject |
| Expand changed |
changed (key:*)
:
void
Arguments
Returns
|
BObject |
| Expand cleanup |
cleanup ()
:
void
Returns
|
Node |
| Expand convertToNodeSpace |
convertToNodeSpace (worldPoint:*)
:
void
Arguments
Returns
|
Node |
| Expand detatchChild |
detatchChild (opts:*)
:
void
Arguments
Returns
|
Node |
| Expand draw |
draw (context:CanvasRenderingContext2D/WebGLRenderingContext,rect:geometry.Rect)
:
void
Draws the node. Override to do custom drawing. If it's less efficient to
draw only the area inside the rect then don't bother. The result will be
clipped to that area anyway.
Arguments
Returns
|
Node |
| Expand get |
get (key:String)
:
*
Get a property from the object. Always use this instead of trying to
access the property directly. This will ensure all bindings, setters and
getters work correctly.
Arguments
Returns
|
BObject |
| Expand getAction |
getAction (opts:*)
:
void
Arguments
Returns
|
Node |
| Expand getChild |
getChild (opts:*)
:
void
Arguments
Returns
|
Node |
| Expand getLayer |
getLayer ()
:
cocos.nodes.TMXLayer
Get a layer
Named Arguments
Returns
|
TMXTiledMap |
| Expand getObjectGroup |
getObjectGroup ()
:
cocos.TMXObjectGroup
Return the ObjectGroup for the secific group
Named Arguments
Returns
|
TMXTiledMap |
| Expand nodeToParentTransform |
nodeToParentTransform ()
:
void
Returns
|
Node |
| Expand nodeToWorldTransform |
nodeToWorldTransform ()
:
void
Returns
|
Node |
| Expand objectGroupNamed |
objectGroupNamed (opts:*)
:
void
Arguments
Returns
|
TMXTiledMap |
| Expand parentToNodeTransform |
parentToNodeTransform ()
:
void
Returns
|
Node |
| Expand parseLayer |
parseLayer (opts:*)
:
void
Arguments
Returns
|
TMXTiledMap |
| Expand pauseSchedulerAndActions |
pauseSchedulerAndActions ()
:
void
Returns
|
Node |
| Expand removeChild |
removeChild (opts:*)
:
void
Arguments
Returns
|
Node |
| Expand removeChildren |
removeChildren (opts:*)
:
void
Arguments
Returns
|
Node |
| Expand reorderChild |
reorderChild (opts:*)
:
void
Arguments
Returns
|
Node |
| Expand resumeSchedulerAndActions |
resumeSchedulerAndActions ()
:
void
Returns
|
Node |
| Expand runAction |
runAction (action:*)
:
void
Arguments
Returns
|
Node |
| Expand schedule |
schedule ()
:
void
Schedules a custom method with an interval time in seconds. If time is 0 it will be ticked every frame.
If time is 0, it is recommended to use 'scheduleUpdate' instead.
If the method is already scheduled, then the interval parameter will
be updated without scheduling it again.
Named Arguments
Returns
|
Node |
| Expand scheduleUpdate |
scheduleUpdate (opts:*)
:
void
Arguments
Returns
|
Node |
| Expand set |
set (key:String,value:*)
:
void
Set a property on the object. Always use this instead of trying to
access the property directly. This will ensure all bindings, setters and
getters work correctly.
Arguments
Returns
|
BObject |
| Expand setValues |
setValues (kvp:Object)
:
void
Set multiple propertys in one go
Arguments
Returns
|
BObject |
| Expand stopAllActions |
stopAllActions ()
:
void
Returns
|
Node |
| Expand tilesetForLayer |
tilesetForLayer (opts:*)
:
void
Arguments
Returns
|
TMXTiledMap |
| Expand transform |
transform (context:*)
:
void
Arguments
Returns
|
Node |
| Expand unbind |
unbind (key:String)
:
void
Remove binding from a property which set setup using BObject#bindTo.
Arguments
Returns
|
BObject |
| Expand unbindAll |
unbindAll ()
:
void
Remove all bindings on this object
Returns
|
BObject |
| Expand unschedule |
unschedule (method:String/Function)
:
void
Unschedules a custom method
Arguments
Returns
|
Node |
| Expand unscheduleAllSelectors |
unscheduleAllSelectors ()
:
void
Returns
|
Node |
| Expand unscheduleSelector |
unscheduleSelector (selector:*)
:
void
Arguments
Returns
|
Node |
| Expand visit |
visit (context:*,rect:*)
:
void
Arguments
Returns
|
Node |
| Expand worldToNodeTransform |
worldToNodeTransform ()
:
void
Returns
|
Node |
Public Events
| Event | Defined By | |
|---|---|---|
| Expand onEnter |
onEnter ()
:
void
Triggered when the node is added to a scene
Returns
|
Node |
| Expand onExit |
onExit ()
:
void
Triggered when the node is removed from a scene
Returns
|
Node |
Private Members
This class has no private members.