Andengine examples show error doesn't work


I am very new to andengine trying to use these andengine examples from git url: https://github.com/nicolasgramlich/AndEngineExamples
But he always shows me a mistake in two classes

BoundCameraExample and in HullAlgorithmExample

In the line of the associated camera example, an error in line 220 says:

Type mismatch: cannot convert from void to AnimatedSprite

final AnimatedSprite face = new AnimatedSprite(pX, pY, this.mBoxFaceTextureRegion, this.getVertexBufferObjectManager()).animate(100); 

and in the HullAlgorithmExample error lies in the DrawMode import statement
the error appears on line number 11: import org.andengine.entity.primitive.vbo.DrawMode;
and on lines 168, 175 says that DrawMode cannot be resolved by a variable

I use the java compiler 1.6 for all extensions I downloaded andengine and extensions from the same git repository. What's up with this please help me

Thanks allll

+7
source share
2 answers

In the BoundCameraExample example, try

 final AnimatedSprite face = new AnimatedSprite(pX, pY, this.mBoxFaceTextureRegion, this.getVertexBufferObjectManager()); face.animate(100); 

instead

 final AnimatedSprite face = new AnimatedSprite(pX, pY, this.mBoxFaceTextureRegion, this.getVertexBufferObjectManager()).animate(100); 

In a HullAlgorithExample, import

 import org.andengine.entity.primitive.DrawMode; 

instead

 import org.andengine.entity.primitive.vbo.DrawMode; 
+32
source

In 2014, @ swati-rawat's answer is still sophisticated. I found two more questions, I will report a solution here, since this question is well rated:

in SplitScreenExample , as in BoundCameraExample, replace with:

 final AnimatedSprite face = new AnimatedSprite(pX, pY, this.mBoxFaceTextureRegion, this.getVertexBufferObjectManager()); face.animate(100); 

in TextBreakExample replace with:

 this.mText = new Text(50, 40, this.mFont, "", 1000, new TextOptions(AutoWrap.LETTERS, AUTOWRAP_WIDTH, HorizontalAlign.CENTER, Text.LEADING_DEFAULT), vertexBufferObjectManager); 
+11
source

All Articles