BlockSkillBase.ts
1.03 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
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
}