|
|||||||||
| Atavism Version 2018.1 | AGIS API | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectatavism.agis.objects.Duel
public class Duel
The Duel class handles a single duel between two teams. It has numerous scheduled executors and a state variable to control the flow of the duel from setup to the end. This class is complete, it relies on no other class to perform it's duties.
| Nested Class Summary | |
|---|---|
class |
Duel.DuelStart
Starts the arena. |
class |
Duel.PositionCheck
|
| Field Summary | |
|---|---|
protected java.util.ArrayList<java.lang.Boolean>[] |
activeFighters
|
protected Point |
centerLoc
|
static java.lang.String |
DUEL_FLAG_MODEL
|
protected int |
duelID
|
protected int |
duelType
|
protected OID |
flagOid
|
protected java.util.ArrayList<java.lang.Integer>[] |
oobTimer
|
protected java.util.ArrayList<java.lang.Integer> |
teamHealths
|
protected java.lang.String[] |
teamLeader
|
protected java.util.ArrayList<OID>[] |
teams
|
protected java.lang.Integer |
testTimer
Iterates through every player in the duel and makes sure they are still within 30m of the center point of the duel. |
protected int |
timeUntilStart
|
| Constructor Summary | |
|---|---|
Duel()
The default constructor. |
|
Duel(java.lang.String[] teamLeaders,
java.util.ArrayList<OID>[] oids,
int type,
int id,
Point centerLoc,
OID flagOid)
Constructor that takes in two lists that contain the oids of the players on each team. |
|
| Method Summary | |
|---|---|
void |
addKillScore(OID attackerOid,
OID victimOid)
This will be called whenever one player kills another. |
void |
checkActivePlayers()
This function runs through all the players in both teams to see if any teams have no active players left. |
void |
disconnectedPlayer(OID oid,
java.lang.String playerName)
Removes a player from the arena. |
java.util.ArrayList<java.lang.Boolean>[] |
getActiveFighters()
|
Point |
getCenter()
|
int |
getDuelID()
|
int |
getDuelType()
|
OID |
getFlagOid()
|
java.util.ArrayList<java.lang.Integer>[] |
getOobTimers()
|
int |
getState()
|
java.util.ArrayList<OID> |
getTeam(int team)
|
java.lang.String[] |
getTeamLeaders()
|
java.util.ArrayList<OID>[] |
getTeams()
|
void |
removePlayer(OID oid)
Removes a player from the arena. |
void |
setActiveFighters(java.util.ArrayList<java.lang.Boolean>[] activeFighters)
|
void |
setCenter(Point centerLoc)
|
void |
setDuelID(int duelID)
|
void |
setDuelType(int duelType)
|
void |
setFlagOid(OID flagOid)
|
void |
setOobTimers(java.util.ArrayList<java.lang.Integer>[] oobTimer)
|
void |
setState(int state)
|
void |
setTeam(int team,
java.util.ArrayList<OID> teams)
|
void |
setTeamLeaders(java.lang.String[] teamLeader)
|
void |
setTeams(java.util.ArrayList<OID>[] teams)
|
void |
setup()
This is run once the Duel object is created. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected int duelID
protected int duelType
protected java.util.ArrayList<OID>[] teams
protected java.util.ArrayList<java.lang.Boolean>[] activeFighters
protected java.util.ArrayList<java.lang.Integer>[] oobTimer
protected Point centerLoc
protected java.lang.String[] teamLeader
protected OID flagOid
protected int timeUntilStart
protected java.lang.Integer testTimer
protected java.util.ArrayList<java.lang.Integer> teamHealths
public static final java.lang.String DUEL_FLAG_MODEL
| Constructor Detail |
|---|
public Duel()
public Duel(java.lang.String[] teamLeaders,
java.util.ArrayList<OID>[] oids,
int type,
int id,
Point centerLoc,
OID flagOid)
oids: - the oids of the players involved in this dueltype: - the duel typeloc: - the centre point of the duelid: - the identification number of the duel| Method Detail |
|---|
public void setup()
public void checkActivePlayers()
public void removePlayer(OID oid)
oid: - The player being removed from the arena
public void disconnectedPlayer(OID oid,
java.lang.String playerName)
oid: - The player being removed from the arena
public void addKillScore(OID attackerOid,
OID victimOid)
attackerOid: - the oid of the attackervictimOid: - the oid of the victimpublic int getDuelID()
public void setDuelID(int duelID)
public int getDuelType()
public void setDuelType(int duelType)
public int getState()
public void setState(int state)
public java.util.ArrayList<OID>[] getTeams()
public void setTeams(java.util.ArrayList<OID>[] teams)
public java.util.ArrayList<OID> getTeam(int team)
public void setTeam(int team,
java.util.ArrayList<OID> teams)
public java.util.ArrayList<java.lang.Boolean>[] getActiveFighters()
public void setActiveFighters(java.util.ArrayList<java.lang.Boolean>[] activeFighters)
public java.util.ArrayList<java.lang.Integer>[] getOobTimers()
public void setOobTimers(java.util.ArrayList<java.lang.Integer>[] oobTimer)
public java.lang.String[] getTeamLeaders()
public void setTeamLeaders(java.lang.String[] teamLeader)
public Point getCenter()
public void setCenter(Point centerLoc)
public OID getFlagOid()
public void setFlagOid(OID flagOid)
|
Copyright © 2018 Dragonsan Studios Sp. z o.o. |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||