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

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

    addToViewPort(){
        super.addToViewPort();
        var that = this;
        that.setBody("230fd63e-fb9f-4a6c-bc42-25bc4b7259f8");
        that.y = - 60;
        that.hitW = 92;
        that.hitH = 42;
        that.health = 14;
        that.speedVector.y = 1;
        that.speedY = 4;
        that.x = Math.floor(Math.random()*engine.gameStage.width/4*2+engine.gameStage.width/4);
        that.enemyType = enemyType.normal;
    }

    updateSelf(){
        super.updateSelf();
        this.worldTime++;
        if(this.worldTime%50===0){
            this.createTwoSword();
        }
    }


}