Advertisement
Guest User

Untitled

a guest
Nov 28th, 2014
148
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.47 KB | None | 0 0
  1. public abstract class UnitClass{
  2.    
  3.     public UnitClass(int _health, int _defense){
  4.         //instantiate stuff
  5.     }
  6.  
  7.     public abstract void attack(int damage, int enemyHealth, int enemyDefense){
  8.         //will be different for each class
  9.     }
  10.  
  11.     public void die(){
  12.         //everyone shares this one
  13.     }
  14. }
  15.  
  16.  
  17. public abstract class Fighter extends UnitClass{
  18.     public Fighter(int _health, int _defense){
  19.         this.super(_health, _defense);
  20.     }
  21.  
  22.     public abstract void fighterStuff(){
  23.        
  24.     }
  25. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement