RuneHive-Game
Loading...
Searching...
No Matches
AbyssalTentacleWhip.java
Go to the documentation of this file.
1package com.runehive.game.world.entity.combat.strategy.player.special.melee;
2
3import com.runehive.game.Animation;
4import com.runehive.game.Graphic;
5import com.runehive.game.UpdatePriority;
6import com.runehive.game.world.entity.combat.hit.CombatHit;
7import com.runehive.game.world.entity.combat.hit.Hit;
8import com.runehive.game.world.entity.combat.strategy.player.PlayerMeleeStrategy;
9import com.runehive.game.world.entity.mob.Mob;
10import com.runehive.game.world.entity.mob.player.Player;
11
12/**
13 * @author Daniel
14 */
16 private static final Animation ANIMATION = new Animation(1658, UpdatePriority.HIGH);
17 private static final Graphic GRAPHIC = new Graphic(181, 100);
18 private static final AbyssalTentacleWhip INSTANCE = new AbyssalTentacleWhip();
19
20 @Override
21 public void attack(Player attacker, Mob defender, Hit hit) {
22 super.attack(attacker, defender, hit);
23 defender.graphic(GRAPHIC);
24 }
25
26 @Override
27 public void start(Player attacker, Mob defender, Hit[] hits) {
28 super.start(attacker, defender, hits);
29 //TODO EFFECT
30 }
31
32 @Override
33 public CombatHit[] getHits(Player attacker, Mob defender) {
34 return new CombatHit[]{nextMeleeHit(attacker, defender)};
35 }
36
37 @Override
38 public Animation getAttackAnimation(Player attacker, Mob defender) {
39 return ANIMATION;
40 }
41
42 public static AbyssalTentacleWhip get() {
43 return INSTANCE;
44 }
45
46}
Class that models a single animation used by an entity.
Represents a single graphic that can be used by entities.
Definition Graphic.java:10
A wrapper for a Hit object, adding additional variables for hit and hitsplat delays.
A Hit object holds the damage amount and hitsplat data.
Definition Hit.java:10
Handles the mob class.
Definition Mob.java:66
Optional< Graphic > graphic
Definition Mob.java:91
This class represents a character controlled by a player.
Definition Player.java:125
Represents different priorities for updating.