me.LevelEntity(x, y, settings)

new LevelEntity(x, y, settings)

Parameters:
Name Type Description
x Number

the x coordinates of the object

y Number

the y coordinates of the object

settings Object

See me.Entity

Properties
Name Type Attributes Description
duration String <optional>

Fade duration (in ms)

color String | me.Color <optional>

Fade color

to String <optional>

TMX level to load

container String | me.Container <optional>

Target container. See me.levelDirector.loadLevel

onLoaded function <optional>

Level loaded callback. See me.levelDirector.loadLevel

flatten Boolean <optional>

Flatten all objects into the target container. See me.levelDirector.loadLevel

setViewportBounds Boolean <optional>

Resize the viewport to match the level. See me.levelDirector.loadLevel

Example
me.game.world.addChild(new me.LevelEntity(
    x, y, {
        "duration" : 250,
        "color" : "#000",
        "to" : "mymap2"
    }
));

Extends

Members

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

protected, static goTo(levelopt)

go to the specified level

Parameters:
Name Type Attributes Default Description
level String <optional>
this.nextlevel

name of the level to load