forked from JHaack4/CaveGen
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathSpawnPoint.java
48 lines (44 loc) · 1.25 KB
/
SpawnPoint.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
class SpawnPoint {
int type;
int spawnPointIdx; // order it appears in the file
float x, y, z; // these are relative to the map unit (in the file)
float angle, radius;
int minNum, maxNum;
MapUnit mapUnit = null;
Door door = null;
boolean filled = false;
boolean filledFalling = false;
boolean filledFallingPom = false;
int scoreHole = -1;
int scoreItem = -1;
float probVisuallyEmpty = 1.0f;
float posX, posZ, posY, ang; // these are "global positions" relative to the sublevel
int spawnListIdx = -1;
float distToStart = -1;
WayPoint closestWayPoint = null;
SpawnPoint copy() {
SpawnPoint sp = new SpawnPoint();
sp.spawnPointIdx = spawnPointIdx;
sp.type = type;
sp.x = x;
sp.y = y;
sp.z = z;
sp.angle = angle;
sp.radius = radius;
sp.minNum = minNum;
sp.maxNum = maxNum;
sp.spawnListIdx = spawnListIdx;
return sp;
}
void spawnPointPos() {
if (door != null) {
door.mapUnit.doorPos(door);
posX = door.posX;
posY = door.posY;
posZ = door.posZ;
ang = door.ang;
}
else
mapUnit.spawnPointPos(this);
}
}