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

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

    addToViewPort(){
        super.addToViewPort();
        var that = this;
        that.setBody("2746f9f2-f184-4a7d-979e-2521167459bb");
        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()*Ins.stageW/4*2+Ins.stageW/4);
        that.enemyType = enemyType.normal;
    }

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


}