Changeset b97a618 in advance-wars for src/com/medievaltech/game/Unit.java


Ignore:
Timestamp:
Feb 2, 2011, 4:51:03 PM (14 years ago)
Author:
dportnoy <devnull@…>
Branches:
master
Children:
78d3c6f
Parents:
6a639f7
Message:

Touching a unit now displays its movement area. Touching a square without a unit will stop displaying any previously displayed movement area. THe movement area is now drawn under the unit itself.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/com/medievaltech/game/Unit.java

    r6a639f7 rb97a618  
    6060                                        visited[p.x-location.x+move-1][p.y-location.y+move] = true;
    6161                                }
    62                                 if(p.x<8 && p.x<location.x+move && !visited[p.x-location.x+move+1][p.y-location.y+move]) {
     62                                if(p.x<5 && p.x<location.x+move && !visited[p.x-location.x+move+1][p.y-location.y+move]) {
    6363                                        cur.add(new Point(p.x+1, p.y));
    6464                                        visited[p.x-location.x+move+1][p.y-location.y+move] = true;
     
    6868                                        visited[p.x-location.x+move][p.y-location.y+move-1] = true;
    6969                                }
    70                                 if(p.y<6 && p.y<location.y+move && !visited[p.x-location.x+move][p.y-location.y+move+1]) {
     70                                if(p.y<7 && p.y<location.y+move && !visited[p.x-location.x+move][p.y-location.y+move+1]) {
    7171                                        cur.add(new Point(p.x, p.y+1));
    7272                                        visited[p.x-location.x+move][p.y-location.y+move+1] = true;
Note: See TracChangeset for help on using the changeset viewer.