Other
Battle City using java prepared, after video learning, I have written together. For beginners
Can be realized:
Bullet bursts can be achieved
///// 1> Press the J key to determine the number of neutron bombs bullets vector
///// 2> [if they meet, the new addition to the bullet bullet bullet vector and start the thread
///// 3> traversal bullet bullet attributes such as vector and determine whether alive, draw bullets, or else remove the bullet from the bullet vector]
// After the bullet hit the enemy tanks tanks disappear
///// 1> in the run function add MyPanel judge sentences, determine whether the tank was hit: through all the bullets to see if valid, if the effective re-iterate all enemy tanks, enemy tanks to see if still alive
//////// If alive, then call hitTank function
///// 2> will be able to tell whether the panel to redraw the enemy tanks alive, adding judgment statement at the time to draw b
java
视频
学习
手写
编写
适用
自己
初学者
大战
坦克
No comment