|
|||||||||
| 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.DuelChallenge
public class DuelChallenge
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 |
DuelChallenge.ChallengeExpire
Starts the arena. |
class |
DuelChallenge.PositionCheck
|
| Field Summary | |
|---|---|
protected java.util.ArrayList<java.lang.Boolean>[] |
accepted
|
protected Point |
centerLoc
|
protected java.lang.String |
challenged
|
protected int |
challengeID
|
protected java.lang.String |
challenger
|
protected int |
duelType
|
protected OID |
flagOid
|
protected int |
state
|
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. |
| Constructor Summary | |
|---|---|
DuelChallenge()
The default constructor. |
|
DuelChallenge(java.lang.String challenger,
java.lang.String challenged,
java.util.ArrayList<OID>[] oids,
int type,
int id,
OID instanceOid)
Constructor that takes in the challenger, the challenged, and all players involved and creates a new DuelChallenge object. |
|
| Method Summary | |
|---|---|
java.util.ArrayList<java.lang.Boolean>[] |
getAccepted()
|
Point |
getCenter()
|
java.lang.String |
getChallenged()
|
int |
getChallengeID()
|
java.lang.String |
getChallenger()
|
int |
getDuelType()
|
OID |
getFlagOid()
|
int |
getState()
|
java.util.ArrayList<OID>[] |
getTeam()
|
java.util.ArrayList<OID> |
getTeam(int team)
|
void |
playerAccept(OID acceptOid)
Sets the players accepted property to true. |
void |
playerDeclined(OID delineOid)
Cancels the duel challenge because a player does not wish to partake in the duel. |
void |
playerDisconnected(OID delineOid,
java.lang.String name)
Cancels the duel challenge because a player has disconnected. |
void |
setAccepted(java.util.ArrayList<java.lang.Boolean>[] accepted)
|
void |
setCenter(Point centerLoc)
|
void |
setChallenged(java.lang.String challenged)
|
void |
setChallengeID(int challengeID)
|
void |
setChallenger(java.lang.String challenger)
|
void |
setDuelType(int duelType)
|
void |
setFlagOid(OID flagOid)
|
void |
setState(int state)
|
void |
setTeam(java.util.ArrayList<OID>[] teams)
|
void |
setTeam(int team,
java.util.ArrayList<OID> teams)
|
void |
setup(OID instanceOid)
This is run once the Duel Challenge 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 challengeID
protected int duelType
protected Point centerLoc
protected java.util.ArrayList<OID>[] teams
protected java.util.ArrayList<java.lang.Boolean>[] accepted
protected java.lang.String challenger
protected java.lang.String challenged
protected int state
protected OID flagOid
protected java.lang.Integer testTimer
| Constructor Detail |
|---|
public DuelChallenge()
public DuelChallenge(java.lang.String challenger,
java.lang.String challenged,
java.util.ArrayList<OID>[] oids,
int type,
int id,
OID instanceOid)
challenger: - the oid of the challengerchallenged: - the oid of the player who was challengedoids: - a list of all players involved broken up into teamstype: - the type of duelid: - the identification number of the arena| Method Detail |
|---|
public void setup(OID instanceOid)
public void playerAccept(OID acceptOid)
acceptOid: - the oid of the player who has accepted this duel.public void playerDeclined(OID delineOid)
oid: - the oid of the player who declined the duel
public void playerDisconnected(OID delineOid,
java.lang.String name)
oid: - the oid of the player who disconnectedname: - the name of the player who disconnectedpublic int getChallengeID()
public void setChallengeID(int challengeID)
public int getDuelType()
public void setDuelType(int duelType)
public int getState()
public void setState(int state)
public java.util.ArrayList<OID>[] getTeam()
public void setTeam(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>[] getAccepted()
public void setAccepted(java.util.ArrayList<java.lang.Boolean>[] accepted)
public java.lang.String getChallenger()
public void setChallenger(java.lang.String challenger)
public java.lang.String getChallenged()
public void setChallenged(java.lang.String challenged)
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 | ||||||||