伤害系统有问题,打算放弃

This commit is contained in:
2025-02-03 15:03:45 +08:00
parent 8f2612bda2
commit 060046a6a6
18 changed files with 549 additions and 112 deletions

View 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();
}
}
}