Back to project page Tanks.
The source code is released under:
MIT License
If you think the Android project Tanks listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.ThirtyNineEighty.Game.Gameplay; /*from w ww.j a v a2 s . com*/ import com.ThirtyNineEighty.Game.Gameplay.Characteristics.Characteristic; import com.ThirtyNineEighty.Game.Gameplay.Characteristics.CharacteristicFactory; import com.ThirtyNineEighty.Game.Worlds.IWorld; import com.ThirtyNineEighty.System.GameContext; public class Tank extends GameObject { public static Tank Create(String type) { Characteristic c = CharacteristicFactory.get(type); return new Tank(c); } protected Tank(Characteristic characteristic) { super(characteristic); } public void fire() { IWorld world = GameContext.getContent().getWorld(); world.add(Bullet.Create(CharacteristicFactory.BULLET)); } }