Class: LevelEntity

me. LevelEntity

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 Argument 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
Source:
level_entity.js, line 34
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
Type:
  • Number
Inherited From:
Default Value:
  • 1.0
Source:
renderable.js, line 151
See:
  • me.Renderable#setOpacity
  • me.Renderable#getOpacity

ancestor :me.Container

a reference to the Container object that contains this renderable, or undefined if it has not been added to one.
Type:
Inherited From:
Default Value:
  • undefined
Source:
renderable.js, line 163

Methods

<protected, static> goTo(level)

go to the specified level
Parameters:
Name Type Argument Default Description
level String <optional>
this.nextlevel name of the level to load
Source:
level_entity.js, line 83
Copyright © 2011 - 2017, Olivier Biot, Jason Oster, Aaron McLeod
Documentation generated by JSDoc 3.4.0 on 2017-02-28T11:37:40+08:00 using the DocStrap template modified by codename-.