package com.bn.gameView;
import static com.bn.gameView.Constant.*;
import java.util.ArrayList;
import java.util.Collections;
import javax.microedition.khronos.egl.EGLConfig;
import javax.microedition.khronos.opengles.GL10;
import android.content.Context;
import android.opengl.GLES20;
import android.opengl.GLSurfaceView;
import android.opengl.Matrix;
import android.view.MotionEvent;
import android.widget.Toast;
import com.bn.archieModel.ArchieForControl;
import com.bn.archieModel.BarbetteForDraw;
import com.bn.archieModel.BarrelForDraw;
import com.bn.arsenal.Arsenal_House;
import com.bn.arsenal.House;
import com.bn.arsenal.PlaneHouse;
import com.bn.commonObject.BallTextureByVertex;
import com.bn.commonObject.CubeForDraw;
import com.bn.commonObject.DamForDraw;
import com.bn.commonObject.DrawBomb;
import com.bn.commonObject.LandForm;
import com.bn.commonObject.Light_Tower;
import com.bn.commonObject.NumberForDraw;
import com.bn.commonObject.SkyBall;
import com.bn.commonObject.SkyNight;
import com.bn.commonObject.TextureRect;
import com.bn.commonObject.Tree;
import com.bn.core.MatrixState;
import com.bn.core.SQLiteUtil;
import com.bn.core.ShaderManager;
import com.bn.menu.Aircraft_Activity;
import com.bn.menu.MissileMenuForDraw;
import com.bn.menu.R;
import com.bn.planeModel.EnemyPlane;
import com.bn.planeModel.Plane;
import com.bn.tankemodel.MoXingJiaZai;
import com.bn.tankemodel.Model;
import com.bn.tankemodel.TanKe;
public class GLGameView extends GLSurfaceView
{
public Aircraft_Activity activity;//主Activity引用
private final float TOUCH_SCALE_FACTOR = 180.0f/480;//角度缩放比例
private SceneRenderer mRenderer;//场景渲染器
private int load_step=0;//加载资源的步数
private boolean isLoadedOk=false;//是否加载完成的标志位
private float mPreviousY;//上次的触控位置Y坐标
//摄像机的相关参数 供其他地方调用
public static float cx;
public static float cy;
public static float cz;
public static float tx;
public static float ty;
public static float tz;
public static float upX=0;
public static float upY=1;
public static float upZ=0;
//--------当然帧的数值
float curr_cx;
float curr_cy;
float curr_cz;
float curr_tx;
float curr_ty;
float curr_tz;
float curr_upx;
float curr_upy;
float curr_upz;
float curr_PlaneX;
float curr_PlaneZ;
float curr_PlaneY;
float curr_rot_Plane_X;
float curr_rot_Plane_Y;
float curr_rot_Plane_Z;
public KeyThread kThread;
public static boolean isVideoPlaying=true;//是否在播放界面或者暂停界面,true为播放状态
//透视投影的缩放比
public float ratio;
//--------3D物件------------------------------
TextureRect loadingView;//3D中的加载界面
TextureRect processBar;//加载界面中的进度条
LandForm terrain[]=new LandForm[LANDS_SIZE];//创建陆地 0 表示yz方向上倾斜,1表示拐角位置,等高线向里凹
TextureRect terrain_plain;//创建平面地图 平行于XY平面的
TextureRect water;//水面
//----------------------------------
TextureRect fireButton;//开火按钮
TextureRect radar_bg;//雷达背景
TextureRect radar_plane;//雷达的指针飞机
TextureRect weapon_button;//武器选择按钮
NumberForDraw weapon_number;//用于标识子弹和炮弹的数量
TextureRect up_button;//向上按钮
TextureRect down_button;//向下选择按钮
NumberForDraw numberRect;//数字
TextureRect leftTimeRect;//剩余时间
TextureRect backgroundRect_blood;//显示血背景矩形
TextureRect plane_Hit;//飞机被击中表示矩形
DamForDraw dam;//大坝
public static TextureRect bombRect;//爆炸矩形
public static TextureRect bombRectr;//爆炸矩形
public static float bomb_width=40;
public static float bomb_height=50;//爆炸纹理矩形的大小
SkyBall skyBall;//天空球白天
SkyBall skyBallsmall;//九宫格笼罩的天空
SkyNight skynight;//晚上的天空
SkyNight skynightBig;//大一点的星星
public Plane plane;//飞机
BallTextureByVertex bullet_ball;//子弹纹理球
public TextureRect bullet_rect;//子弹纹理矩形
//创建高射炮组件
BarrelForDraw barrel;
BarbetteForDraw barbette;
CubeForDraw cube;
ArchieForControl archie;//高射炮
public Model tanke_body;//坦克身体
public Model tanke_gun;//坦克炮管
public static ArrayList<TanKe> tankeList=new ArrayList<TanKe>();
public static ArrayList<DrawBomb> baoZhaList=new ArrayList<DrawBomb>();//坦克爆炸绘制列表
public ArrayList<DrawBomb> copybaozhaList=new ArrayList<DrawBomb>();//坦克爆炸绘制列表
public static ArrayList<EnemyPlane> enemy=new ArrayList<EnemyPlane>();
Light_Tower lighttower;//灯塔
public static ArrayList<BombForControl> cop_archie_bomb_List=new ArrayList<BombForControl>();//高射炮炮弹的列表
public static ArrayList<BombForControl> cop_bomb_List=new ArrayList<BombForControl>();//发射出去的子弹列表
public static ArrayList<ArchieForControl> cop_archie_List=new ArrayList<ArchieForControl>();//高射炮的列表
public static ArrayList<BulletForControl> cop_bullet_List=new ArrayList<BulletForControl>();//发射出去的子弹列表
public static ArrayList<BombForControl> copy_tank_bomb_List=new ArrayList<BombForControl>();//发射出去的坦克炮弹列表
public static ArrayList<Tree> treeList=new ArrayList<Tree>();//地形上的树
House house;//军火库模型
public static ArrayList<Arsenal_House> arsenal=new ArrayList<Arsenal_House>();//军火库
public ArrayList<PlaneHouse> houseplane=new ArrayList<PlaneHouse>();
public CubeForDraw housePlane;//平房
public Light_Tower chimney;//烟囱
//菜单,视频播放界面等纹理
TextureRect menu_Rect;//飞机爆炸后的菜单显示矩形
TextureRect menu_video;//视频播放界面的各个按钮矩形
TextureRect mark_placeRect;//标志其位置的在仪表盘上的。
public TextureRect mark_lock;//标记被锁定的矩形
public TextureRect treeRect;
public TextureRect mark_aim;//目标标记框
public TextureRect noticeRect;//战争说明文字
public float initNoticeHeight=-0.8f;//初始提示文字的高度
//------游戏相关纹理ID---------------------------------------------------
//---------游戏开始前的说明文字
private int tex_noticeId[]=new int[6];
private int tex_actionWinId;//特殊行动成功对话框
private int tex_actionFailId;//失败对话框
private int tex_numberRectId;//数字纹理
private int tex_backgroundRectId;//血背景图片
private int tex_lefttimeId;//剩余时间纹理
private int tex_lighttowerid;
private int tex_lightid;//灯柱子纹理
private int tex_loadingviewId;//加载界面的ID
private int tex_processId;//进度条
private int tex_terrain_tuceng_Id;//地形纹理 ----土层
private int tex_terrain_caodiId;//地形纹理-----草地
private int tex_terrain_shitouId;//地形纹理------石头
private int tex_terrain_shandingId;//地形纹理------石头
private int tex_fireButtonId;//开火按钮的纹理
private int tex_skyBallId;//天空球纹理
private int tex_nightId;//晚上天空纹理
private int tex_waterId;//水面纹理
private int tex_bulletId;//子弹纹理
private int tex_radar_bg_Id;//雷达背景纹理
private int tex_radar_plane_Id;//雷达的飞机指针
private int tex_button_weaponId[]=new int[2];//武器按钮图标
private int tex_button_upId;//向上按钮纹理
private int tex_button_downId;//向下按钮纹理
private int tex_tankeid;//坦克ID
private int tex_roofId;//屋顶
private int tex_frontId;//房屋侧面纹理
private int tex_AnnulusId;//围绕房屋转的圆环纹理
private int tex_damId;//大坝的纹理
private int tex_chimneyId;//烟囱纹理id
private int tex_housePlaneId[]=new int[2];//平房的纹理Id
private int tex_housePlaneSmallId[]=new int[2];//小平房纹理
public int treeTexId;//树纹理
public int treeTexId_2;//第二种树
public static int baoZhaXiaoguo2;//爆炸效果2
public static int baoZhaXiaoguo;//爆炸效果纹理
public static int baoZhaTexId[];//爆炸纹理数组
没有合适的资源?快使用搜索试试~ 我知道了~
Android3D游戏开发技术宝典-OpengGL ES2.0 吴亚峰著17-22
共1520个文件
class:493个
java:316个
png:296个
4星 · 超过85%的资源 需积分: 10 7 下载量 59 浏览量
2013-10-09
11:25:38
上传
评论
收藏 48.69MB RAR 举报
温馨提示
(源代码)Android3D游戏开发技术宝典-OpengGL 17-22
资源推荐
资源详情
资源评论
收起资源包目录
Android3D游戏开发技术宝典-OpengGL ES2.0 吴亚峰著17-22 (1520个子文件)
logo.3gp 265KB
resources.ap_ 6.03MB
resources.ap_ 3.79MB
resources.ap_ 2.37MB
resources.ap_ 196KB
resources.ap_ 192KB
resources.ap_ 192KB
resources.ap_ 184KB
resources.ap_ 140KB
resources.ap_ 108KB
resources.ap_ 99KB
resources.ap_ 51KB
resources.ap_ 43KB
resources.ap_ 33KB
resources.ap_ 20KB
resources.ap_ 11KB
resources.ap_ 11KB
resources.ap_ 10KB
resources.ap_ 10KB
resources.ap_ 10KB
AircraftAttack.apk 6.13MB
BNST.apk 3.91MB
BasketBall_Shot.apk 2.72MB
Sample17_4.apk 526KB
Sample17_2.apk 522KB
Sample17_3.apk 521KB
Sample17_1.apk 511KB
Sample17_7.apk 437KB
Sample17_5.apk 434KB
Sample17_6.apk 381KB
Sample19_3.apk 153KB
Sample18_6.apk 61KB
Sample19_1.apk 49KB
Sample19_2.apk 32KB
Sample18_1.apk 15KB
Sample18_2.apk 15KB
Sample18_3.apk 15KB
Sample18_5.apk 14KB
Sample18_4.apk 14KB
proguard.cfg 1KB
proguard.cfg 1KB
proguard.cfg 1KB
proguard.cfg 1KB
proguard.cfg 1KB
proguard.cfg 1KB
proguard.cfg 1KB
GLGameView.class 45KB
Constant.class 41KB
GLGameView$SceneRenderer.class 30KB
TreeData.class 22KB
MyGLSurfaceView$SceneRenderer.class 20KB
KeyThread.class 19KB
Constant.class 19KB
KZBJData.class 16KB
GLGameView.class 16KB
MyGLSurfaceView.class 15KB
TDObjectData.class 15KB
MyActivity.class 14KB
Dock$DockIn.class 11KB
MySurfaceView.class 11KB
KeyThread.class 11KB
MySurfaceView.class 10KB
GLGameView$SceneRenderer.class 10KB
XCSurfaceView.class 9KB
JiLuView.class 9KB
Aircraft_Activity.class 9KB
Doll.class 9KB
BombForControl.class 9KB
KEatData.class 9KB
LoadedObjectVertexNormal.class 8KB
RaceTrack.class 8KB
Bridge$Bridge_In.class 8KB
BulletForControl.class 8KB
Plane_Wing.class 8KB
BasketBall_Shot_Activity.class 8KB
XCSurfaceView$SceneRenderer.class 8KB
Constant.class 8KB
LoadUtil.class 7KB
Stick.class 7KB
LandForm.class 7KB
ArchieForControl.class 7KB
MySurfaceView.class 7KB
Ball.class 7KB
HelpSurfaceView.class 7KB
MySurfaceView.class 7KB
MenuView.class 7KB
MySurfaceView.class 7KB
EnemyPlane.class 6KB
DrawTime.class 6KB
LandForm.class 6KB
MySurfaceView.class 6KB
LoadUtil.class 6KB
TanKe.class 6KB
B_YZ$X_BYZ.class 6KB
MySurfaceView.class 6KB
MoXingJiaZai.class 6KB
SkyBall.class 6KB
MoXingJiaZai.class 6KB
SoundSurfaceView.class 6KB
BasketBallTextureByVertex.class 6KB
共 1520 条
- 1
- 2
- 3
- 4
- 5
- 6
- 16
资源评论
- srlm2014-04-19非常好,多谢分享!
liuhailove
- 粉丝: 0
- 资源: 11
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- 实验项目一:线性表(模板 ).docx
- 基于LM317A设计交流220V输入可调5V-12V直流输出稳压电源电路multisim10仿真源文件.zip
- Screenshot_2024-04-25-17-04-18-55_2332cb9b27b851b548ba47a91682926c.jpg
- -基于AVR单片机的LNG加液机控制器设计.pdf
- ThePowerOfNow-EckhartTolle.mobi
- BLOCK_TYPE_HEARTBEAT_D70A3465D4EE4E9_046141_dump_1st.dmp
- 项目方法测试调用接口工具
- studyupdate
- 基于西瓜数据集的决策树实现.zip
- 60套HTML网站源码-响应式-涵盖(简历&作品展示&商业&科技&培训&商城&课设等)-适配移动设备-解压即用.zip
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功