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

export class RedElite extends BaseEnemy{
    constructor(){
        super();
    }
    canShot = true;
    
    addToViewPort(){
        var that = this;
        super.addToViewPort();
        that.setBody("bb290216-7491-4cff-93f3-61cffe363996");
        that.hitW = 158;
        that.hitH = 100;
        that.health = 30;
        that.speedVector.y = 1;  
        that.speedY = 3;
        that.y = -110;
        that.x = Math.floor(Math.random()*Ins.stageW*2/4+Ins.stageW/4);
        that.enemyType = enemyType.elite;
    }

    updateSelf(){
        var that = this;
        super.updateSelf();
        that.worldTime++;
        if(that.worldTime%100 == 0){
            that.createSplitBullet();
        }
    }
}