Using java Syntax Highlighting
- public Engine onLoadEngine() {
- this.mCamera = new Camera(0, 0, CAMERA_WIDTH, CAMERA_HEIGHT);
- final Engine engine=new Engine(new EngineOptions(true, ScreenOrientation.LANDSCAPE, new RatioResolutionPolicy(CAMERA_WIDTH, CAMERA_HEIGHT), this.mCamera));
- try {
- if(MultiTouch.isSupported(this)) {
- engine.setTouchController(new MultiTouchController());
- if(MultiTouch.isSupportedDistinct(this)) {
- Toast.makeText(this, "MultiTouch detected --> Drag multiple Sprites with multiple fingers!", Toast.LENGTH_LONG).show();
- } else {
- Toast.makeText(this, "MultiTouch detected --> Drag multiple Sprites with multiple fingers!\n\n(Your device might have problems to distinguish between separate fingers.)", Toast.LENGTH_LONG).show();
- }
- } else {
- Toast.makeText(this, "Sorry your device does NOT support MultiTouch!\n\n(Falling back to SingleTouch.)", Toast.LENGTH_LONG).show();
- }
- } catch (final MultiTouchException e) {
- Toast.makeText(this, "Sorry your Android Version does NOT support MultiTouch!\n\n(Falling back to SingleTouch.)", Toast.LENGTH_LONG).show();
- }
- return engine;
- }
Parsed in 0.035 seconds, using GeSHi 1.0.8.4
The problem is that i have an error with the method setTouchController, that's it:
The method setTouchController(ITouchController) in the type Engine is not applicable for the arguments (MultiTouchController)
Eclipse propose me to cast the new multitouchcontroller but we know it's not the solution
Thank you for your help, lucas!

