|
RuneHive-Game
|
A GroupActivity is an extension of Activity that holds a list of active activities.
More...
Public Member Functions | |
| final void | addActivity (Mob mob, Activity activity) |
Adds an activity to the activities group. | |
| void | cleanup () |
| Cleans up the activity when finished. | |
| void | finish () |
| Finishes the activity. | |
| void | forEachActivity (BiConsumer< Mob, Activity > activity) |
| Loops through all the activities. | |
| int | getActiveSize () |
| Gets the size of the activities in this group. | |
| Activity | getActivity (Mob mob) |
| final void | groupMessage (String message) |
| Sends a message to all the players in the group. | |
| final boolean | isActive () |
| Checks if this group is active. | |
| final void | removeActivity (Mob mob) |
Removes an activity from the activities group. | |
| Public Member Functions inherited from com.runehive.content.activity.Activity | |
| Activity (int cooldown, int instance) | |
Constructs a new SequencedMinigame object. | |
| void | add (Mob mob) |
| Adds a mob to the activity. | |
| boolean | canDrinkPotions (Player player) |
| boolean | canEat (Player player, FoodData foodType) |
| boolean | canEquipItem (Player player, Item item, EquipmentType type) |
| boolean | canLogout (Player player) |
| boolean | canSpellCast (Player player) |
| boolean | canTeleport (Player player) |
| Called when the player attempts to teleport. | |
| boolean | canUsePrayer (Player player) |
| boolean | canUseSpecial (Player player) |
| void | cooldown (int cooldown) |
| Applies a cooldown. | |
| ActivityDeathType | deathType () |
| int | getInstance () |
| Gets this activity's instance level. | |
| Optional< Activity_Panel > | getPanel () |
| Gets an optional of the activity panel. | |
| int | getTicks () |
| Gets the current ticks. | |
| abstract ActivityType | getType () |
| void | onDeath (Mob mob) |
| Called when the player die. | |
| boolean | onEvent (Player player, InteractionEvent interactionEvent) |
| void | onLogout (Player player) |
| Called when the player logs out. | |
| void | onRegionChange (Player player) |
| Called when the player changes region. | |
| boolean | onStep (Mob mob) |
| void | remove (Mob mob) |
| Removes a mob from the activity. | |
| void | removeAll (Mob... mobs) |
| Removes all mobs from the activity. | |
| void | sequence () |
| Sequences the activity. | |
| void | setInstance (int instance) |
| void | setPanel (Activity_Panel panel) |
| Sets the activity panel. | |
| void | setPause (boolean pause) |
| Sets the pause state of the activity. | |
| void | update () |
| The update method. | |
Protected Member Functions | |
| GroupActivity (int cooldown, int capacity) | |
Constructs a new GroupActivity object. | |
| void | removeAll () |
| void | start () |
| Starts the next activity stage. | |
| Protected Member Functions inherited from com.runehive.content.activity.Activity | |
| boolean | clickButton (Player player, ClickButtonInteractionEvent event) |
| boolean | clickItem (Player player, ItemInteractionEvent event) |
| boolean | clickNpc (Player player, NpcInteractionEvent event) |
| boolean | clickObject (Player player, ObjectInteractionEvent event) |
| final void | finishCooldown () |
Sets the cooldown flag to FINISH. | |
| Optional<? extends ActivityListener<? extends Activity > > | getListener () |
Gets an Optional of the ActivityListener for this activity. | |
| final boolean | isPaused () |
| Checks if the cooldown is paused. | |
| boolean | itemContainerAction (Player player, ItemContainerInteractionEvent event) |
| final void | pause () |
Sets the cooldown flag to PAUSE. | |
| boolean | pickupItem (Player player, PickupItemInteractionEvent event) |
| final void | resetCooldown () |
| Resets the remaining ticks to the cached cooldown ticks. | |
| void | restart (int delay, Runnable runnable) |
| boolean | useItem (Player player, ItemOnItemInteractionEvent event) |
| boolean | useItem (Player player, ItemOnObjectInteractionEvent event) |
Protected Attributes | |
| final Map< Mob, Activity > | activities |
| A map of activities that handles each mob individually. | |
Static Private Member Functions | |
| static int | getNextInstance () |
| Gets the next instance. | |
Static Private Attributes | |
| static int | nextInstance |
| The next instance level. | |
Additional Inherited Members | |
| Static Public Member Functions inherited from com.runehive.content.activity.Activity | |
| static boolean | evaluate (Mob mob, Predicate< Activity > predicate) |
| static void | forActivity (Mob mob, Consumer< Activity > consumer) |
| static< T extends Activity > Optional< T > | search (Player player, Class< T > clazz) |
| Static Protected Attributes inherited from com.runehive.content.activity.Activity | |
| static final int | FINISH = -1 |
| The 'finish' cooldown id. | |
| static final int | PAUSE = -2 |
| The 'pause' cooldown id. | |
| static final int | START = 0 |
| The 'start' cooldown id. | |
A GroupActivity is an extension of Activity that holds a list of active activities.
Definition at line 16 of file GroupActivity.java.
|
protected |
Constructs a new GroupActivity object.
| cooldown | the initial cooldown in ticks |
Definition at line 29 of file GroupActivity.java.
References com.runehive.content.activity.Activity.cooldown, and getNextInstance().
Adds an activity to the activities group.
| mob | the mob to add |
| activity | the mob's activity |
Definition at line 90 of file GroupActivity.java.
References activities, com.runehive.content.activity.Activity.Activity(), and com.runehive.content.activity.Activity.add().
| void com.runehive.content.activity.GroupActivity.cleanup | ( | ) |
Cleans up the activity when finished.
Reimplemented from com.runehive.content.activity.Activity.
Definition at line 48 of file GroupActivity.java.
References activities.
Referenced by com.runehive.content.activity.lobby.LobbyManager.sequenceActive().
| void com.runehive.content.activity.GroupActivity.finish | ( | ) |
Finishes the activity.
Reimplemented from com.runehive.content.activity.Activity.
Reimplemented in com.runehive.content.activity.impl.pestcontrol.PestControlGame.
Definition at line 40 of file GroupActivity.java.
References activities, and com.runehive.content.activity.Activity.Activity().
Referenced by com.runehive.content.activity.lobby.LobbyManager.sequenceActive().
| void com.runehive.content.activity.GroupActivity.forEachActivity | ( | BiConsumer< Mob, Activity > | activity | ) |
Loops through all the activities.
| activity | the consumer |
Definition at line 80 of file GroupActivity.java.
References activities.
Referenced by com.runehive.content.activity.lobby.LobbyManager.canStart(), com.runehive.content.activity.impl.pestcontrol.PestControlGame.onStart(), and com.runehive.content.activity.impl.pestcontrol.PestControlGame.sequence().
| int com.runehive.content.activity.GroupActivity.getActiveSize | ( | ) |
Gets the size of the activities in this group.
Definition at line 71 of file GroupActivity.java.
References activities.
Referenced by com.runehive.content.activity.lobby.LobbyManager.canStart(), com.runehive.content.activity.impl.pestcontrol.PestControlGame.finished(), com.runehive.content.activity.lobby.LobbyNode.finished(), and com.runehive.content.activity.impl.pestcontrol.PestControlGame.PestControlPanel.update().
Definition at line 123 of file GroupActivity.java.
References activities, and com.runehive.content.activity.Activity.Activity().
|
staticprivate |
Gets the next instance.
Definition at line 132 of file GroupActivity.java.
References nextInstance.
Referenced by GroupActivity().
| final void com.runehive.content.activity.GroupActivity.groupMessage | ( | String | message | ) |
Sends a message to all the players in the group.
| message | the message to send |
Definition at line 116 of file GroupActivity.java.
References activities.
Referenced by com.runehive.content.activity.lobby.LobbyManager.canStart(), com.runehive.content.activity.impl.pestcontrol.PestControlGame.onDeath(), and com.runehive.content.activity.impl.pestcontrol.PestControlGame.onStart().
| final boolean com.runehive.content.activity.GroupActivity.isActive | ( | ) |
Checks if this group is active.
true if there are active activities Definition at line 62 of file GroupActivity.java.
References activities.
| final void com.runehive.content.activity.GroupActivity.removeActivity | ( | Mob | mob | ) |
Removes an activity from the activities group.
| mob | the mob that owns the activity |
Definition at line 102 of file GroupActivity.java.
References activities.
Referenced by com.runehive.content.activity.impl.pestcontrol.PestControlGame.onLogout(), and com.runehive.content.activity.impl.pestcontrol.PestControlGame.onRegionChange().
|
protected |
Definition at line 52 of file GroupActivity.java.
References activities.
Referenced by com.runehive.content.activity.lobby.LobbyManager.sequenceActive().
|
protected |
Starts the next activity stage.
Reimplemented from com.runehive.content.activity.Activity.
Reimplemented in com.runehive.content.activity.lobby.LobbyNode.
Definition at line 35 of file GroupActivity.java.
References activities, and com.runehive.content.activity.Activity.start().
A map of activities that handles each mob individually.
Definition at line 19 of file GroupActivity.java.
Referenced by addActivity(), com.runehive.content.activity.impl.pestcontrol.PestControlGame.agressiveMonsters(), cleanup(), com.runehive.content.activity.lobby.LobbyNode.contains(), finish(), forEachActivity(), getActiveSize(), getActivity(), groupMessage(), isActive(), removeActivity(), removeAll(), and start().
|
staticprivate |
The next instance level.
Definition at line 22 of file GroupActivity.java.
Referenced by getNextInstance().