import { EffectAnim } from "../EffectAnim";

export class EffectManager{
    private static _ins:EffectManager = null;
    static get Ins(){
        if(!this._ins){
            this._ins = new EffectManager();
        }
        return this._ins;
    }

    createEffect(view:FYGE.Container,titleName:string,effectFrame:number,maxCount:number,x:number,y:number,callBack?:Function,arg?:any,loop=false,maxRepeatCount=0){
        var effect = new EffectAnim(titleName,effectFrame,maxCount,x,y,callBack,arg,loop,maxRepeatCount);
        view.addChild(effect);
        return effect;
    }
}