Files
heros/assets/script/game/map/view/map/layer/SkillLayer.ts
2025-06-08 23:16:40 +08:00

48 lines
1.3 KiB
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/*
* @Author: dgflash
* @Date: 2022-08-04 15:22:33
* @LastEditors: dgflash
* @LastEditTime: 2023-05-12 18:04:45
*/
import { Component, Node, Prefab, _decorator ,instantiate} from 'cc';
import { Timer } from '../../../../../../../extensions/oops-plugin-framework/assets/core/common/timer/Timer';
import {oops} from "../../../../../../../extensions/oops-plugin-framework/assets/core/Oops";
import { BoxSet } from '../../../../common/config/BoxSet';
const { ccclass, property } = _decorator;
/**
* 物体层
* 注:
* 1、这里的深度排序如果有性能问题可考虑修改为非每帧排序
* 2、如果全3D世界显示角色相关显示对象则不需要2D深度排序只引用2D地图上的位置信息
*/
@ccclass('SkillLayer')
export default class SkillLayer extends Component {
private timer: Timer = new Timer(0.2);
@property(Prefab)
light: Prefab = null;
onLoad(){
// oops.message.on("do_use_skill", this.doSkill, this);
}
doSkill(){
// console.log("doSkill")
}
update(dt: number) {
// this.timer.update(dt)
// if (this.timer.update(dt))
// this.node.children.sort(this.zIndexSort);
}
start(){
// console.log("SkillLayer start")
}
public clear() {
this.node.children.forEach(n => {
});
}
}