feat(guide): 新增新手引导相关组件与配置
1. 新增SingletonModuleComp中的已完成引导记录数组finish_guides 2. 创建GuideComp引导组件基础框架 3. 在角色控制器预制体中添加引导节点与手势图标节点 4. 新增guide和GuideComp相关的meta配置文件
This commit is contained in:
47
assets/script/game/map/GuideComp.ts
Normal file
47
assets/script/game/map/GuideComp.ts
Normal file
@@ -0,0 +1,47 @@
|
||||
|
||||
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();
|
||||
}
|
||||
}
|
||||
9
assets/script/game/map/GuideComp.ts.meta
Normal file
9
assets/script/game/map/GuideComp.ts.meta
Normal file
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"ver": "4.0.24",
|
||||
"importer": "typescript",
|
||||
"imported": true,
|
||||
"uuid": "25122cff-7274-4f86-9f74-f82258b39fab",
|
||||
"files": [],
|
||||
"subMetas": {},
|
||||
"userData": {}
|
||||
}
|
||||
Reference in New Issue
Block a user