有些图片路径会出错要注意packagecomta
kgame
importjavautilVector
坦克类classTa
k
i
tx0i
ty0i
tcolor0i
tspeed1i
tdirect0boolea
isLivetrue
publicTa
ki
txi
ty
thisxxthisyy
publici
tgetXretur
x
publicvoidsetXi
txthisxx
publici
tgetYretur
y
publicvoidsetYi
tythisyy
publici
tgetDirectretur
direct
publicvoidsetDirecti
tdirectthisdirectdirect
f
publici
tgetColorretur
color
publicvoidsetColori
tcolorthiscolorcolor
我的坦克
classHeroexte
dsTa
k
Shotshot
ullVectorShotshotm
ewVectorShotpublicHeroi
txi
ty
superxythiscolor5
坦克具有一个打击敌人的方法publicvoidshote
emyi
txi
tyi
tdirect
switchdirectcase0
shot
ewShotthisx10thisy0shotmaddshotbreakcase1shot
ewShotthisx30thisy101shotmaddshotbreakcase2shot
ewShotthisx10thisy302shotmaddshotbreakcase3shot
ewShotthisxthisy103shotmaddshot
fbreak
Threadth
ewThreadshotthstart
调整速度publicvoidmoveup
yspeedpublicvoidmoveright
xspeedpublicvoidmovedow
yspeedpublicvoidmoveleft
xspeed
敌人的坦克classE
emyTa
kexte
dsTa
kimpleme
tsRu
able
VectorShote
sh
ewVectorShotVectorE
emyTa
kets
ewVectorE
emyTa
kpublicE
emyTa
ki
txi
ty
superxythissetColor2thissetDirect2
获取MPa
el上的敌人坦克publicvoidsetetsVectorE
emyTa
kvv
thisetsvv
f判断敌人的坦克是否碰撞publicboolea
isTouch
boolea
bfalseE
emyTa
ket
ullswitchdirectcase0
fori
ti0ietssizei
etetsgetiifetthis
ifetdirect0etdirect2
ifthisxetxthisxetx20thisyety30thisyetyretur
true
ifthisx20etxthisx20etx20thisyety30thisyetyretur
true
ifetdirect1etdirect3
ifthisxetxthisxetx30thisyety20thisyetyretur
true
ifthisx20etxthisx20etx30thisyety20thisyetyretur
true
fbreakcase1fori
ti0ietssizei
etetsgetiifetthis
ifetdirect0etdirect2
ifthisx30etxthisx30etx20thisyety30thisyetyretur
true
ifthisx30etxthisx30etx20thisy20ety30thisy20etyretur
true
ifetdirect1etdirect3
ifthisx30etxthisx30etx30thisyety20thisyetyretur
true
ifthisx30etxthisx30etx30thisy20ety20thisy20etyretur
true
breakcase2fori
ti0ietssizeietetsgetiifetthis
fifetdirect0etdirect2
ifthisxetxthisxetx20thisy30ety30thisy30etyretur
true
ifthisx20etxthisx20etr