Last change
on this file since a0f5455 was a0f5455, checked in by aluthra <devnull@…>, 14 years ago |
Created the game package and started creating actual game objects.
|
-
Property mode
set to
100644
|
File size:
636 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 | }
|
---|
| 13 | public int maxHealth;
|
---|
| 14 | public int currentHealth;
|
---|
| 15 |
|
---|
| 16 | public int maxFuel;
|
---|
| 17 | public int currentFuel;
|
---|
| 18 |
|
---|
| 19 | public int sightRange;
|
---|
| 20 | public int move;
|
---|
| 21 |
|
---|
| 22 | public int minAttackRange;
|
---|
| 23 | public int maxAttackRange;
|
---|
| 24 | public Point location;
|
---|
| 25 |
|
---|
| 26 | public abstract boolean move(Point point);
|
---|
| 27 | public abstract boolean attack(Point point);
|
---|
| 28 |
|
---|
| 29 | public abstract List<Point> getRange();
|
---|
| 30 | public abstract List<Point> getAttackRange();
|
---|
| 31 |
|
---|
| 32 | public void die()
|
---|
| 33 | {
|
---|
| 34 |
|
---|
| 35 | }
|
---|
| 36 |
|
---|
| 37 |
|
---|
| 38 |
|
---|
| 39 |
|
---|
| 40 |
|
---|
| 41 |
|
---|
| 42 |
|
---|
| 43 |
|
---|
| 44 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.