RuneHive-Game
Loading...
Searching...
No Matches
Trap.java
Go to the documentation of this file.
1package com.runehive.content.skill.impl.hunter.trap;
2
3import com.runehive.game.world.entity.mob.player.Player;
4import com.runehive.game.world.object.GameObject;
5
6public class Trap {
7
8 /** The possible states a trap can be in */
9 public enum TrapState {
11 }
12
13 /** The WorldObject linked to this HunterObject */
15
16 /** The amount of ticks this object should stay for */
17 private int ticks;
18
19 /** This trap's state */
21
22 /** Reconstructs a new Trap */
23 Trap(GameObject object, TrapState state, int ticks, Player owner) {
24 this.gameObject = object;
25 this.trapState = state;
26 this.ticks = ticks;
27 this.player = owner;
28 }
29
30 /** Gets the GameObject */
32 return gameObject;
33 }
34
35 /** @return the ticks */
36 public int getTicks() {
37 return ticks;
38 }
39
40 /** Gets a trap's state */
42 return trapState;
43 }
44
45 /** the ticks to set */
46 public void setTicks(int ticks) {
47 this.ticks = ticks;
48 }
49
50 private Player player;
51
52 public Player getOwner() {
53 return player;
54 }
55
56 public void setOwner(Player player) {
57 this.player = player;
58 }
59}
GameObject getGameObject()
Gets the GameObject.
Definition Trap.java:31
int ticks
The amount of ticks this object should stay for.
Definition Trap.java:17
TrapState trapState
This trap's state.
Definition Trap.java:20
TrapState getTrapState()
Gets a trap's state.
Definition Trap.java:41
GameObject gameObject
The WorldObject linked to this HunterObject.
Definition Trap.java:14
void setTicks(int ticks)
the ticks to set
Definition Trap.java:46
Trap(GameObject object, TrapState state, int ticks, Player owner)
Reconstructs a new Trap.
Definition Trap.java:23
This class represents a character controlled by a player.
Definition Player.java:125
The possible states a trap can be in.
Definition Trap.java:9