21

所属分类:android开发
开发工具:Java
文件大小:6299KB
下载次数:20
上传日期:2012-07-31 19:28:40
上 传 者acmilanwangchao123
说明:  Iron Sight IronSight是一款超酷的科幻射击游戏,由Polarbit制作,全3D的场景与机械单位,第一人称视角以及真实的物理效果,属于绝对必玩的Android大作。 3D桌球 Pool ...
(Iron Sight IronSight is a cool sci-fi shooter from Polarbit production, the full 3D scenes and mechanical units, the first person perspective and real physical effect, belong to the absolutely must play the Android masterpiece. 3D Snooker Pool ...)

文件列表:
第21章\Sample21_1\.classpath (280, 2010-08-08)
第21章\Sample21_1\.project (846, 2010-10-17)
第21章\Sample21_1\AndroidManifest.xml (764, 2010-10-15)
第21章\Sample21_1\bin\classes.dex (87108, 2010-10-17)
第21章\Sample21_1\bin\resources.ap_ (2068173, 2010-10-17)
第21章\Sample21_1\bin\Sample21_1.apk (2109868, 2010-10-17)
第21章\Sample21_1\bin\wyf\jsl\lb\Activity_GL_Demo$1$1.class (1017, 2010-10-17)
第21章\Sample21_1\bin\wyf\jsl\lb\Activity_GL_Demo$1$2.class (2073, 2010-10-17)
第21章\Sample21_1\bin\wyf\jsl\lb\Activity_GL_Demo$1.class (2448, 2010-10-17)
第21章\Sample21_1\bin\wyf\jsl\lb\Activity_GL_Demo.class (3973, 2010-10-17)
第21章\Sample21_1\bin\wyf\jsl\lb\CollectionUtil.class (3119, 2010-10-17)
第21章\Sample21_1\bin\wyf\jsl\lb\Constant.class (5841, 2010-10-17)
第21章\Sample21_1\bin\wyf\jsl\lb\DrawBall.class (4534, 2010-10-17)
第21章\Sample21_1\bin\wyf\jsl\lb\DrawCelestial.class (2589, 2010-10-17)
第21章\Sample21_1\bin\wyf\jsl\lb\DrawCircle.class (3256, 2010-10-17)
第21章\Sample21_1\bin\wyf\jsl\lb\DrawCube.class (3354, 2010-10-17)
第21章\Sample21_1\bin\wyf\jsl\lb\DrawCylinder.class (3784, 2010-10-17)
第21章\Sample21_1\bin\wyf\jsl\lb\DrawLandForm.class (2894, 2010-10-17)
第21章\Sample21_1\bin\wyf\jsl\lb\DrawLightBall.class (4338, 2010-10-17)
第21章\Sample21_1\bin\wyf\jsl\lb\DrawLightCylinder.class (4136, 2010-10-17)
第21章\Sample21_1\bin\wyf\jsl\lb\DrawPanel.class (1962, 2010-10-17)
第21章\Sample21_1\bin\wyf\jsl\lb\DrawTaper.class (4396, 2010-10-17)
第21章\Sample21_1\bin\wyf\jsl\lb\DrawTextureRect.class (2048, 2010-10-17)
第21章\Sample21_1\bin\wyf\jsl\lb\DrawWater.class (3074, 2010-10-17)
第21章\Sample21_1\bin\wyf\jsl\lb\GLGameView$SceneRenderer$1.class (1046, 2010-10-17)
第21章\Sample21_1\bin\wyf\jsl\lb\GLGameView$SceneRenderer.class (9303, 2010-10-17)
第21章\Sample21_1\bin\wyf\jsl\lb\GLGameView.class (7052, 2010-10-17)
第21章\Sample21_1\bin\wyf\jsl\lb\LogicalBullet.class (5240, 2010-10-17)
第21章\Sample21_1\bin\wyf\jsl\lb\LogicalLandTank.class (2912, 2010-10-17)
第21章\Sample21_1\bin\wyf\jsl\lb\LogicalWaterTank.class (2871, 2010-10-17)
第21章\Sample21_1\bin\wyf\jsl\lb\PackageCannon.class (4791, 2010-10-17)
第21章\Sample21_1\bin\wyf\jsl\lb\PackageCannonEmplacement.class (1712, 2010-10-17)
第21章\Sample21_1\bin\wyf\jsl\lb\PackageLandTank.class (2260, 2010-10-17)
第21章\Sample21_1\bin\wyf\jsl\lb\PackageLandTankWheel.class (1779, 2010-10-17)
第21章\Sample21_1\bin\wyf\jsl\lb\PackageLighthouse.class (2902, 2010-10-17)
第21章\Sample21_1\bin\wyf\jsl\lb\PackageWaterTank.class (2101, 2010-10-17)
第21章\Sample21_1\bin\wyf\jsl\lb\PackageWaterTankBody.class (3555, 2010-10-17)
第21章\Sample21_1\bin\wyf\jsl\lb\R$attr.class (316, 2010-10-17)
第21章\Sample21_1\bin\wyf\jsl\lb\R$drawable.class (1613, 2010-10-17)
第21章\Sample21_1\bin\wyf\jsl\lb\R$id.class (572, 2010-10-17)
... ...

package wyf.jsl.lb; import static wyf.jsl.lb.Constant.*; public class ThreadMenu extends Thread { SurfaceViewMenu mv; int afterCurrentIndex;//动画播放完后的当前菜单图片数组索引 public ThreadMenu(SurfaceViewMenu mv,int afterCurrentIndex) { this.mv=mv; this.afterCurrentIndex=afterCurrentIndex; } @Override public void run() { for(int i=0;i<=TOTAL_STEPS;i++)//循环指定的步数完成动画 { mv.changePercent=PERCENT_STEP*i;//计算此步的占动画的百分比 mv.initMenu();//初始化各个位置的值 if(mv.anmiState==1)//如果状态是1,则向右移 { //根据当前百分比计算当前菜单的位置,大小 mv.currentSelectX=mv.currentSelectX+(BIGWIDTH+MENU_SPAN)*mv.changePercent; mv.currentSelectY=mv.currentSelectY+(BIGHEIGHT-SMALLHEIGHT)*mv.changePercent; mv.currentSelectWidth=BIGWIDTH-(BIGWIDTH-SMALLWIDTH)*mv.changePercent; mv.currentSelectHeight=BIGHEIGHT-(BIGHEIGHT-SMALLHEIGHT)*mv.changePercent; //向右移之后,紧邻当前菜单的左侧菜单项要变大,下面要计算 mv.leftWidth=SMALLWIDTH+(BIGWIDTH-SMALLWIDTH)*mv.changePercent; mv.leftHeight=SMALLHEIGHT+(BIGHEIGHT-SMALLHEIGHT)*mv.changePercent; } else if(mv.anmiState==2)//如果状态是2,则向左移 { //根据当前百分比计算当前菜单的位置,大小 mv.currentSelectX=mv.currentSelectX-(SMALLWIDTH+MENU_SPAN)*mv.changePercent; mv.currentSelectY=mv.currentSelectY+(BIGHEIGHT-SMALLHEIGHT)*mv.changePercent; mv.currentSelectWidth=BIGWIDTH-(BIGWIDTH-SMALLWIDTH)*mv.changePercent; mv.currentSelectHeight=BIGHEIGHT-(BIGHEIGHT-SMALLHEIGHT)*mv.changePercent; //向左移之后,紧邻当前菜单的右侧菜单项要变大,下面要计算 mv.rightWidth=SMALLWIDTH+(BIGWIDTH-SMALLWIDTH)*mv.changePercent; mv.rightHeight=SMALLHEIGHT+(BIGHEIGHT-SMALLHEIGHT)*mv.changePercent; } //计算出紧邻左侧的菜单的位置 mv.leftX=mv.currentSelectX-MENU_SPAN-mv.leftWidth; mv.leftY=mv.currentSelectY+(mv.currentSelectHeight-mv.leftHeight);//犯过错 //计算出紧邻右侧的菜单的位置 mv.rightX=mv.currentSelectX+mv.currentSelectWidth+MENU_SPAN; mv.rightY=mv.currentSelectY+(mv.currentSelectHeight-mv.rightHeight);//犯过错 mv.repaint(); try { Thread.sleep(ANMI_TIMESPAN); } catch(Exception e) { e.printStackTrace(); } }//for结束 mv.anmiState=0; mv.currentIndex=afterCurrentIndex; mv.initMenu(); mv.repaint(); }//run结束 }

近期下载者

相关文件


收藏者