Starsector API
Loading...
Searching...
No Matches
EncounterPoint.java
Go to the documentation of this file.
1package com.fs.starfarer.api.impl.campaign.enc;
2
3import org.lwjgl.util.vector.Vector2f;
4
5import com.fs.starfarer.api.campaign.LocationAPI;
6
7public class EncounterPoint {
8 public String id;
9 public LocationAPI where;
10 public Vector2f loc;
11 public String type;
12 public Object custom;
13
14 public EncounterPoint(String id, LocationAPI where, Vector2f loc, String type) {
15 this.id = id;
16 this.where = where;
17 this.loc = loc;
18 this.type = type;
19 }
20
21 public Vector2f getLocInHyper() {
22 Vector2f loc = this.loc;
23 if (!where.isHyperspace()) {
24 loc = where.getLocation();
25 }
26 return loc;
27 }
28
29 @Override
30 public String toString() {
31 return "id:" + id + ", where:" + where + ", loc: " + loc + ", type: " + type;
32 }
33
34
35
36}
EncounterPoint(String id, LocationAPI where, Vector2f loc, String type)