feat(guide): 新增新手引导相关组件与配置
1. 新增SingletonModuleComp中的已完成引导记录数组finish_guides 2. 创建GuideComp引导组件基础框架 3. 在角色控制器预制体中添加引导节点与手势图标节点 4. 新增guide和GuideComp相关的meta配置文件
This commit is contained in:
@@ -22,26 +22,26 @@
|
||||
"__id__": 2
|
||||
},
|
||||
{
|
||||
"__id__": 423
|
||||
"__id__": 437
|
||||
},
|
||||
{
|
||||
"__id__": 432
|
||||
"__id__": 446
|
||||
}
|
||||
],
|
||||
"_active": true,
|
||||
"_components": [
|
||||
{
|
||||
"__id__": 445
|
||||
"__id__": 459
|
||||
},
|
||||
{
|
||||
"__id__": 447
|
||||
"__id__": 461
|
||||
},
|
||||
{
|
||||
"__id__": 449
|
||||
"__id__": 463
|
||||
}
|
||||
],
|
||||
"_prefab": {
|
||||
"__id__": 451
|
||||
"__id__": 465
|
||||
},
|
||||
"_lpos": {
|
||||
"__type__": "cc.Vec3",
|
||||
@@ -92,22 +92,25 @@
|
||||
},
|
||||
{
|
||||
"__id__": 73
|
||||
},
|
||||
{
|
||||
"__id__": 416
|
||||
}
|
||||
],
|
||||
"_active": true,
|
||||
"_components": [
|
||||
{
|
||||
"__id__": 416
|
||||
"__id__": 430
|
||||
},
|
||||
{
|
||||
"__id__": 418
|
||||
"__id__": 432
|
||||
},
|
||||
{
|
||||
"__id__": 420
|
||||
"__id__": 434
|
||||
}
|
||||
],
|
||||
"_prefab": {
|
||||
"__id__": 422
|
||||
"__id__": 436
|
||||
},
|
||||
"_lpos": {
|
||||
"__type__": "cc.Vec3",
|
||||
@@ -9418,6 +9421,297 @@
|
||||
"targetOverrides": null,
|
||||
"nestedPrefabInstanceRoots": null
|
||||
},
|
||||
{
|
||||
"__type__": "cc.Node",
|
||||
"_name": "guide",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"_parent": {
|
||||
"__id__": 2
|
||||
},
|
||||
"_children": [
|
||||
{
|
||||
"__id__": 417
|
||||
}
|
||||
],
|
||||
"_active": true,
|
||||
"_components": [
|
||||
{
|
||||
"__id__": 423
|
||||
},
|
||||
{
|
||||
"__id__": 425
|
||||
},
|
||||
{
|
||||
"__id__": 427
|
||||
}
|
||||
],
|
||||
"_prefab": {
|
||||
"__id__": 429
|
||||
},
|
||||
"_lpos": {
|
||||
"__type__": "cc.Vec3",
|
||||
"x": 0,
|
||||
"y": 640,
|
||||
"z": 0
|
||||
},
|
||||
"_lrot": {
|
||||
"__type__": "cc.Quat",
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"z": 0,
|
||||
"w": 1
|
||||
},
|
||||
"_lscale": {
|
||||
"__type__": "cc.Vec3",
|
||||
"x": 1,
|
||||
"y": 1,
|
||||
"z": 1
|
||||
},
|
||||
"_mobility": 0,
|
||||
"_layer": 1073741824,
|
||||
"_euler": {
|
||||
"__type__": "cc.Vec3",
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"z": 0
|
||||
},
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.Node",
|
||||
"_name": "hand",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"_parent": {
|
||||
"__id__": 416
|
||||
},
|
||||
"_children": [],
|
||||
"_active": true,
|
||||
"_components": [
|
||||
{
|
||||
"__id__": 418
|
||||
},
|
||||
{
|
||||
"__id__": 420
|
||||
}
|
||||
],
|
||||
"_prefab": {
|
||||
"__id__": 422
|
||||
},
|
||||
"_lpos": {
|
||||
"__type__": "cc.Vec3",
|
||||
"x": 36.036,
|
||||
"y": -354.417,
|
||||
"z": 0
|
||||
},
|
||||
"_lrot": {
|
||||
"__type__": "cc.Quat",
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"z": 0,
|
||||
"w": 1
|
||||
},
|
||||
"_lscale": {
|
||||
"__type__": "cc.Vec3",
|
||||
"x": 1,
|
||||
"y": 1,
|
||||
"z": 1
|
||||
},
|
||||
"_mobility": 0,
|
||||
"_layer": 1073741824,
|
||||
"_euler": {
|
||||
"__type__": "cc.Vec3",
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"z": 0
|
||||
},
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.UITransform",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"node": {
|
||||
"__id__": 417
|
||||
},
|
||||
"_enabled": true,
|
||||
"__prefab": {
|
||||
"__id__": 419
|
||||
},
|
||||
"_contentSize": {
|
||||
"__type__": "cc.Size",
|
||||
"width": 98,
|
||||
"height": 111
|
||||
},
|
||||
"_anchorPoint": {
|
||||
"__type__": "cc.Vec2",
|
||||
"x": 0.5,
|
||||
"y": 0.5
|
||||
},
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.CompPrefabInfo",
|
||||
"fileId": "79Vu4Cv05PnJw1LXaSE4DD"
|
||||
},
|
||||
{
|
||||
"__type__": "cc.Sprite",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"node": {
|
||||
"__id__": 417
|
||||
},
|
||||
"_enabled": true,
|
||||
"__prefab": {
|
||||
"__id__": 421
|
||||
},
|
||||
"_customMaterial": null,
|
||||
"_srcBlendFactor": 2,
|
||||
"_dstBlendFactor": 4,
|
||||
"_color": {
|
||||
"__type__": "cc.Color",
|
||||
"r": 255,
|
||||
"g": 255,
|
||||
"b": 255,
|
||||
"a": 255
|
||||
},
|
||||
"_spriteFrame": {
|
||||
"__uuid__": "6165ffc9-a838-4a33-b569-bdbaaab0e6b4@5990a",
|
||||
"__expectedType__": "cc.SpriteFrame"
|
||||
},
|
||||
"_type": 0,
|
||||
"_fillType": 0,
|
||||
"_sizeMode": 1,
|
||||
"_fillCenter": {
|
||||
"__type__": "cc.Vec2",
|
||||
"x": 0,
|
||||
"y": 0
|
||||
},
|
||||
"_fillStart": 0,
|
||||
"_fillRange": 0,
|
||||
"_isTrimmedMode": true,
|
||||
"_useGrayscale": false,
|
||||
"_atlas": null,
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.CompPrefabInfo",
|
||||
"fileId": "e4qJ7s1yxD9JrYdfGLFkVo"
|
||||
},
|
||||
{
|
||||
"__type__": "cc.PrefabInfo",
|
||||
"root": {
|
||||
"__id__": 1
|
||||
},
|
||||
"asset": {
|
||||
"__id__": 0
|
||||
},
|
||||
"fileId": "c98HTacPpLKZkCGXoKpM4T",
|
||||
"instance": null,
|
||||
"targetOverrides": null,
|
||||
"nestedPrefabInstanceRoots": null
|
||||
},
|
||||
{
|
||||
"__type__": "cc.UITransform",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"node": {
|
||||
"__id__": 416
|
||||
},
|
||||
"_enabled": true,
|
||||
"__prefab": {
|
||||
"__id__": 424
|
||||
},
|
||||
"_contentSize": {
|
||||
"__type__": "cc.Size",
|
||||
"width": 720,
|
||||
"height": 1280
|
||||
},
|
||||
"_anchorPoint": {
|
||||
"__type__": "cc.Vec2",
|
||||
"x": 0.5,
|
||||
"y": 0.5
|
||||
},
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.CompPrefabInfo",
|
||||
"fileId": "50NXlbXx9PHYhb8LT2nDRv"
|
||||
},
|
||||
{
|
||||
"__type__": "cc.Widget",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"node": {
|
||||
"__id__": 416
|
||||
},
|
||||
"_enabled": true,
|
||||
"__prefab": {
|
||||
"__id__": 426
|
||||
},
|
||||
"_alignFlags": 45,
|
||||
"_target": null,
|
||||
"_left": 0,
|
||||
"_right": 0,
|
||||
"_top": 0,
|
||||
"_bottom": 0,
|
||||
"_horizontalCenter": 0,
|
||||
"_verticalCenter": 0,
|
||||
"_isAbsLeft": true,
|
||||
"_isAbsRight": true,
|
||||
"_isAbsTop": true,
|
||||
"_isAbsBottom": true,
|
||||
"_isAbsHorizontalCenter": true,
|
||||
"_isAbsVerticalCenter": true,
|
||||
"_originalWidth": 100,
|
||||
"_originalHeight": 100,
|
||||
"_alignMode": 2,
|
||||
"_lockFlags": 0,
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.CompPrefabInfo",
|
||||
"fileId": "10DsksGxZDUbKjtrjCTMxF"
|
||||
},
|
||||
{
|
||||
"__type__": "25122z/cnRPhp90+CJYs5+r",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"node": {
|
||||
"__id__": 416
|
||||
},
|
||||
"_enabled": true,
|
||||
"__prefab": {
|
||||
"__id__": 428
|
||||
},
|
||||
"hand": {
|
||||
"__id__": 417
|
||||
},
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.CompPrefabInfo",
|
||||
"fileId": "1fYnYBrbBNgoLyArRX18hs"
|
||||
},
|
||||
{
|
||||
"__type__": "cc.PrefabInfo",
|
||||
"root": {
|
||||
"__id__": 1
|
||||
},
|
||||
"asset": {
|
||||
"__id__": 0
|
||||
},
|
||||
"fileId": "6dh4o/8p1Cy5An1p6o4Bc3",
|
||||
"instance": null,
|
||||
"targetOverrides": null,
|
||||
"nestedPrefabInstanceRoots": null
|
||||
},
|
||||
{
|
||||
"__type__": "cc.UITransform",
|
||||
"_name": "",
|
||||
@@ -9428,7 +9722,7 @@
|
||||
},
|
||||
"_enabled": true,
|
||||
"__prefab": {
|
||||
"__id__": 417
|
||||
"__id__": 431
|
||||
},
|
||||
"_contentSize": {
|
||||
"__type__": "cc.Size",
|
||||
@@ -9456,7 +9750,7 @@
|
||||
},
|
||||
"_enabled": true,
|
||||
"__prefab": {
|
||||
"__id__": 419
|
||||
"__id__": 433
|
||||
},
|
||||
"_alignFlags": 21,
|
||||
"_target": null,
|
||||
@@ -9492,7 +9786,7 @@
|
||||
},
|
||||
"_enabled": true,
|
||||
"__prefab": {
|
||||
"__id__": 421
|
||||
"__id__": 435
|
||||
},
|
||||
"home_btn": {
|
||||
"__id__": 121
|
||||
@@ -9541,14 +9835,14 @@
|
||||
"__id__": 1
|
||||
},
|
||||
"_prefab": {
|
||||
"__id__": 424
|
||||
"__id__": 438
|
||||
},
|
||||
"__editorExtras__": {}
|
||||
},
|
||||
{
|
||||
"__type__": "cc.PrefabInfo",
|
||||
"root": {
|
||||
"__id__": 423
|
||||
"__id__": 437
|
||||
},
|
||||
"asset": {
|
||||
"__uuid__": "26bff847-cd29-48a5-bbfa-c3e2dbda688d",
|
||||
@@ -9556,7 +9850,7 @@
|
||||
},
|
||||
"fileId": "5a9CMsVQhKP5Y+UJfTKPbx",
|
||||
"instance": {
|
||||
"__id__": 425
|
||||
"__id__": 439
|
||||
},
|
||||
"targetOverrides": null
|
||||
},
|
||||
@@ -9570,19 +9864,19 @@
|
||||
"mountedComponents": [],
|
||||
"propertyOverrides": [
|
||||
{
|
||||
"__id__": 426
|
||||
"__id__": 440
|
||||
},
|
||||
{
|
||||
"__id__": 428
|
||||
"__id__": 442
|
||||
},
|
||||
{
|
||||
"__id__": 429
|
||||
"__id__": 443
|
||||
},
|
||||
{
|
||||
"__id__": 430
|
||||
"__id__": 444
|
||||
},
|
||||
{
|
||||
"__id__": 431
|
||||
"__id__": 445
|
||||
}
|
||||
],
|
||||
"removedComponents": []
|
||||
@@ -9590,7 +9884,7 @@
|
||||
{
|
||||
"__type__": "CCPropertyOverrideInfo",
|
||||
"targetInfo": {
|
||||
"__id__": 427
|
||||
"__id__": 441
|
||||
},
|
||||
"propertyPath": [
|
||||
"_name"
|
||||
@@ -9606,7 +9900,7 @@
|
||||
{
|
||||
"__type__": "CCPropertyOverrideInfo",
|
||||
"targetInfo": {
|
||||
"__id__": 427
|
||||
"__id__": 441
|
||||
},
|
||||
"propertyPath": [
|
||||
"_lpos"
|
||||
@@ -9621,7 +9915,7 @@
|
||||
{
|
||||
"__type__": "CCPropertyOverrideInfo",
|
||||
"targetInfo": {
|
||||
"__id__": 427
|
||||
"__id__": 441
|
||||
},
|
||||
"propertyPath": [
|
||||
"_lrot"
|
||||
@@ -9637,7 +9931,7 @@
|
||||
{
|
||||
"__type__": "CCPropertyOverrideInfo",
|
||||
"targetInfo": {
|
||||
"__id__": 427
|
||||
"__id__": 441
|
||||
},
|
||||
"propertyPath": [
|
||||
"_euler"
|
||||
@@ -9652,7 +9946,7 @@
|
||||
{
|
||||
"__type__": "CCPropertyOverrideInfo",
|
||||
"targetInfo": {
|
||||
"__id__": 427
|
||||
"__id__": 441
|
||||
},
|
||||
"propertyPath": [
|
||||
"_active"
|
||||
@@ -9666,14 +9960,14 @@
|
||||
"__id__": 1
|
||||
},
|
||||
"_prefab": {
|
||||
"__id__": 433
|
||||
"__id__": 447
|
||||
},
|
||||
"__editorExtras__": {}
|
||||
},
|
||||
{
|
||||
"__type__": "cc.PrefabInfo",
|
||||
"root": {
|
||||
"__id__": 432
|
||||
"__id__": 446
|
||||
},
|
||||
"asset": {
|
||||
"__uuid__": "56aee962-4a5e-45ae-a779-999444d06d18",
|
||||
@@ -9681,7 +9975,7 @@
|
||||
},
|
||||
"fileId": "cboM54s0hM07XCtrpFp0/b",
|
||||
"instance": {
|
||||
"__id__": 434
|
||||
"__id__": 448
|
||||
},
|
||||
"targetOverrides": null
|
||||
},
|
||||
@@ -9695,28 +9989,28 @@
|
||||
"mountedComponents": [],
|
||||
"propertyOverrides": [
|
||||
{
|
||||
"__id__": 435
|
||||
"__id__": 449
|
||||
},
|
||||
{
|
||||
"__id__": 437
|
||||
"__id__": 451
|
||||
},
|
||||
{
|
||||
"__id__": 438
|
||||
"__id__": 452
|
||||
},
|
||||
{
|
||||
"__id__": 439
|
||||
"__id__": 453
|
||||
},
|
||||
{
|
||||
"__id__": 440
|
||||
"__id__": 454
|
||||
},
|
||||
{
|
||||
"__id__": 442
|
||||
"__id__": 456
|
||||
},
|
||||
{
|
||||
"__id__": 443
|
||||
"__id__": 457
|
||||
},
|
||||
{
|
||||
"__id__": 444
|
||||
"__id__": 458
|
||||
}
|
||||
],
|
||||
"removedComponents": []
|
||||
@@ -9724,7 +10018,7 @@
|
||||
{
|
||||
"__type__": "CCPropertyOverrideInfo",
|
||||
"targetInfo": {
|
||||
"__id__": 436
|
||||
"__id__": 450
|
||||
},
|
||||
"propertyPath": [
|
||||
"_name"
|
||||
@@ -9740,7 +10034,7 @@
|
||||
{
|
||||
"__type__": "CCPropertyOverrideInfo",
|
||||
"targetInfo": {
|
||||
"__id__": 436
|
||||
"__id__": 450
|
||||
},
|
||||
"propertyPath": [
|
||||
"_lpos"
|
||||
@@ -9755,7 +10049,7 @@
|
||||
{
|
||||
"__type__": "CCPropertyOverrideInfo",
|
||||
"targetInfo": {
|
||||
"__id__": 436
|
||||
"__id__": 450
|
||||
},
|
||||
"propertyPath": [
|
||||
"_lrot"
|
||||
@@ -9771,7 +10065,7 @@
|
||||
{
|
||||
"__type__": "CCPropertyOverrideInfo",
|
||||
"targetInfo": {
|
||||
"__id__": 436
|
||||
"__id__": 450
|
||||
},
|
||||
"propertyPath": [
|
||||
"_euler"
|
||||
@@ -9786,7 +10080,7 @@
|
||||
{
|
||||
"__type__": "CCPropertyOverrideInfo",
|
||||
"targetInfo": {
|
||||
"__id__": 441
|
||||
"__id__": 455
|
||||
},
|
||||
"propertyPath": [
|
||||
"_top"
|
||||
@@ -9802,7 +10096,7 @@
|
||||
{
|
||||
"__type__": "CCPropertyOverrideInfo",
|
||||
"targetInfo": {
|
||||
"__id__": 441
|
||||
"__id__": 455
|
||||
},
|
||||
"propertyPath": [
|
||||
"_alignFlags"
|
||||
@@ -9812,7 +10106,7 @@
|
||||
{
|
||||
"__type__": "CCPropertyOverrideInfo",
|
||||
"targetInfo": {
|
||||
"__id__": 441
|
||||
"__id__": 455
|
||||
},
|
||||
"propertyPath": [
|
||||
"_bottom"
|
||||
@@ -9822,7 +10116,7 @@
|
||||
{
|
||||
"__type__": "CCPropertyOverrideInfo",
|
||||
"targetInfo": {
|
||||
"__id__": 436
|
||||
"__id__": 450
|
||||
},
|
||||
"propertyPath": [
|
||||
"_active"
|
||||
@@ -9839,7 +10133,7 @@
|
||||
},
|
||||
"_enabled": true,
|
||||
"__prefab": {
|
||||
"__id__": 446
|
||||
"__id__": 460
|
||||
},
|
||||
"_contentSize": {
|
||||
"__type__": "cc.Size",
|
||||
@@ -9867,7 +10161,7 @@
|
||||
},
|
||||
"_enabled": true,
|
||||
"__prefab": {
|
||||
"__id__": 448
|
||||
"__id__": 462
|
||||
},
|
||||
"_alignFlags": 45,
|
||||
"_target": null,
|
||||
@@ -9903,7 +10197,7 @@
|
||||
},
|
||||
"_enabled": true,
|
||||
"__prefab": {
|
||||
"__id__": 450
|
||||
"__id__": 464
|
||||
},
|
||||
"debugMode": false,
|
||||
"_id": ""
|
||||
@@ -9925,10 +10219,10 @@
|
||||
"targetOverrides": null,
|
||||
"nestedPrefabInstanceRoots": [
|
||||
{
|
||||
"__id__": 432
|
||||
"__id__": 446
|
||||
},
|
||||
{
|
||||
"__id__": 423
|
||||
"__id__": 437
|
||||
},
|
||||
{
|
||||
"__id__": 55
|
||||
|
||||
@@ -44,6 +44,7 @@ export class SingletonModuleComp extends ecs.Comp {
|
||||
in_fight: false,
|
||||
stop_mon_action: false,
|
||||
};
|
||||
finish_guides: number[] = []
|
||||
data: any = {
|
||||
score: 0,
|
||||
mission: 1,
|
||||
|
||||
9
assets/script/game/guide.meta
Normal file
9
assets/script/game/guide.meta
Normal file
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"ver": "1.2.0",
|
||||
"importer": "directory",
|
||||
"imported": true,
|
||||
"uuid": "80f55ba3-1e7d-4b39-a7ea-d896f819edb6",
|
||||
"files": [],
|
||||
"subMetas": {},
|
||||
"userData": {}
|
||||
}
|
||||
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