import { _decorator, Component, Node } from 'cc';
import { EventDispatcher } from '../../../../engines/events/EventDispatcher';
import { WeaponBase } from '../weapons/WeaponBase';
const { ccclass, property } = _decorator;

export class SkillBase extends EventDispatcher{
    public static SKILL_COMPLETE:string="SKILL_COMPLETE";
    
    config:any;

    /**
     * 使用技能
     * @param weapon 
     */
    UseSkill(weapon:WeaponBase):void{

    }

    /**
     * 更新
     * @param dt 
     */
    Update(dt:number):void{
        
    }
    
    /**
     * 销毁
     */
    Dispose():void{
        
    }
    /**
     * 射击间隔
     */
    get fireInterval():number{
        return this.config.fireInterval;
    }

    get damage():number{
        return this.config.damage;
    }

    get time():number{
        return this.config.time;
    }
    
    /**
     * 是否阻断玩家操作
     */
    get unController():boolean{
        return this.config.unController;
    }
}