refactor(hero): 重构英雄属性系统与受击特效

将HeroAttrSystem从HeroAttrsComp中分离为独立文件
删除废弃的05-outline-glow资源文件
优化TalComp.ts中的代码格式
使用FlashSprite替换旧的受击特效实现
This commit is contained in:
2025-11-15 10:52:39 +08:00
parent a468c6c774
commit 4af9a6fd9e
19 changed files with 144 additions and 620 deletions

View File

@@ -1,29 +0,0 @@
import { _decorator, color, Component, Material, Node, Sprite } from 'cc';
const { ccclass, property } = _decorator;
@ccclass('FlashSprite')
export class FlashSprite extends Component {
@property(Material)
hitFlashMaterial: Material;
orginalFlashMaterial: Material;
sprite: Sprite;
start() {
this.sprite = this.node.getComponent(Sprite);
this.orginalFlashMaterial = this.sprite.getRenderMaterial(0);
}
update(deltaTime: number) {
}
public clickFlash() {
this.sprite.setSharedMaterial(this.hitFlashMaterial, 0);
this.scheduleOnce(() => {
this.sprite.setSharedMaterial(this.orginalFlashMaterial, 0);
}, 0.1);
}
}

View File

@@ -1,9 +0,0 @@
{
"ver": "4.0.24",
"importer": "typescript",
"imported": true,
"uuid": "df953176-a9fa-4f3e-865e-7956fccc4c52",
"files": [],
"subMetas": {},
"userData": {}
}