Deprecated methods

Problem

When AndEngine is imported from a .jar-file, some methods, such as Scene.getTopLayer(), are deprecated. This makes some examples unable to compile.

Solution

Two solutions are available. The easiest is to find alternative methods that aren't depricated. In the case of adding Entities to a Scene, instead of using

scene.getTopLayer().addEntity(whatever);

use

scene.attachChild(whatever);

The second option is to get a newer version of AndEngine through Mercurial or wait for a new .jar-file.

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License