Changeset 1a1e8c7 in advance-wars for src/com/medievaltech/game/Unit.java
- Timestamp:
- Jan 31, 2011, 11:44:53 PM (14 years ago)
- Branches:
- master
- Children:
- 00c432c
- Parents:
- abe7b3d
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/com/medievaltech/game/Unit.java
rabe7b3d r1a1e8c7 3 3 import java.util.List; 4 4 5 import android.graphics.Canvas; 6 import android.graphics.Paint; 5 7 import android.graphics.Point; 6 8 7 9 public abstract class Unit 8 10 { 9 public Unit()10 {11 12 }13 11 public enum Type 14 12 { … … 16 14 } 17 15 16 private Paint p; 17 18 18 public Type type; 19 19 public Player owner; … … 32 32 public Point location; 33 33 34 public Unit(Paint p) { 35 this.p = p; 36 } 37 34 38 public abstract boolean move(Point point); 35 39 public abstract boolean attack(Point point); … … 38 42 public abstract List<Point> getAttackRange(); 39 43 40 public void die() 41 { 44 public void die() { 42 45 43 46 } 44 47 45 46 47 48 49 50 51 48 public void draw(Canvas c, int x, int y) { 49 c.drawCircle(x, y, 20, p); 50 } 52 51 }
Note:
See TracChangeset
for help on using the changeset viewer.