Last change
on this file since 54e0965 was 15ddb57, checked in by aluthra <devnull@…>, 14 years ago |
More game objects
|
-
Property mode
set to
100644
|
File size:
723 bytes
|
Rev | Line | |
---|
[a0f5455] | 1 | package com.example.game;
|
---|
| 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.