Changeset 41c11dd in advance-wars for src/com/medievaltech/advancewars/Tile.java
- Timestamp:
- Aug 27, 2011, 1:56:46 AM (13 years ago)
- Branches:
- master
- Children:
- 331d180
- Parents:
- 511177b
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/com/medievaltech/advancewars/Tile.java
r511177b r41c11dd 12 12 public double moveCoefficent; 13 13 public Unit currentUnit; 14 public City currentBuilding; 14 15 public Point point; 15 16 private Paint p; … … 19 20 this.type = type; 20 21 this.currentUnit = null; 22 this.currentBuilding = null; 21 23 } 22 24 … … 40 42 } 41 43 44 public void addBuilding(City c) { 45 currentBuilding = c; 46 c.location = point; 47 } 48 42 49 public void draw(Canvas c, int x, int y) { 43 50 c.drawRect(x, y, x+50, y+50, p); … … 48 55 currentUnit.draw(c, x+25, y+25); 49 56 } 57 58 public void drawBuilding(Canvas c, int x, int y) { 59 if(currentBuilding != null) 60 currentBuilding.draw(c, x+25, y+25); 61 } 50 62 }
Note:
See TracChangeset
for help on using the changeset viewer.