Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package anonymousweaponprototype.classes;
- import java.awt.geom.Point2D;
- /**
- *
- * @author Darin Beaudreau
- */
- public class WeaponType {
- // WEAPON TYPES
- public Weapon PISTOL = new Weapon("Pistol", 4, 1, 20, 1) {
- @Override
- public void fire(Point2D target_) {
- if(this.getAmmo() > 0) {
- System.out.println("Your " + this.getName() + " fires at (" + target_.getX() + "," + target_.getY() + ") doing " + this.getRandomDamage() + " damage!");
- this.useAmmo();
- System.out.println("Ammo Left: " + this.getAmmo());
- }
- }
- };
- public Weapon FLAMETHROWER = new Weapon("Flamethrower", 8, 1, 200, 5) {
- @Override
- public void fire(Point2D target_) {
- if(this.getAmmo() > 0) {
- System.out.println("Your " + this.getName() + " sprays toward (" + target_.getX() + "," + target_.getY() + ") doing " + this.getRandomDamage() + " damage!");
- this.useAmmo();
- System.out.println("Fuel Remaining: " + this.getAmmo());
- }
- }
- };
- public WeaponType() {
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement