import * as THREE from 'three';
import { Player } from './Player';

export abstract class Weapon {
  mesh: THREE.Group;
  cooldown1 = 0;
  cooldown2 = 0;
  cooldown3 = 0;
  COOLDOWN1_TIME = 0;
  COOLDOWN2_TIME = 0;
  COOLDOWN3_TIME = 0;

  constructor() {
    this.mesh = new THREE.Group();
  }

  reduceCooldowns(tpf: number) {
    if (this.cooldown1 > 0) this.cooldown1 -= tpf;
    if (this.cooldown2 > 0) this.cooldown2 -= tpf;
    if (this.cooldown3 > 0) this.cooldown3 -= tpf;
  }

  abstract skill1(groundPoint: THREE.Vector3, player: Player): void;
  abstract skill2(groundPoint: THREE.Vector3, player: Player): void;
}
