Changeset 41c11dd in advance-wars for src/com/medievaltech/unit/Soldier.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/unit/Soldier.java
r511177b r41c11dd 5 5 import android.graphics.Point; 6 6 7 import com.medievaltech.advancewars.Player; 8 import com.medievaltech.advancewars.Static; 9 import com.medievaltech.advancewars.Tile; 7 10 import com.medievaltech.advancewars.Enum.*; 8 11 … … 27 30 @Override 28 31 public void attack(Point point) { 29 // TODO Auto-generated method stub 30 32 Tile t = Static.map.getTile(point); 33 34 if(t.currentUnit == null && t.currentBuilding != null) { 35 t.currentBuilding.currentHealth -= this.currentHealth; 36 37 if(t.currentBuilding.currentHealth <= 0) { 38 t.currentBuilding.owner = this.owner; 39 t.currentBuilding.currentHealth = t.currentBuilding.maxHealth; 40 } 41 } 31 42 } 32 43
Note:
See TracChangeset
for help on using the changeset viewer.