|
|||||||||
| 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.arenas.Arena
atavism.agis.arenas.CaptureTheFlagArena
public class CaptureTheFlagArena
The Arena class handles an arena instance. It has numerous scheduled executors and a state variable to control the flow of the arena from setup to the end. This class is complete, it relies on no other class to perform it's duties.
| Nested Class Summary | |
|---|---|
class |
CaptureTheFlagArena.ArenaCleanup
Teleports all players out and then sends out a message to remove this arena instance from the Map stored in the ArenaPlugin. |
class |
CaptureTheFlagArena.ArenaCountdown
|
class |
CaptureTheFlagArena.ArenaEnd
The class to handle when the arenas timer has expired. |
class |
CaptureTheFlagArena.ArenaReady
|
class |
CaptureTheFlagArena.ArenaStart
Starts the arena. |
class |
CaptureTheFlagArena.CollisionCheck
Iterates through every player in the arena and compares their location to all the other players in the other teams. |
class |
CaptureTheFlagArena.RespawnFlags
The class to handle when the arenas timer has expired. |
class |
CaptureTheFlagArena.SpawnObjects
Calls the functions to spawn all the objects needed in this arena. |
| Field Summary |
|---|
| Fields inherited from class atavism.agis.arenas.Arena |
|---|
arenaDatabaseID, arenaGameType, arenaID, arenaName, arenaObjects, category, centreX, centreY, centreZ, defeatPayment, defeatXP, goalType, gridSize, instanceOid, instanceTemplateID, length, numTeams, PLAYER_IMMUNE, PLAYER_INACTIVE, PROP_HEALTH, PROP_MAX_HEALTH, PROP_WEAPON, scheduledExecutioner, startTime, state, STATE_END, STATE_RUNNING, STATE_SETUP, STATE_UNSET, teams, useWeapons, victoryCondition, victoryPayment, victoryXP |
| Fields inherited from interface atavism.msgsys.MessageCallback |
|---|
NO_FLAGS, RESPONSE_EXPECTED |
| Constructor Summary | |
|---|---|
CaptureTheFlagArena(int numTeams)
The default constructor. |
|
CaptureTheFlagArena(int numTeams,
java.util.ArrayList<ArenaQueue.QueueMember>[] members,
int type,
int arenaDatabaseID,
java.lang.String arenaName,
int category,
int dur,
int[] goals,
java.lang.String[] teamNames,
Point[] spawnPoints,
int condition,
int id,
int[] minPlayers,
int instanceTemplateID,
java.util.HashMap<java.lang.Integer,java.lang.Integer> victoryPayment,
java.util.HashMap<java.lang.Integer,java.lang.Integer> defeatPayment,
int victoryExp,
int defeatExp,
boolean useWeapons)
Constructor that takes in two lists that contain the oids of the players on each team. |
|
| Method Summary | |
|---|---|
void |
activateAbility(OID playerOid,
OID targetOid,
int slot)
|
protected boolean |
addAbility(OID playerOid,
int playerTeam)
|
void |
addKillScore(OID attackerOid,
OID victimOid)
This will be called whenever one player kills another. |
protected void |
alterTeamScore(int team,
int score)
Add the score to the teams score. |
void |
completeTutorial(OID oid)
|
void |
dropFlag(OID playerOid)
|
void |
flagCaptured(ArenaMember member,
int flagTeam)
Called when a player carrying an enemy teams flag enters their flag platform and their flag is still on it. |
protected void |
flagDropped(ArenaMember member)
Spawns a flag at the position of the player dropping a flag |
protected java.util.LinkedList<java.lang.Integer> |
getAbilityList(int team)
|
int |
getFlagDisplayID(int team)
|
java.lang.String |
getFlagMesh()
|
void |
handleDeath(OID attackerOid,
OID victimOid)
|
void |
handleMessage(Message msg,
int flags)
process network messages |
void |
pickupFlag(OID playerOid,
int teamNum)
|
void |
releaseRequest(OID playerOid)
|
void |
removePlayer(OID oid,
boolean teleport)
Removes a player from the arena. |
boolean |
sendMessageSingle(java.lang.String msgType,
OID oid,
java.io.Serializable data)
Sends an extension message of the specified type to the specified player |
void |
setFlagClickable(ArenaFlag flag,
boolean allTeams)
Sets the flag clickable to either every team in the game, or just the opposing teams of the flag. |
void |
setup()
This is run once the Arena object is created. |
protected void |
spawnFlags()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public CaptureTheFlagArena(int numTeams)
numTeams: - the number of teams in the arena
public CaptureTheFlagArena(int numTeams,
java.util.ArrayList<ArenaQueue.QueueMember>[] members,
int type,
int arenaDatabaseID,
java.lang.String arenaName,
int category,
int dur,
int[] goals,
java.lang.String[] teamNames,
Point[] spawnPoints,
int condition,
int id,
int[] minPlayers,
int instanceTemplateID,
java.util.HashMap<java.lang.Integer,java.lang.Integer> victoryPayment,
java.util.HashMap<java.lang.Integer,java.lang.Integer> defeatPayment,
int victoryExp,
int defeatExp,
boolean useWeapons)
one: - the list of oids for players on team onetwo: - the list of oids for players on team twotype: - the arena typedur: - the duration of the arenagoals: - the goal score for the teamsloc: - the centre point of the arenaid: - the identification number of the arenaminPlayers: - the minimum number of players in each team| Method Detail |
|---|
public void setup()
setup in class Arena
public void handleMessage(Message msg,
int flags)
handleMessage in interface MessageCallbackhandleMessage in class Arenamsg - Message sent from other agent.flags - Bitwise OR of MessageCallback.NO_FLAGS, MessageCallback.RESPONSE_EXPECTED.
protected boolean addAbility(OID playerOid,
int playerTeam)
addAbility in class Arena
public void handleDeath(OID attackerOid,
OID victimOid)
handleDeath in class Arena
public void addKillScore(OID attackerOid,
OID victimOid)
addKillScore in class ArenaattackerOid: - the oid of the attackervictimOid: - the oid of the victim
public void removePlayer(OID oid,
boolean teleport)
removePlayer in class Arenaoid: - The player being removed from the arenaprotected void spawnFlags()
public void pickupFlag(OID playerOid,
int teamNum)
public void dropFlag(OID playerOid)
protected void flagDropped(ArenaMember member)
member - team -
public void flagCaptured(ArenaMember member,
int flagTeam)
attackerOid: - the oid of the player who captured the flag
public void activateAbility(OID playerOid,
OID targetOid,
int slot)
activateAbility in class Arena
public void setFlagClickable(ArenaFlag flag,
boolean allTeams)
flag - allTeams - public void completeTutorial(OID oid)
completeTutorial in class Arenaprotected java.util.LinkedList<java.lang.Integer> getAbilityList(int team)
protected void alterTeamScore(int team,
int score)
alterTeamScore in class Arenateam: - Which team to add score to.score: - Score value to add. Can be negative.
public boolean sendMessageSingle(java.lang.String msgType,
OID oid,
java.io.Serializable data)
sendMessageSingle in class ArenamsgType: - the message typeoid: - the oid to send the message todata: - some form of data to be sentpublic java.lang.String getFlagMesh()
public int getFlagDisplayID(int team)
public void releaseRequest(OID playerOid)
releaseRequest in class Arena
|
Copyright © 2018 Dragonsan Studios Sp. z o.o. |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||