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
|
Line | |
---|
1 | package com.example.game;
|
---|
2 |
|
---|
3 | import java.util.List;
|
---|
4 | import android.graphics.Point;
|
---|
5 |
|
---|
6 | public abstract class Unit
|
---|
7 | {
|
---|
8 | public Unit()
|
---|
9 | {
|
---|
10 |
|
---|
11 | }
|
---|
12 | public enum Type
|
---|
13 | {
|
---|
14 | LAND,SEA
|
---|
15 | }
|
---|
16 |
|
---|
17 | public Type type;
|
---|
18 | public Player owner;
|
---|
19 |
|
---|
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 |
|
---|
33 | public void move(Point point)
|
---|
34 | {
|
---|
35 |
|
---|
36 | }
|
---|
37 | public void attack(Point point)
|
---|
38 | {
|
---|
39 |
|
---|
40 | }
|
---|
41 |
|
---|
42 | public List<Point> getRange()
|
---|
43 | {
|
---|
44 | return null;
|
---|
45 | }
|
---|
46 | public List<Point> getAttackRange()
|
---|
47 | {
|
---|
48 | return null;
|
---|
49 | }
|
---|
50 |
|
---|
51 | public abstract void draw();
|
---|
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.