|
Last change
on this file since abe7b3d was abe7b3d, checked in by dportnoy <devnull@…>, 15 years ago |
|
Changed the package names from com.example.* to com.medievaltech.*
|
-
Property mode
set to
100644
|
|
File size:
728 bytes
|
| Rev | Line | |
|---|
| [abe7b3d] | 1 | package com.medievaltech.game;
|
|---|
| [a0f5455] | 2 |
|
|---|
| 3 | import java.util.List;
|
|---|
| 4 |
|
|---|
| 5 | import android.graphics.Point;
|
|---|
| 6 |
|
|---|
| 7 | public abstract class Unit
|
|---|
| 8 | {
|
|---|
| 9 | public Unit()
|
|---|
| 10 | {
|
|---|
| 11 |
|
|---|
| 12 | }
|
|---|
| [15ddb57] | 13 | public enum Type
|
|---|
| 14 | {
|
|---|
| 15 | LAND,SEA
|
|---|
| 16 | }
|
|---|
| 17 |
|
|---|
| 18 | public Type type;
|
|---|
| 19 | public Player owner;
|
|---|
| 20 |
|
|---|
| [a0f5455] | 21 | public int maxHealth;
|
|---|
| 22 | public int currentHealth;
|
|---|
| 23 |
|
|---|
| 24 | public int maxFuel;
|
|---|
| 25 | public int currentFuel;
|
|---|
| 26 |
|
|---|
| 27 | public int sightRange;
|
|---|
| 28 | public int move;
|
|---|
| 29 |
|
|---|
| 30 | public int minAttackRange;
|
|---|
| 31 | public int maxAttackRange;
|
|---|
| 32 | public Point location;
|
|---|
| 33 |
|
|---|
| 34 | public abstract boolean move(Point point);
|
|---|
| 35 | public abstract boolean attack(Point point);
|
|---|
| 36 |
|
|---|
| 37 | public abstract List<Point> getRange();
|
|---|
| 38 | public abstract List<Point> getAttackRange();
|
|---|
| 39 |
|
|---|
| 40 | public void die()
|
|---|
| 41 | {
|
|---|
| 42 |
|
|---|
| 43 | }
|
|---|
| 44 |
|
|---|
| 45 |
|
|---|
| 46 |
|
|---|
| 47 |
|
|---|
| 48 |
|
|---|
| 49 |
|
|---|
| 50 |
|
|---|
| 51 |
|
|---|
| 52 | }
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.