Kaynağa Gözat

1,转盘根据类型转到目标位置
2,增加新手引导配置和类

zouyong 5 yıl önce
ebeveyn
işleme
b4cbd3017f

+ 112 - 0
assets/resources/data/guide_data.json

@@ -0,0 +1,112 @@
+[
+	{
+		"id": "1_1",
+		"trigger": 1,
+		"tr_num": null,
+		"tr_form": 2,
+		"dialog": "欢迎来到轻松连连消",
+		"display_rect": "",
+		"click_node": "",
+		"finger": "",
+		"lag_next": 0
+	},
+	{
+		"id": "1_2",
+		"trigger": null,
+		"tr_num": null,
+		"tr_form": 2,
+		"dialog": "点击“开始游戏”,让我来介绍一下",
+		"display_rect": "",
+		"click_node": "btn_start",
+		"finger": "100:0",
+		"lag_next": 0
+	},
+	{
+		"id": "1_3",
+		"trigger": null,
+		"tr_num": null,
+		"tr_form": 1,
+		"dialog": "点击这两个动物即可消除哦",
+		"display_rect": "-300:100:100:500",
+		"click_node": "",
+		"finger": "",
+		"lag_next": 1
+	},
+	{
+		"id": "1_4",
+		"trigger": null,
+		"tr_num": null,
+		"tr_form": 1,
+		"dialog": "消除可获得大量进度哦",
+		"display_rect": "",
+		"click_node": "",
+		"finger": "",
+		"lag_next": 2
+	},
+	{
+		"id": "1_5",
+		"trigger": null,
+		"tr_num": null,
+		"tr_form": 1,
+		"dialog": "进度攒满即可通关",
+		"display_rect": "",
+		"click_node": "",
+		"finger": "",
+		"lag_next": 0
+	},
+	{
+		"id": "1_6",
+		"trigger": null,
+		"tr_num": null,
+		"tr_form": 1,
+		"dialog": "继续点击消除吧",
+		"display_rect": "",
+		"click_node": "",
+		"finger": "",
+		"lag_next": 0
+	},
+	{
+		"id": "2_1",
+		"trigger": 1,
+		"tr_num": null,
+		"tr_form": 1,
+		"dialog": "点击领取红包币",
+		"display_rect": "",
+		"click_node": "",
+		"finger": "",
+		"lag_next": 0
+	},
+	{
+		"id": "2_2",
+		"trigger": null,
+		"tr_num": null,
+		"tr_form": 1,
+		"dialog": "红包币可用于提现",
+		"display_rect": "",
+		"click_node": "",
+		"finger": "",
+		"lag_next": 0
+	},
+	{
+		"id": "3_1",
+		"trigger": 1,
+		"tr_num": null,
+		"tr_form": 2,
+		"dialog": "达到提现条件啦!",
+		"display_rect": "",
+		"click_node": "",
+		"finger": "",
+		"lag_next": 0
+	},
+	{
+		"id": "3_2",
+		"trigger": null,
+		"tr_num": null,
+		"tr_form": 1,
+		"dialog": "点击即可提现",
+		"display_rect": "",
+		"click_node": "",
+		"finger": "",
+		"lag_next": 0
+	}
+]

+ 5 - 0
assets/resources/data/guide_data.json.meta

@@ -0,0 +1,5 @@
+{
+  "ver": "1.0.0",
+  "uuid": "2301f946-ef9d-4d93-b296-1f8ff5b307d3",
+  "subMetas": {}
+}

+ 12 - 0
assets/resources/module/guide.meta

@@ -0,0 +1,12 @@
+{
+  "ver": "1.1.2",
+  "uuid": "6337b598-a155-445c-b325-312abb205911",
+  "isBundle": false,
+  "bundleName": "",
+  "priority": 1,
+  "compressionType": {},
+  "optimizeHotUpdate": {},
+  "inlineSpriteFrames": {},
+  "isRemoteBundle": {},
+  "subMetas": {}
+}

+ 535 - 0
assets/resources/module/guide/guide.prefab

@@ -0,0 +1,535 @@
+[
+  {
+    "__type__": "cc.Prefab",
+    "_name": "",
+    "_objFlags": 0,
+    "_native": "",
+    "data": {
+      "__id__": 1
+    },
+    "optimizationPolicy": 0,
+    "asyncLoadAssets": false,
+    "readonly": false
+  },
+  {
+    "__type__": "cc.Node",
+    "_name": "guide",
+    "_objFlags": 0,
+    "_parent": null,
+    "_children": [
+      {
+        "__id__": 2
+      },
+      {
+        "__id__": 12
+      }
+    ],
+    "_active": true,
+    "_components": [
+      {
+        "__id__": 15
+      }
+    ],
+    "_prefab": {
+      "__id__": 16
+    },
+    "_opacity": 255,
+    "_color": {
+      "__type__": "cc.Color",
+      "r": 255,
+      "g": 255,
+      "b": 255,
+      "a": 255
+    },
+    "_contentSize": {
+      "__type__": "cc.Size",
+      "width": 750,
+      "height": 1334
+    },
+    "_anchorPoint": {
+      "__type__": "cc.Vec2",
+      "x": 0.5,
+      "y": 0.5
+    },
+    "_trs": {
+      "__type__": "TypedArray",
+      "ctor": "Float64Array",
+      "array": [
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        1,
+        1,
+        1,
+        1
+      ]
+    },
+    "_eulerAngles": {
+      "__type__": "cc.Vec3",
+      "x": 0,
+      "y": 0,
+      "z": 0
+    },
+    "_skewX": 0,
+    "_skewY": 0,
+    "_is3DNode": false,
+    "_groupIndex": 0,
+    "groupIndex": 0,
+    "_id": ""
+  },
+  {
+    "__type__": "cc.Node",
+    "_name": "显示区域",
+    "_objFlags": 0,
+    "_parent": {
+      "__id__": 1
+    },
+    "_children": [
+      {
+        "__id__": 3
+      }
+    ],
+    "_active": true,
+    "_components": [
+      {
+        "__id__": 10
+      }
+    ],
+    "_prefab": {
+      "__id__": 11
+    },
+    "_opacity": 255,
+    "_color": {
+      "__type__": "cc.Color",
+      "r": 255,
+      "g": 255,
+      "b": 255,
+      "a": 255
+    },
+    "_contentSize": {
+      "__type__": "cc.Size",
+      "width": 200,
+      "height": 200
+    },
+    "_anchorPoint": {
+      "__type__": "cc.Vec2",
+      "x": 0.5,
+      "y": 0.5
+    },
+    "_trs": {
+      "__type__": "TypedArray",
+      "ctor": "Float64Array",
+      "array": [
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        1,
+        1,
+        1,
+        1
+      ]
+    },
+    "_eulerAngles": {
+      "__type__": "cc.Vec3",
+      "x": 0,
+      "y": 0,
+      "z": 0
+    },
+    "_skewX": 0,
+    "_skewY": 0,
+    "_is3DNode": false,
+    "_groupIndex": 0,
+    "groupIndex": 0,
+    "_id": ""
+  },
+  {
+    "__type__": "cc.Node",
+    "_name": "点击区域",
+    "_objFlags": 0,
+    "_parent": {
+      "__id__": 2
+    },
+    "_children": [
+      {
+        "__id__": 4
+      }
+    ],
+    "_active": true,
+    "_components": [
+      {
+        "__id__": 8
+      }
+    ],
+    "_prefab": {
+      "__id__": 9
+    },
+    "_opacity": 255,
+    "_color": {
+      "__type__": "cc.Color",
+      "r": 255,
+      "g": 255,
+      "b": 255,
+      "a": 255
+    },
+    "_contentSize": {
+      "__type__": "cc.Size",
+      "width": 200,
+      "height": 200
+    },
+    "_anchorPoint": {
+      "__type__": "cc.Vec2",
+      "x": 0.5,
+      "y": 0.5
+    },
+    "_trs": {
+      "__type__": "TypedArray",
+      "ctor": "Float64Array",
+      "array": [
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        1,
+        1,
+        1,
+        1
+      ]
+    },
+    "_eulerAngles": {
+      "__type__": "cc.Vec3",
+      "x": 0,
+      "y": 0,
+      "z": 0
+    },
+    "_skewX": 0,
+    "_skewY": 0,
+    "_is3DNode": false,
+    "_groupIndex": 0,
+    "groupIndex": 0,
+    "_id": ""
+  },
+  {
+    "__type__": "cc.Node",
+    "_name": "背景",
+    "_objFlags": 0,
+    "_parent": {
+      "__id__": 3
+    },
+    "_children": [],
+    "_active": true,
+    "_components": [
+      {
+        "__id__": 5
+      },
+      {
+        "__id__": 6
+      }
+    ],
+    "_prefab": {
+      "__id__": 7
+    },
+    "_opacity": 120,
+    "_color": {
+      "__type__": "cc.Color",
+      "r": 0,
+      "g": 0,
+      "b": 0,
+      "a": 255
+    },
+    "_contentSize": {
+      "__type__": "cc.Size",
+      "width": 750,
+      "height": 1334.0000000000005
+    },
+    "_anchorPoint": {
+      "__type__": "cc.Vec2",
+      "x": 0.5,
+      "y": 0.5
+    },
+    "_trs": {
+      "__type__": "TypedArray",
+      "ctor": "Float64Array",
+      "array": [
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        1,
+        1,
+        1,
+        1
+      ]
+    },
+    "_eulerAngles": {
+      "__type__": "cc.Vec3",
+      "x": 0,
+      "y": 0,
+      "z": 0
+    },
+    "_skewX": 0,
+    "_skewY": 0,
+    "_is3DNode": false,
+    "_groupIndex": 0,
+    "groupIndex": 0,
+    "_id": ""
+  },
+  {
+    "__type__": "cc.Sprite",
+    "_name": "",
+    "_objFlags": 0,
+    "node": {
+      "__id__": 4
+    },
+    "_enabled": true,
+    "_materials": [
+      {
+        "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
+      }
+    ],
+    "_srcBlendFactor": 770,
+    "_dstBlendFactor": 771,
+    "_spriteFrame": {
+      "__uuid__": "a23235d1-15db-4b95-8439-a2e005bfff91"
+    },
+    "_type": 0,
+    "_sizeMode": 0,
+    "_fillType": 0,
+    "_fillCenter": {
+      "__type__": "cc.Vec2",
+      "x": 0,
+      "y": 0
+    },
+    "_fillStart": 0,
+    "_fillRange": 0,
+    "_isTrimmedMode": true,
+    "_atlas": null,
+    "_id": ""
+  },
+  {
+    "__type__": "cc.Widget",
+    "_name": "",
+    "_objFlags": 0,
+    "node": {
+      "__id__": 4
+    },
+    "_enabled": true,
+    "alignMode": 1,
+    "_target": {
+      "__id__": 1
+    },
+    "_alignFlags": 45,
+    "_left": 0,
+    "_right": 0,
+    "_top": -2.2737367544323206e-13,
+    "_bottom": -2.2737367544323206e-13,
+    "_verticalCenter": 0,
+    "_horizontalCenter": 0,
+    "_isAbsLeft": true,
+    "_isAbsRight": true,
+    "_isAbsTop": true,
+    "_isAbsBottom": true,
+    "_isAbsHorizontalCenter": true,
+    "_isAbsVerticalCenter": true,
+    "_originalWidth": 750,
+    "_originalHeight": 1334,
+    "_id": ""
+  },
+  {
+    "__type__": "cc.PrefabInfo",
+    "root": {
+      "__id__": 1
+    },
+    "asset": {
+      "__uuid__": "5f53c125-7a14-4ca0-986a-0e0d2d665268"
+    },
+    "fileId": "754SPbB1hNiYs77Q05nGQ/",
+    "sync": false
+  },
+  {
+    "__type__": "cc.Mask",
+    "_name": "",
+    "_objFlags": 0,
+    "node": {
+      "__id__": 3
+    },
+    "_enabled": false,
+    "_materials": [
+      {
+        "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
+      }
+    ],
+    "_spriteFrame": null,
+    "_type": 0,
+    "_segments": 64,
+    "_N$alphaThreshold": 0.1,
+    "_N$inverted": true,
+    "_id": ""
+  },
+  {
+    "__type__": "cc.PrefabInfo",
+    "root": {
+      "__id__": 1
+    },
+    "asset": {
+      "__uuid__": "5f53c125-7a14-4ca0-986a-0e0d2d665268"
+    },
+    "fileId": "20o3KHyBJBb59Tg77KA/TD",
+    "sync": false
+  },
+  {
+    "__type__": "cc.Mask",
+    "_name": "",
+    "_objFlags": 0,
+    "node": {
+      "__id__": 2
+    },
+    "_enabled": true,
+    "_materials": [
+      {
+        "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
+      }
+    ],
+    "_spriteFrame": null,
+    "_type": 0,
+    "_segments": 64,
+    "_N$alphaThreshold": 0.1,
+    "_N$inverted": true,
+    "_id": ""
+  },
+  {
+    "__type__": "cc.PrefabInfo",
+    "root": {
+      "__id__": 1
+    },
+    "asset": {
+      "__uuid__": "5f53c125-7a14-4ca0-986a-0e0d2d665268"
+    },
+    "fileId": "af2wWWnb1LsrA0wok8WpNl",
+    "sync": false
+  },
+  {
+    "__type__": "cc.Node",
+    "_name": "block",
+    "_objFlags": 0,
+    "_parent": {
+      "__id__": 1
+    },
+    "_children": [],
+    "_active": true,
+    "_components": [
+      {
+        "__id__": 13
+      }
+    ],
+    "_prefab": {
+      "__id__": 14
+    },
+    "_opacity": 255,
+    "_color": {
+      "__type__": "cc.Color",
+      "r": 255,
+      "g": 255,
+      "b": 255,
+      "a": 255
+    },
+    "_contentSize": {
+      "__type__": "cc.Size",
+      "width": 750,
+      "height": 1334
+    },
+    "_anchorPoint": {
+      "__type__": "cc.Vec2",
+      "x": 0.5,
+      "y": 0.5
+    },
+    "_trs": {
+      "__type__": "TypedArray",
+      "ctor": "Float64Array",
+      "array": [
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        1,
+        1,
+        1,
+        1
+      ]
+    },
+    "_eulerAngles": {
+      "__type__": "cc.Vec3",
+      "x": 0,
+      "y": 0,
+      "z": 0
+    },
+    "_skewX": 0,
+    "_skewY": 0,
+    "_is3DNode": false,
+    "_groupIndex": 0,
+    "groupIndex": 0,
+    "_id": ""
+  },
+  {
+    "__type__": "cc.BlockInputEvents",
+    "_name": "",
+    "_objFlags": 0,
+    "node": {
+      "__id__": 12
+    },
+    "_enabled": true,
+    "_id": ""
+  },
+  {
+    "__type__": "cc.PrefabInfo",
+    "root": {
+      "__id__": 1
+    },
+    "asset": {
+      "__uuid__": "5f53c125-7a14-4ca0-986a-0e0d2d665268"
+    },
+    "fileId": "f7UFOYdFFDHpdFu3DllFXp",
+    "sync": false
+  },
+  {
+    "__type__": "cc77atmGeBM4bPWFiQFl7H6",
+    "_name": "",
+    "_objFlags": 0,
+    "node": {
+      "__id__": 1
+    },
+    "_enabled": true,
+    "node_display": {
+      "__id__": 2
+    },
+    "node_click": {
+      "__id__": 3
+    },
+    "node_block": {
+      "__id__": 12
+    },
+    "_id": ""
+  },
+  {
+    "__type__": "cc.PrefabInfo",
+    "root": {
+      "__id__": 1
+    },
+    "asset": {
+      "__uuid__": "5f53c125-7a14-4ca0-986a-0e0d2d665268"
+    },
+    "fileId": "",
+    "sync": false
+  }
+]

+ 8 - 0
assets/resources/module/guide/guide.prefab.meta

@@ -0,0 +1,8 @@
+{
+  "ver": "1.2.9",
+  "uuid": "5f53c125-7a14-4ca0-986a-0e0d2d665268",
+  "optimizationPolicy": "AUTO",
+  "asyncLoadAssets": false,
+  "readonly": false,
+  "subMetas": {}
+}

+ 3 - 0
assets/script/game/data/GData.ts

@@ -21,6 +21,7 @@ import RedCodeData from "./module/RedCodeData";
 import RedeemData from "./module/RedeemData";
 import { MoreGameData } from "./module/MoreGameData";
 import { SettingData } from "./module/SettingData";
+import { GuideData } from "./module/GuideData";
 
 /**
  * 数据集合全局类
@@ -39,6 +40,7 @@ class GData {
     public httpData: HttpData;
     public adData: AdData;
     public storageData: StorageData;
+    public guideData:GuideData;
 
     //module
     /** 领取红包奖励 */
@@ -76,6 +78,7 @@ class GData {
         this.httpData = new HttpData();
         this.adData = new AdData();
         this.storageData = new StorageData();
+        this.guideData = new GuideData();
 
         this.reward = new RewardData();
         this.help = new HelpData();

+ 5 - 0
assets/script/game/data/LoginData.ts

@@ -43,6 +43,11 @@ export class LoginData {
         if (result && result.json) {
             this.rule_data = result.json.server;
             this.privacy_data = result.json.privacy;
+        }
+
+        result = await mk.loader.load("data/guide_data", cc.JsonAsset);
+        if (result && result.json) {
+            gData.guideData.init(result.json);
             this.loadResCompelete = true;
         }
     }

+ 64 - 0
assets/script/game/data/module/GuideData.ts

@@ -0,0 +1,64 @@
+/**
+ * @description 新手引导
+ * @author 邹勇
+ */
+export class GuideData {
+
+    /** 新手引导数据 */
+    public data: Map<number, Guide[]>;
+
+    public init(config) {
+        this.data = new Map<number, Guide[]>();
+        let arr = [];
+        let id = 1;
+        for (let i = 0; i < config.length; i++) {
+            let guide = {} as Guide;
+            let o = config[i];
+            let a = o.id.split("_");
+            guide.id = parseInt(a[0]);
+            guide.step = parseInt(a[1]);
+            guide.trigger = o.trigger;
+            guide.tr_num = o.tr_num;
+            guide.tr_form = o.tr_form;
+            guide.dialog = o.dialog;
+            guide.click_rect = o.click_rect;
+            guide.click_node = o.click_node;
+            guide.finger = o.finger;
+            guide.lag_next = o.lag_next;
+            if (id != guide.id) {
+                this.data.set(id, arr);
+                arr = [];
+                id = guide.id;
+            }
+            arr.push(guide);
+        }
+        this.data.set(id, arr);
+    }
+
+    public getGuidesByID(id): Guide[] {
+        return this.data.get(id);
+    }
+
+}
+export class Guide {
+    /** 大步骤 */
+    id: number;
+    /** 大步骤中的小步 */
+    step: number;
+    /** 触发方式 1固定 2等级 3任务 4关卡 5功能开启 */
+    trigger: number;
+    /** 触发条件的数据 如当trigger是关卡时关卡时,为触发关卡 */
+    tr_num: number;
+    /** 1头像 2形象 */
+    tr_form: number;
+    /** 对话内容 */
+    dialog: string;
+    /** 透明点击区域(与click_node不共存) */
+    click_rect: string;
+    /** 点击组件名字(必须在代码中预先设置) */
+    click_node: string;
+    /** 手指位置 */
+    finger: string;
+    /** 下个时间 */
+    lag_next: 0;
+}

+ 9 - 0
assets/script/game/data/module/GuideData.ts.meta

@@ -0,0 +1,9 @@
+{
+  "ver": "1.0.8",
+  "uuid": "e5757294-5b00-4c08-b00d-2d272bad911c",
+  "isPlugin": false,
+  "loadPluginInWeb": true,
+  "loadPluginInNative": true,
+  "loadPluginInEditor": false,
+  "subMetas": {}
+}

+ 1 - 1
assets/script/game/data/module/TurnableData.ts

@@ -15,7 +15,7 @@ export class TurnableData extends Data {
 
     public requestFinish:boolean = false;
 
-    public leftTimes: number = 2;
+    public leftTimes: number = 0;
     public config: TurntableItem[];
 
     public init() {

+ 12 - 0
assets/script/game/module/guide.meta

@@ -0,0 +1,12 @@
+{
+  "ver": "1.1.2",
+  "uuid": "74cd9ce7-c4f3-4387-b93d-636a58604abf",
+  "isBundle": false,
+  "bundleName": "",
+  "priority": 1,
+  "compressionType": {},
+  "optimizeHotUpdate": {},
+  "inlineSpriteFrames": {},
+  "isRemoteBundle": {},
+  "subMetas": {}
+}

+ 23 - 0
assets/script/game/module/guide/Guide.ts

@@ -0,0 +1,23 @@
+/**
+ * @description 新手引导
+ * @author 邹勇
+ */
+const { ccclass, property } = cc._decorator;
+
+@ccclass
+export default class Guide extends cc.Component {
+
+    @property({ type: cc.Node, displayName: "显示区域" })
+    node_display: cc.Node = null;
+    @property({ type: cc.Node, displayName: "点击区域" })
+    node_click: cc.Node = null;
+    @property(cc.Node)
+    node_block: cc.Node = null;
+
+
+    onLoad() {
+
+    }
+
+
+}

+ 9 - 0
assets/script/game/module/guide/Guide.ts.meta

@@ -0,0 +1,9 @@
+{
+  "ver": "1.0.8",
+  "uuid": "cc77ab66-19e0-4ce1-b3d6-16240597b1fa",
+  "isPlugin": false,
+  "loadPluginInWeb": true,
+  "loadPluginInNative": true,
+  "loadPluginInEditor": false,
+  "subMetas": {}
+}

+ 24 - 5
assets/script/game/module/turntable/Turnable.ts

@@ -35,6 +35,8 @@ export default class Turnable extends cc.Component {
     private perAdd = 10
     private perMinus = 0
 
+    private rewardWeights: number[];
+
     onLoad() {
         this.baozhaAni.node.active = false;
         this.initData();
@@ -44,10 +46,13 @@ export default class Turnable extends cc.Component {
      * 初始化奖励和抽奖次数
      */
     private initData() {
+        this.rewardWeights = [0, 0, 0];
         if (gData.turnable.config) {
             for (let i = 0; i < gData.turnable.config.length; i++) {
                 let sc = this.node_items[i].getComponent(TurnableItem);
-                sc.initData(gData.turnable.config[i].type);
+                let type = parseInt(gData.turnable.config[i].type);
+                this.rewardWeights[type - 1]++;
+                sc.initData(type);
             }
         }
         gData.turnable.requestData();
@@ -64,15 +69,26 @@ export default class Turnable extends cc.Component {
                 }
             });
         }
-        // this.play(2);
     }
 
-    private async play(index) {
+    private async play(type) {
         this.audioId = await mk.audio.playEffect("turnableplay", true);
         this.btn_close.getComponent(BtnClosePanel).block_click = true;
 
         this.perAdd = 10;
         this.node_turn.angle += 360 * 5;
+        let index = 0;
+        let i = 0;
+        while (i < this.rewardWeights.length - 1) {
+            if(i < type - 1){
+                index += this.rewardWeights[i];
+                i++;
+            }
+            else{
+                index += Math.floor(Math.random() * this.rewardWeights[i]);
+                break;
+            }
+        }
         this.endAngle = index * -60;
         this.slowAngle = this.endAngle + this.slowDis;
         this.perMinus = this.perAdd / (this.slowDis / (this.perAdd * 0.5));
@@ -105,8 +121,11 @@ export default class Turnable extends cc.Component {
             gData.turnable.requestFinish = false;
         }
         if (gData.turnable.adData) {
-            this.play(2);
-            gData.reward.data = gData.turnable.adData;
+            if (gData.turnable.adData && gData.turnable.adData.videoRedMoney) {
+                let type = gData.turnable.adData.videoRedMoney.redMoneyType;
+                this.play(type);
+                gData.reward.data = gData.turnable.adData.videoRedMoney.videoRewardList;
+            }
             gData.turnable.adData = null;
         }
 

+ 1 - 1
assets/script/game/module/turntable/TurnableItem.ts

@@ -10,7 +10,7 @@ export default class TurnableItem extends cc.Component {
 
     public async initData(type) {
         this.icon.spriteFrame = await mk.loader.load('module/turnable/texture/hb' + type, cc.SpriteFrame);
-        this.lbl_name.string = type == "1" ? "少量红包" : type == "2" ? "中量红包" : "大量红包";
+        this.lbl_name.string = type == 1 ? "少量红包" : type == 2 ? "中量红包" : "大量红包";
     }
 
 }

+ 17 - 0
assets/script/mk/system/GuideSystem.ts

@@ -1,6 +1,23 @@
+import { Guide } from "../../game/data/module/GuideData";
+
+
 /**
  * 新手引导模块
  */
 export default class GuideSystem {
 
+    private guides: Guide[];
+    private crtStep: number;
+    private crtGuide: Guide;
+
+    public open(id: number) {
+        this.guides = gData.guideData.getGuidesByID(id);
+        this.crtStep = -1;
+        this.nextStep();
+    }
+
+    private nextStep() {
+        this.crtStep++;
+        this.crtGuide = this.guides[this.crtStep];
+    }
 }

+ 5 - 0
assets/script/mk/system/MKSystem.ts

@@ -20,6 +20,7 @@ import TipSystem from "./TipSystem";
 import PoolSystem from "./PoolSystem";
 import TweenUtil from "../utils/TweenUtil";
 import FlySystem from "./FlySystem";
+import GuideSystem from "./GuideSystem";
 
 /**
  * @description mk系统
@@ -108,6 +109,10 @@ class MKSystem {
     public get pool(): PoolSystem {
         return this._pool || (this._pool = new PoolSystem());
     }
+    private _guide: GuideSystem;
+    public get guide(): GuideSystem {
+        return this._guide || (this._guide = new GuideSystem());
+    }
 
     /** 挂载在MainScene的界面上,不需要new */
     private _ui: UISystem;