用SurfaceView制作简单的android游戏 : 重力小球(2)--------制作重力感应小球
摘要:
1.紧接第一篇,创建一些类Vec.java (用来表示速度的)View Code public class Vec { public Float _x, _y; Vec(){ _x = _y = 0.f; } Vec(float x, float y){ _x = x; _y = y; } float getAngle(){ return (float)Math.atan2(_x, _y); } //坐标系内任意一点到原点的距离 float getLen... 阅读全文
posted @ 2012-09-13 16:31 tomboy 阅读(870) 评论(0) 推荐(0)
浙公网安备 33010602011771号