Added cryp avatar hash and fixed some animations

This commit is contained in:
Mashy
2019-01-04 18:24:01 +10:00
parent 9fa2a94ade
commit 2ae764a3a3
6 changed files with 53 additions and 26 deletions
+14 -2
View File
@@ -35,11 +35,23 @@ class CombatSkills extends Phaser.GameObjects.Group {
}
Heal(isAlly, castLocation) {
this.genericHeal(isAlly, castLocation);
}
Triage(isAlly, castLocation) {
this.genericHeal(isAlly, castLocation);
}
TriageTick(isAlly, castLocation) {
this.genericHeal(isAlly, castLocation);
}
genericHeal(isAlly, castLocation) {
// const { sourceX, sourceY } = getCrypPosition(sourcePos, 0);
const lifespan = DELAYS.ANIMATION_DURATION;
const colour = randomColour();
const particles = this.scene.add.particles(colour);
const x = isAlly ? COMBAT.width() * 0.7 : COMBAT.width() * 0.3;
const x = isAlly ? COMBAT.width() * 0.3 : COMBAT.width() * 0.7;
const emitter2 = particles.createEmitter({
x: castLocation.x,
@@ -79,7 +91,7 @@ class CombatSkills extends Phaser.GameObjects.Group {
Block(isAlly) {
const lifespan = DELAYS.ANIMATION_DURATION;
const colour = randomColour();
const x = isAlly ? COMBAT.width() * 0.7 : COMBAT.width() * 0.3;
const x = isAlly ? COMBAT.width() * 0.3 : COMBAT.width() * 0.7;
const emitter1 = this.scene.add.particles(colour).createEmitter({
x,
y: COMBAT.height() * 0.4,