1. 新增SingletonModuleComp中的已完成引导记录数组finish_guides 2. 创建GuideComp引导组件基础框架 3. 在角色控制器预制体中添加引导节点与手势图标节点 4. 新增guide和GuideComp相关的meta配置文件
48 lines
1.2 KiB
TypeScript
48 lines
1.2 KiB
TypeScript
|
|
import { mLogger } from "../common/Logger";
|
|
import { _decorator, Animation, AnimationClip, EventTouch, Label, Node, NodeEventType, Sprite, SpriteAtlas, Tween, tween, UIOpacity, Vec3, resources, Light, UITransform, Widget, CCInteger } from "cc";
|
|
import { ecs } from "../../../../extensions/oops-plugin-framework/assets/libs/ecs/ECS";
|
|
import { CCComp } from "../../../../extensions/oops-plugin-framework/assets/module/common/CCComp";
|
|
|
|
|
|
|
|
|
|
const { ccclass, property } = _decorator;
|
|
|
|
@ccclass('GuideComp')
|
|
@ecs.register('GuideComp', false)
|
|
export class GuideComp extends CCComp {
|
|
/** 是否开启调试日志 */
|
|
private debugMode: boolean = true;
|
|
|
|
// ======================== 编辑器绑定节点 ========================
|
|
|
|
/** 手势图标节点 */
|
|
@property(Node)
|
|
hand: Node = null!
|
|
/** 手势图标节点 */
|
|
@property({ type: CCInteger })
|
|
guide_id: number = 0
|
|
|
|
|
|
onLoad() {
|
|
|
|
|
|
}
|
|
/** 组件销毁时解绑所有事件,防止残留回调 */
|
|
onDestroy() {
|
|
|
|
}
|
|
|
|
/** 外部初始化入口(由 MissionGuideComp 调用) */
|
|
init() {
|
|
|
|
}
|
|
|
|
|
|
/** ECS 组件移除时的释放钩子:销毁节点 */
|
|
reset() {
|
|
this.node.destroy();
|
|
}
|
|
}
|