|
RuneHive-Game
|
Handles the tutorial activity. More...
Public Member Functions | |
| void | cleanup () |
| Cleans up the activity when finished. | |
| void | cooldown (int cooldown) |
| Applies a cooldown. | |
| void | finish () |
| Finishes the activity. | |
| ActivityType | getType () |
| void | onLogout (Player player) |
| Called when the player logs out. | |
| void | onRegionChange (Player player) |
| Called when the player changes region. | |
| 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) |
| 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. | |
| void | onDeath (Mob mob) |
| Called when the player die. | |
| boolean | onEvent (Player player, InteractionEvent interactionEvent) |
| 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. | |
Static Public Member Functions | |
| static TutorialActivity | create (Player player) |
| Creates the tutorial activity for the player. | |
| 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) |
Protected Member Functions | |
| boolean | clickButton (Player player, ClickButtonInteractionEvent event) |
| void | start () |
| Starts the next activity stage. | |
| Protected Member Functions inherited from com.runehive.content.activity.Activity | |
| 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) |
Private Member Functions | |
| void | next () |
| TutorialActivity (Player player) | |
Constructs a new TutorialActivity. | |
| void | update (String... strings) |
| Updates the activity panel. | |
Private Attributes | |
| boolean | completed = false |
| final DialogueFactory | factory |
| The dialogue factory for this activity. | |
| Npc | guide |
| The guide npc for the activity. | |
| final Player | player |
| The player doing the tutorial activity. | |
| int | stage |
| The current activity stage. | |
Additional Inherited Members | |
| 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. | |
Handles the tutorial activity.
Definition at line 36 of file TutorialActivity.java.
|
private |
Constructs a new TutorialActivity.
Definition at line 53 of file TutorialActivity.java.
References player.
Referenced by create().
| void com.runehive.game.action.impl.TutorialActivity.cleanup | ( | ) |
Cleans up the activity when finished.
Reimplemented from com.runehive.content.activity.Activity.
Definition at line 340 of file TutorialActivity.java.
References guide.
Referenced by finish(), and onLogout().
|
protected |
Reimplemented from com.runehive.content.activity.Activity.
Definition at line 363 of file TutorialActivity.java.
References factory, com.runehive.content.skill.impl.magic.teleport.TeleportType.FAVORITES, next(), com.runehive.content.teleport.TeleportHandler.open(), player, stage, start(), and com.runehive.Config.WRENCH_TAB.
| void com.runehive.game.action.impl.TutorialActivity.cooldown | ( | int | cooldown | ) |
Applies a cooldown.
Reimplemented from com.runehive.content.activity.Activity.
Definition at line 81 of file TutorialActivity.java.
References cooldown(), and factory.
Referenced by cooldown(), and create().
|
static |
Creates the tutorial activity for the player.
Definition at line 61 of file TutorialActivity.java.
References com.runehive.content.activity.Activity.add(), cooldown(), com.runehive.Config.DEFAULT_POSITION, player, and TutorialActivity().
| void com.runehive.game.action.impl.TutorialActivity.finish | ( | ) |
Finishes the activity.
Reimplemented from com.runehive.content.activity.Activity.
Definition at line 345 of file TutorialActivity.java.
References com.runehive.content.achievement.AchievementHandler.activate(), cleanup(), com.runehive.content.activity.panel.ActivityPanel.clear(), com.runehive.content.achievement.AchievementKey.COMPLETE_TUTORIAL, completed, factory, com.runehive.content.StarterKit.open(), and player.
Referenced by start().
| ActivityType com.runehive.game.action.impl.TutorialActivity.getType | ( | ) |
Reimplemented from com.runehive.content.activity.Activity.
Definition at line 423 of file TutorialActivity.java.
References com.runehive.content.activity.ActivityType.TUTORIAL.
|
private |
Definition at line 86 of file TutorialActivity.java.
References com.runehive.content.activity.Activity.cooldown, and com.runehive.content.activity.Activity.update().
Referenced by clickButton(), and start().
| void com.runehive.game.action.impl.TutorialActivity.onLogout | ( | Player | player | ) |
Called when the player logs out.
Reimplemented from com.runehive.content.activity.Activity.
Definition at line 412 of file TutorialActivity.java.
References cleanup(), com.runehive.Config.DEFAULT_POSITION, and player.
| void com.runehive.game.action.impl.TutorialActivity.onRegionChange | ( | Player | player | ) |
Called when the player changes region.
Reimplemented from com.runehive.content.activity.Activity.
Definition at line 408 of file TutorialActivity.java.
References player.
|
protected |
Starts the next activity stage.
Reimplemented from com.runehive.content.activity.Activity.
Definition at line 92 of file TutorialActivity.java.
References com.runehive.content.activity.Activity.add(), completed, com.runehive.content.activity.Activity.cooldown, com.runehive.game.world.entity.Entity.DEFAULT_INSTANCE, com.runehive.Config.DEFAULT_POSITION, com.runehive.game.world.entity.mob.Direction.EAST, factory, finish(), guide, next(), com.runehive.game.world.entity.mob.Direction.NORTH, com.runehive.content.activity.Activity.pause(), player, com.runehive.Config.QUEST_TAB, com.runehive.content.activity.Activity.setInstance(), com.runehive.game.world.entity.mob.Direction.SOUTH, stage, com.runehive.content.skill.impl.magic.teleport.Teleportation.teleport(), com.runehive.content.activity.Activity.update(), com.runehive.game.world.entity.mob.Direction.WEST, and com.runehive.Config.WRENCH_TAB.
Referenced by clickButton().
|
private |
Updates the activity panel.
Definition at line 76 of file TutorialActivity.java.
References com.runehive.util.Utility.getPercentageAmount(), player, stage, and com.runehive.content.activity.panel.ActivityPanel.update().
|
private |
Definition at line 50 of file TutorialActivity.java.
|
private |
The dialogue factory for this activity.
Definition at line 48 of file TutorialActivity.java.
Referenced by clickButton(), cooldown(), finish(), and start().
|
private |
The guide npc for the activity.
Definition at line 42 of file TutorialActivity.java.
|
private |
The player doing the tutorial activity.
Definition at line 39 of file TutorialActivity.java.
Referenced by clickButton(), create(), finish(), onLogout(), onRegionChange(), start(), TutorialActivity(), and update().
|
private |
The current activity stage.
Definition at line 45 of file TutorialActivity.java.
Referenced by clickButton(), start(), and update().