标签:this 根据 r.js 需要 body 坦克大战 空格 table code
上代码前来张最新的类图:

View Code
这里需要我们在之前的代码做一系列的更改了。
更改 Mover.js
| 1 | Mover.prototype = new HitTestObject(); |
|
1
2
|
// 碰撞检测 if (this.HitTest(battleField)) { return this.OnHitTest(battleField); } |
|
1
2
3
4
|
battleField[nextPoint.y][nextPoint.x].occupier = This; /*占用新位置*/// 清空对象原来位置占有battleField[yp][xp].occupier = null; |
View Code
View Code
标签:this 根据 r.js 需要 body 坦克大战 空格 table code
原文地址:http://www.cnblogs.com/yangmingyu/p/6928235.html