- 移除 timedCom 组件中未使用的 cd 和 ap 属性 - 重命名 dead 组件为 oneCom 并重构动画结束销毁逻辑,避免内存泄漏 - 为部分技能添加准备动画(readyAnm)配置 - 新增 uplv 升级动画特效预制体 - 统一特效生成接口,支持基于动画结束或定时销毁两种模式 - 清理 HeroViewComp 中未使用的导入和方法
24 lines
463 B
TypeScript
24 lines
463 B
TypeScript
import { _decorator, Component, Node } from 'cc';
|
|
import { SkillSet } from '../common/config/SkillSet';
|
|
import { smc } from '../common/SingletonModuleComp';
|
|
const { ccclass, property } = _decorator;
|
|
|
|
@ccclass('timedCom')
|
|
export class timedCom extends Component {
|
|
time = 0.3;
|
|
|
|
start() {
|
|
|
|
}
|
|
|
|
update(deltaTime: number) {
|
|
this.time -= deltaTime;
|
|
if(this.time <= 0)
|
|
{
|
|
this.node.destroy()
|
|
}
|
|
}
|
|
}
|
|
|
|
|