feat: 新增排行榜UI界面和相关配置
- 添加 RanksComp 组件用于实现排行榜功能 - 在 GameUIConfig 中注册排行榜界面配置 - 创建排行榜界面元数据文件
This commit is contained in:
@@ -17,6 +17,7 @@ export enum UIID {
|
||||
Victory,
|
||||
IBox,
|
||||
Notity,
|
||||
Ranks,
|
||||
}
|
||||
|
||||
/** 打开界面方式的配置数据 */
|
||||
@@ -27,4 +28,5 @@ export var UIConfigData: { [key: number]: UIConfig } = {
|
||||
[UIID.Victory]: { layer: LayerType.UI, prefab: "gui/element/victory" },
|
||||
[UIID.IBox]: { layer: LayerType.UI, prefab: "gui/element/ibox" },
|
||||
[UIID.Notity]: { layer: LayerType.UI, prefab: "gui/element/notity" },
|
||||
[UIID.Ranks]: { layer: LayerType.UI, prefab: "gui/element/ranks" },
|
||||
}
|
||||
46
assets/script/game/map/RanksComp.ts
Normal file
46
assets/script/game/map/RanksComp.ts
Normal file
@@ -0,0 +1,46 @@
|
||||
import { _decorator, Animation, AnimationClip, Button, Event, Label, Node, NodeEventType, Sprite, resources, Prefab } 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 { HeroInfo } from "../common/config/heroSet";
|
||||
import { HeroAttrsComp } from "../hero/HeroAttrsComp";
|
||||
import { Hero } from "../hero/Hero";
|
||||
import { oops } from "db://oops-framework/core/Oops";
|
||||
import { UIID } from "../common/config/GameUIConfig";
|
||||
import { mLogger } from "../common/Logger";
|
||||
|
||||
const {property, ccclass } = _decorator;
|
||||
|
||||
/** 视图层对象 */
|
||||
@ccclass('RanksComp')
|
||||
@ecs.register('RanksComp', false)
|
||||
export class RanksComp extends CCComp {
|
||||
@property(Node)
|
||||
top1_node=null!
|
||||
@property(Node)
|
||||
top2_node=null!
|
||||
@property(Node)
|
||||
top3_node=null!
|
||||
@property(Node)
|
||||
lists_node=null!
|
||||
@property(Prefab)
|
||||
list_prefab=null!
|
||||
@property(Prefab)
|
||||
melist_prefab=null!
|
||||
|
||||
onLoad() {
|
||||
|
||||
}
|
||||
onAdded(args: any) {
|
||||
|
||||
}
|
||||
onDestroy() {
|
||||
|
||||
}
|
||||
|
||||
|
||||
/** 视图对象通过 ecs.Entity.remove(ModuleViewComp) 删除组件是触发组件处理自定义释放逻辑 */
|
||||
reset() {
|
||||
|
||||
this.node.destroy();
|
||||
}
|
||||
}
|
||||
9
assets/script/game/map/RanksComp.ts.meta
Normal file
9
assets/script/game/map/RanksComp.ts.meta
Normal file
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"ver": "4.0.24",
|
||||
"importer": "typescript",
|
||||
"imported": true,
|
||||
"uuid": "9eafe7fe-fbde-4312-a07b-f2130f0a6539",
|
||||
"files": [],
|
||||
"subMetas": {},
|
||||
"userData": {}
|
||||
}
|
||||
Reference in New Issue
Block a user