source: advance-wars/src/com/example/game/Unit.java@ a79ce1b

Last change on this file since a79ce1b was a79ce1b, checked in by Avil <devnull@…>, 14 years ago

Added some attributes to soldier class

  • Property mode set to 100644
File size: 782 bytes
RevLine 
[a0f5455]1package com.example.game;
2
3import java.util.List;
4import android.graphics.Point;
5
6public abstract class Unit
7{
8 public Unit()
9 {
10
11 }
[15ddb57]12 public enum Type
13 {
14 LAND,SEA
15 }
16
17 public Type type;
18 public Player owner;
19
[a0f5455]20 public int maxHealth;
21 public int currentHealth;
22
23 public int maxFuel;
24 public int currentFuel;
25
26 public int sightRange;
27 public int move;
28
29 public int minAttackRange;
30 public int maxAttackRange;
31 public Point location;
32
[a79ce1b]33 public void move(Point point)
34 {
35
36 }
37 public void attack(Point point)
38 {
39
40 }
[a0f5455]41
[a79ce1b]42 public List<Point> getRange()
43 {
44 return null;
45 }
46 public List<Point> getAttackRange()
47 {
48 return null;
49 }
[a0f5455]50
[a79ce1b]51 public abstract void draw();
[a0f5455]52 public void die()
53 {
54
55 }
56
57
58
59
60
61
62
63
64}
Note: See TracBrowser for help on using the repository browser.