import { Ins } from "../../Ins";
import { BaseEnemy, enemyType } from "./BaseEnemy";

export class Mazarine extends BaseEnemy{
    constructor(){
        super();
    }

    addToViewPort(){
        var that = this;
        super.addToViewPort();
        that.setBody("d2e18081-ae61-4365-b2a7-ae4de2e4d731");
        that.hitW = 100;
        that.hitH = 70;
        that.health = 10;
        that.speedVector.y = 1;
        that.speedY = 3;
        that.y = -80;
        that.x = Math.floor(Math.random()*Ins.stageW*2/4+Ins.stageW/4);
        that.enemyType = enemyType.normal;
    }

    updateSelf(){
        super.updateSelf();
        this.worldTime++;
        if(this.worldTime%70 == 0){
            this.worldTime = 0;
            this.creareThreeSword();
        }
    }
}