|
RuneHive-Game
|
Handles going through a door. More...
Public Member Functions | |
| DoorAction (Player player, GameObject door, Position destination, Direction face) | |
| DoorAction (Player player, GameObject door, Position destination, Direction face, Predicate< Player > condition, String message) | |
| void | execute () |
| A function representing the unit of work that will be carried out. | |
| String | getName () |
| Gets the name of this action. | |
| WalkablePolicy | getWalkablePolicy () |
| Gets the WalkablePolicy of this action. | |
| boolean | prioritized () |
| Determines if this action is prioritized. | |
| Public Member Functions inherited from com.runehive.game.action.Action< T extends Mob > | |
| Action (T mob, int delay) | |
Creates a new Action randomevent. | |
| Action (T mob, int delay, boolean instant) | |
Creates a new Action randomevent. | |
| boolean | cancellableInProgress () |
| T | getMob () |
| Gets the player. | |
| Public Member Functions inherited from com.runehive.game.task.Task | |
| Task | attach (Object newKey) |
| Attaches a new key. | |
| synchronized final void | cancel () |
| Cancels all subsequent executions. | |
| synchronized final void | cancel (boolean logout) |
| Cancels all subsequent executions. | |
| boolean | canRun () |
| Determines if the task can be ran. | |
| Optional< Object > | getAttachment () |
| String | getCreationStackTraceStr () |
| int | getDelay () |
| Long | getElapsedTimeFromRunStartTime () |
| Optional< Long > | getRunStartTime () |
| long | getTaskCreationTime () |
| String | getTaskId () |
| boolean | isInstant () |
| boolean | isRunning () |
| void | setDelay (int delay) |
| Sets the cyclic delay. | |
| void | setExecutionTime () |
| Task (boolean instant, int delay) | |
Creates a new Task. | |
| Task (int delay) | |
Creates a new Task that doesn't execute instantly. | |
Protected Member Functions | |
| boolean | canSchedule () |
| A function executed on registration. | |
| void | onCancel (boolean logout) |
| A function executed on cancellation. | |
| Protected Member Functions inherited from com.runehive.game.task.Task | |
| void | baseExecute () |
| void | onSchedule () |
| A function executed on registration. | |
Private Attributes | |
| final Predicate< Player > | condition |
| int | count |
| final GameObject | door |
| final Direction | face |
| final String | message |
| final Position | position |
Additional Inherited Members | |
| Package Functions inherited from com.runehive.game.task.Task | |
| void | onException (Exception e) |
| A function executed on thrown exceptions. | |
| void | onLoop () |
| A function executed when iterated over. | |
| final synchronized void | process () |
| synchronized void | setRunning (boolean running) |
Handles going through a door.
(Cheap fix doesn't actually open the door)
Definition at line 20 of file DoorAction.java.
| com.runehive.game.action.impl.DoorAction.DoorAction | ( | Player | player, |
| GameObject | door, | ||
| Position | destination, | ||
| Direction | face ) |
Definition at line 28 of file DoorAction.java.
| com.runehive.game.action.impl.DoorAction.DoorAction | ( | Player | player, |
| GameObject | door, | ||
| Position | destination, | ||
| Direction | face, | ||
| Predicate< Player > | condition, | ||
| String | message ) |
|
protected |
A function executed on registration.
Reimplemented from com.runehive.game.task.Task.
Definition at line 43 of file DoorAction.java.
References condition, com.runehive.game.action.Action< T extends Mob >.getMob(), message, and com.runehive.util.MessageColor.RED.
| void com.runehive.game.action.impl.DoorAction.execute | ( | ) |
A function representing the unit of work that will be carried out.
Reimplemented from com.runehive.game.task.Task.
Definition at line 52 of file DoorAction.java.
References com.runehive.game.task.Task.cancel(), count, door, face, com.runehive.game.action.Action< T extends Mob >.getMob(), com.runehive.game.world.entity.mob.Direction.getOppositeDirection(), position, and com.runehive.util.Utility.within().
| String com.runehive.game.action.impl.DoorAction.getName | ( | ) |
Gets the name of this action.
Reimplemented from com.runehive.game.action.Action< T extends Mob >.
Definition at line 80 of file DoorAction.java.
| WalkablePolicy com.runehive.game.action.impl.DoorAction.getWalkablePolicy | ( | ) |
Gets the WalkablePolicy of this action.
Reimplemented from com.runehive.game.action.Action< T extends Mob >.
Definition at line 90 of file DoorAction.java.
References com.runehive.game.action.policy.WalkablePolicy.NON_WALKABLE.
|
protected |
A function executed on cancellation.
Reimplemented from com.runehive.game.task.Task.
Definition at line 75 of file DoorAction.java.
References com.runehive.game.action.Action< T extends Mob >.getMob().
| boolean com.runehive.game.action.impl.DoorAction.prioritized | ( | ) |
Determines if this action is prioritized.
When making an action prioritized, the next action will be ignored if not queued.
true if this action is prioritized, false otherwise. Reimplemented from com.runehive.game.action.Action< T extends Mob >.
Definition at line 85 of file DoorAction.java.
|
private |
Definition at line 24 of file DoorAction.java.
Referenced by canSchedule(), and DoorAction().
|
private |
Definition at line 21 of file DoorAction.java.
Referenced by execute().
|
private |
Definition at line 22 of file DoorAction.java.
Referenced by DoorAction(), DoorAction(), and execute().
|
private |
Definition at line 26 of file DoorAction.java.
Referenced by DoorAction(), DoorAction(), and execute().
|
private |
Definition at line 25 of file DoorAction.java.
Referenced by canSchedule(), and DoorAction().
|
private |
Definition at line 23 of file DoorAction.java.
Referenced by execute().