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

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

    addToViewPort(){
        var that = this;
        super.addToViewPort();
        that.setBody("ed542094-674b-4ca6-9b4d-3c89e4bc46cc");
        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()*engine.gameStage.width*2/4+engine.gameStage.width/4);
        that.enemyType = enemyType.normal;
    }

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