This commit is contained in:
2024-12-30 10:57:08 +08:00
parent 2e5e415c81
commit ed12d4d428
5 changed files with 34 additions and 61 deletions

View File

@@ -0,0 +1,18 @@
import { _decorator, Component, Node } from 'cc';
import { HeroViewComp } from './HeroViewComp';
const { ccclass, property } = _decorator;
@ccclass('BuffComp')
export class BuffComp extends Component {
heroView: any=null;
buff_node:any=null;
start() {
this.heroView = this.node.getComponent(HeroViewComp);
}
update(deltaTime: number) {
}
}

View File

@@ -0,0 +1,9 @@
{
"ver": "4.0.23",
"importer": "typescript",
"imported": true,
"uuid": "7eb34351-e975-447f-bf07-0a2e5e00a2e6",
"files": [],
"subMetas": {},
"userData": {}
}

View File

@@ -1,53 +0,0 @@
/*
* @Author: dgflash
* @Date: 2021-11-18 17:42:59
* @LastEditors: dgflash
* @LastEditTime: 2022-08-17 12:36:18
*/
import { _decorator,Sprite,Color, Prefab, instantiate} from "cc";
import { ecs } from "../../../../extensions/oops-plugin-framework/assets/libs/ecs/ECS";
import { CCComp } from "../../../../extensions/oops-plugin-framework/assets/module/common/CCComp";
import { HeroSpine } from "./HeroSpine";
import { Hero } from "./Hero";
import { HeroModelComp } from "./HeroModelComp";
import { BoxSet } from "../common/config/BoxSet";
import { smc } from "../common/SingletonModuleComp";
import { oops } from "../../../../extensions/oops-plugin-framework/assets/core/Oops";
import { Skill } from "../skills/Skill";
import { Timer } from "../../../../extensions/oops-plugin-framework/assets/core/common/timer/Timer";
import { SkillCom } from "../skills/SkillCom";
import { BoxRangComp } from "./BoxRangComp";
import { Tooltip } from "../skills/Tooltip";
import { HeroViewComp } from "./HeroViewComp";
const { ccclass, property } = _decorator;
/** 角色显示组件 */
@ccclass('HeroBuffComp') // 定义为 Cocos Creator 组件
@ecs.register('HeroBuff', false) // 定义为 ECS 组件
export class HeroBuffComp extends CCComp {
/** 角色动画 */
as: HeroSpine = null!;
mv!: HeroViewComp;
timer:Timer = new Timer(0.1);
buffs:any=[];
group:number=BoxSet.HERO;
/**
skill_uuid:number=0;
atk:number=0;
hp:number=0;
shield:number=0;
time:number=0;
**/
onLoad() {
this.as = this.node.getComponent(HeroSpine);
this.mv= this.getComponent(HeroViewComp);
} /** 视图层逻辑代码分离演示 */
start () {
}
}

View File

@@ -1 +0,0 @@
{"ver":"4.0.23","importer":"typescript","imported":true,"uuid":"56aac6b6-8d82-4bc5-8cb1-d227489ce0c8","files":[],"subMetas":{},"userData":{}}