![](https://img2018.cnblogs.com/blog/1167156/201811/1167156-20181130181021166-344432559.png)
![](https://img2018.cnblogs.com/blog/1167156/201811/1167156-20181130181022114-512829753.png)
-------------------------------------------------
防止敌人坦克重叠相撞运动:
两个点不在敌人坦克区域即可:
(上下一组)
![](https://img2018.cnblogs.com/blog/1167156/201811/1167156-20181130181022778-1695790274.png)
(左右一组)
一个方向对应着两组:
![](https://img2018.cnblogs.com/blog/1167156/201811/1167156-20181130181023431-1124578581.png)
![](https://img2018.cnblogs.com/blog/1167156/201811/1167156-20181130181024034-53696858.png)
放在EnemyTank里面合适,自己去判断是否相撞;
因为敌人坦克数量是不知道的,必须让EnemyTank知道坦克的情况;
![](https://img2018.cnblogs.com/blog/1167156/201811/1167156-20181130181024747-2092711733.png)
![](https://img2018.cnblogs.com/blog/1167156/201811/1167156-20181130181025430-1322292169.png)
拥有了一种能力,可以拿到MyPanel上敌人坦克的向量;
每动态创建一个敌人坦克,这个函数必然会被调用一次;
![](https://img2018.cnblogs.com/blog/1167156/201811/1167156-20181130181026473-1444228898.png)
![](https://img2018.cnblogs.com/blog/1167156/201811/1167156-20181130181027200-2023604138.png)
人和人最大的差别不是身高和体重,是思想。
自个儿都不知道怎么判断,去写程序是不可能的。
![](https://img2018.cnblogs.com/blog/1167156/201811/1167156-20181130181028020-525311655.png)
//取出所有的坦克很有可能是自己,排除自己this
![](https://img2018.cnblogs.com/blog/1167156/201811/1167156-20181130181028774-629863336.png)
![](https://img2018.cnblogs.com/blog/1167156/201811/1167156-20181130181029518-303389921.png)
![](https://img2018.cnblogs.com/blog/1167156/201811/1167156-20181130181030197-209439360.png)
![](https://img2018.cnblogs.com/blog/1167156/201811/1167156-20181130181031573-44782180.png)
![](https://img2018.cnblogs.com/blog/1167156/201811/1167156-20181130181032377-727884673.png)
----------------------------------------------
可以分关:主要是用于提示,做一个面板写上提示
![](https://img2018.cnblogs.com/blog/1167156/201811/1167156-20181130181033032-1819765445.png)