import { BlockSkill } from "../../BattleConst"; import { BlockData } from "../BlockData"; /**格子技能,只有一个实例,复制格子时,owner会指向新的格子 */ export class BlockSkillBase { owner: BlockData; protected _skillId: BlockSkill; get skillId(): BlockSkill { return this._skillId; } protected _skillImg: string = ''; get skillImg(): string { return this._skillImg; } private _enable: boolean = true; get enable(): boolean { return this._enable; } // protected _skillSpine: string = ''; // get skillSpine(): string { return this._skillSpine; } constructor(skillId: BlockSkill, $owner: BlockData) { this.owner = $owner; this._skillId = skillId; } //#region life cycle onDead() { } /**复制格子时,会重新触发一次 */ onAddedToBlock() { } onCollisionToBall() { } destroy() { } //#endregion //#region public setSkillEnable(value: boolean) { this._enable = value; } //#endregion }