伤害系统有问题,打算放弃
This commit is contained in:
17
assets/script/game/damage/DamageText.ts
Normal file
17
assets/script/game/damage/DamageText.ts
Normal file
@@ -0,0 +1,17 @@
|
||||
import { _decorator, Component, Label, ParticleSystem } from "cc";
|
||||
const { ccclass, property } = _decorator;
|
||||
|
||||
@ccclass('DamageText')
|
||||
export class DamageText extends Component {
|
||||
@property(Label)
|
||||
label: Label = null!;
|
||||
|
||||
@property(ParticleSystem)
|
||||
critEffect: ParticleSystem = null!;
|
||||
|
||||
playEffect(isCrit: boolean) {
|
||||
if (isCrit && this.critEffect) {
|
||||
this.critEffect.play();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user