Android Open Source - Replica-Jump Custom Camera






From Project

Back to project page Replica-Jump.

License

The source code is released under:

GNU General Public License

If you think the Android project Replica-Jump listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package com.vinicius.dsl.replicajump;
/*  ww  w .  j a  va  2 s. com*/
import org.andengine.engine.camera.BoundCamera;
import org.andengine.util.Constants;

import com.vinicius.dsl.replicajump.manager.GameManager;
import com.vinicius.dsl.replicajump.manager.SceneManager;

public class CustomCamera extends BoundCamera{

  public CustomCamera(float pX, float pY, float pWidth, float pHeight) {
    super(pX, pY, pWidth, pHeight);
    // TODO Auto-generated constructor stub
  }
  
  @Override
  public void updateChaseEntity() {
    // TODO Auto-generated method stub
    if (GameManager.getInstance().player != null && SceneManager.getInstance().actual_scene == com.vinicius.dsl.replicajump.util.Constants.SCENE_LEVEL) {
      final float[] centerCoordinates = GameManager.getInstance().player.getSceneCenterCoordinates();
      this.setCenter(centerCoordinates[Constants.VERTEX_INDEX_X]+200, centerCoordinates[Constants.VERTEX_INDEX_Y]);
    }
  }
  

}




Java Source Code List

com.vinicius.dsl.replicajump.CustomCamera.java
com.vinicius.dsl.replicajump.ReplicaJumpActivity.java
com.vinicius.dsl.replicajump.level.Level1.java
com.vinicius.dsl.replicajump.level.LevelObject.java
com.vinicius.dsl.replicajump.manager.GameManager.java
com.vinicius.dsl.replicajump.manager.ResourceManager.java
com.vinicius.dsl.replicajump.manager.SceneManager.java
com.vinicius.dsl.replicajump.scene.LevelScene.java
com.vinicius.dsl.replicajump.scene.MainMenuScene.java
com.vinicius.dsl.replicajump.sprite.AndroidSprite.java
com.vinicius.dsl.replicajump.sprite.CoinGreen.java
com.vinicius.dsl.replicajump.sprite.CoinYellow.java
com.vinicius.dsl.replicajump.sprite.Enemy1.java
com.vinicius.dsl.replicajump.sprite.Enemy2.java
com.vinicius.dsl.replicajump.sprite.Enemy3.java
com.vinicius.dsl.replicajump.sprite.EnemyLarge.java
com.vinicius.dsl.replicajump.util.BasicScene.java
com.vinicius.dsl.replicajump.util.Constants.java
com.vinicius.dsl.replicajump.util.Preferences.java