Changeset c3ad11c in advance-wars for src/com/medievaltech/unit/Unit.java
- Timestamp:
- Aug 26, 2011, 9:54:05 PM (13 years ago)
- Branches:
- master
- Children:
- 511177b
- Parents:
- 99433bb
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/com/medievaltech/unit/Unit.java
r99433bb rc3ad11c 8 8 9 9 public abstract class Unit { 10 private Paint p;11 12 10 public UnitType type; 13 //public Player owner;11 public Player owner; 14 12 15 13 public int maxHealth; … … 26 24 public Point location; 27 25 28 public Unit(P aintp)26 public Unit(Player p) 29 27 { 30 this.p = p; 28 p.addUnit(this); 29 30 owner = p; 31 31 maxHealth = 10; 32 32 currentHealth = 10; 33 34 33 } 35 34 … … 87 86 88 87 public void draw(Canvas c, int x, int y) { 89 c.drawCircle(x, y, 20, p);88 c.drawCircle(x, y, 20, owner.getColor()); 90 89 } 91 90 }
Note:
See TracChangeset
for help on using the changeset viewer.