文件名称:宝石迷阵(android源码)
文件大小:4.64MB
文件格式:RAR
更新时间:2015-11-02 15:15:46
android 宝石迷阵 源码
android 游戏源码,宝石迷阵。 package wealk.android.jewels; import java.io.IOException; import java.util.ArrayList; import java.util.HashMap; import javax.microedition.khronos.opengles.GL10; import org.anddev.andengine.audio.sound.Sound; import org.anddev.andengine.audio.sound.SoundFactory; import org.anddev.andengine.engine.Engine; import org.anddev.andengine.engine.camera.Camera; import org.anddev.andengine.engine.handler.IUpdateHandler; import org.anddev.andengine.engine.handler.timer.ITimerCallback; import org.anddev.andengine.engine.handler.timer.TimerHandler; import org.anddev.andengine.engine.options.EngineOptions; import org.anddev.andengine.engine.options.EngineOptions.ScreenOrientation; import org.anddev.andengine.engine.options.resolutionpolicy.RatioResolutionPolicy; import org.anddev.andengine.entity.scene.Scene; import org.anddev.andengine.entity.scene.Scene.IOnSceneTouchListener; import org.anddev.andengine.entity.shape.modifier.AlphaModifier; import org.anddev.andengine.entity.shape.modifier.LoopShapeModifier; import org.anddev.andengine.entity.shape.modifier.RotationModifier; import org.anddev.andengine.entity.shape.modifier.ScaleModifier; import org.anddev.andengine.entity.shape.modifier.SequenceShapeModifier; import org.anddev.andengine.entity.sprite.Sprite; import org.anddev.andengine.entity.text.ChangeableText; import org.anddev.andengine.entity.text.Text; import org.anddev.andengine.input.touch.TouchEvent; import org.anddev.andengine.opengl.font.Font; import org.anddev.andengine.opengl.font.FontFactory; import org.anddev.andengine.opengl.texture.Texture; import org.anddev.andengine.opengl.texture.TextureOptions; import org.anddev.andengine.opengl.texture.region.TextureRegion; import org.anddev.andengine.opengl.texture.region.TextureRegionFactory; import org.anddev.andengine.ui.activity.BaseGameActivity; import org.anddev.andengine.util.Debug; import org.anddev.andengine.util.HorizontalAlign; import org.anddev.andengine.util.MathUtils; import wealk.android.jewels.constants.IConstants; import wealk.android.jewels.entity.BackgroundCell; import wealk.android.jewels.entity.BorderSprite; import wealk.android.jewels.entity.JewelSprite; import android.app.AlertDialog; import android.app.Dialog; import android.content.DialogInterface; import android.content.Intent; import android.graphics.Color; import android.graphics.Typeface; import android.os.Handler; import android.os.Message; import android.view.KeyEvent; import android.view.LayoutInflater; import android.view.MotionEvent; import android.view.View; import android.view.View.OnClickListener; import android.widget.EditText; import android.widget.Toast; /** * @author Qingfeng * @time 2010-11-03 ~ 2010 */ public class Jewels extends BaseGameActivity implements IOnSceneTouchListener, IConstants { // =========================================================== // Constants // =========================================================== /**灞忓箷灏哄**/ private static final int CAMERA_WIDTH = 320; private static final int CAMERA_HEIGHT = 480; /**鍦烘櫙鍒嗗眰**/ private static final int LAYER_BACKGROUND = 0; private static final int LAYER_BG_CELL = LAYER_BACKGROUND + 1; private static final int LAYER_JEWELS = LAYER_BG_CELL + 1; private static final int LAYER_SCORE = LAYER_JEWELS + 1; // =========================================================== // Fields // =========================================================== private Camera mCamera;//闀滃ご protected Scene mMainScene;//涓诲満鏅� /**娓告垙妯″紡**/ private String mGameModel; /**娓告垙鐘舵�**/ private boolean mGameRunning;//娓告垙鐨勬�寮�叧(鍙鐞嗘潵鐢点�浠诲姟鍒囨崲绛� private boolean mIsSwaping;//浜ゆ崲鐘舵� private final int MOVE_UP = 1;//涓婄Щ private final int MOVE_DOWN = 2;//涓嬬Щ private final int MOVE_LEFT = 3;//宸︾Щ private final int MOVE_RIGHT = 4;//鍙崇Щ private final int FALL = 5;//涓嬭惤 private final int DEAD = 6;//姝诲眬 private final int CHECK = 0;//鎵ц妫�祴 private int STATE = CHECK;//涓�紑濮嬪氨妫�祴锛屾病鏈夌Щ鍔ㄥ懡浠ょ