future 1 year ago
parent
commit
0be01d030c

+ 4 - 0
assets/data/data.ts

@@ -351,6 +351,10 @@ export class bag_data  {
     }
 }
 
+export class long_story_list_item_data {
+    public id:number = 0;
+    public name:string = "";
+}
 
 export class level_list_item_data {
     public id:number = 0;

File diff suppressed because it is too large
+ 598 - 139
assets/edit_game.scene


+ 4 - 4
assets/resources/prefab/level_list_item.prefab

@@ -96,7 +96,7 @@
     "_lpos": {
       "__type__": "cc.Vec3",
       "x": 0,
-      "y": -18.7,
+      "y": 0,
       "z": 0
     },
     "_lrot": {
@@ -137,7 +137,7 @@
     "_contentSize": {
       "__type__": "cc.Size",
       "width": 200,
-      "height": 50.4
+      "height": 50
     },
     "_anchorPoint": {
       "__type__": "cc.Vec2",
@@ -211,8 +211,8 @@
     "_target": null,
     "_left": 0,
     "_right": 0,
-    "_top": 93.5,
-    "_bottom": 56.1,
+    "_top": 75,
+    "_bottom": 75,
     "_horizontalCenter": 0,
     "_verticalCenter": 0,
     "_isAbsLeft": true,

+ 350 - 0
assets/resources/prefab/long_story_list_item.prefab

@@ -0,0 +1,350 @@
+[
+  {
+    "__type__": "cc.Prefab",
+    "_name": "long_story_list_item",
+    "_objFlags": 0,
+    "__editorExtras__": {},
+    "_native": "",
+    "data": {
+      "__id__": 1
+    },
+    "optimizationPolicy": 0,
+    "persistent": false
+  },
+  {
+    "__type__": "cc.Node",
+    "_name": "long_story_list_item",
+    "_objFlags": 0,
+    "__editorExtras__": {},
+    "_parent": null,
+    "_children": [
+      {
+        "__id__": 2
+      }
+    ],
+    "_active": true,
+    "_components": [
+      {
+        "__id__": 10
+      },
+      {
+        "__id__": 12
+      },
+      {
+        "__id__": 14
+      }
+    ],
+    "_prefab": {
+      "__id__": 16
+    },
+    "_lpos": {
+      "__type__": "cc.Vec3",
+      "x": 0,
+      "y": 0,
+      "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": 33554432,
+    "_euler": {
+      "__type__": "cc.Vec3",
+      "x": 0,
+      "y": 0,
+      "z": 0
+    },
+    "_id": ""
+  },
+  {
+    "__type__": "cc.Node",
+    "_name": "Label",
+    "_objFlags": 0,
+    "__editorExtras__": {},
+    "_parent": {
+      "__id__": 1
+    },
+    "_children": [],
+    "_active": true,
+    "_components": [
+      {
+        "__id__": 3
+      },
+      {
+        "__id__": 5
+      },
+      {
+        "__id__": 7
+      }
+    ],
+    "_prefab": {
+      "__id__": 9
+    },
+    "_lpos": {
+      "__type__": "cc.Vec3",
+      "x": 0,
+      "y": 0,
+      "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": 33554432,
+    "_euler": {
+      "__type__": "cc.Vec3",
+      "x": 0,
+      "y": 0,
+      "z": 0
+    },
+    "_id": ""
+  },
+  {
+    "__type__": "cc.UITransform",
+    "_name": "",
+    "_objFlags": 0,
+    "__editorExtras__": {},
+    "node": {
+      "__id__": 2
+    },
+    "_enabled": true,
+    "__prefab": {
+      "__id__": 4
+    },
+    "_contentSize": {
+      "__type__": "cc.Size",
+      "width": 400,
+      "height": 50
+    },
+    "_anchorPoint": {
+      "__type__": "cc.Vec2",
+      "x": 0.5,
+      "y": 0.5
+    },
+    "_id": ""
+  },
+  {
+    "__type__": "cc.CompPrefabInfo",
+    "fileId": "30Bnv19VBK/Zsbx89HNKT+"
+  },
+  {
+    "__type__": "cc.Label",
+    "_name": "",
+    "_objFlags": 0,
+    "__editorExtras__": {},
+    "node": {
+      "__id__": 2
+    },
+    "_enabled": true,
+    "__prefab": {
+      "__id__": 6
+    },
+    "_customMaterial": null,
+    "_srcBlendFactor": 2,
+    "_dstBlendFactor": 4,
+    "_color": {
+      "__type__": "cc.Color",
+      "r": 0,
+      "g": 0,
+      "b": 0,
+      "a": 255
+    },
+    "_string": "label",
+    "_horizontalAlign": 1,
+    "_verticalAlign": 1,
+    "_actualFontSize": 41,
+    "_fontSize": 40,
+    "_fontFamily": "Arial",
+    "_lineHeight": 40,
+    "_overflow": 2,
+    "_enableWrapText": true,
+    "_font": null,
+    "_isSystemFontUsed": true,
+    "_spacingX": 0,
+    "_isItalic": false,
+    "_isBold": true,
+    "_isUnderline": false,
+    "_underlineHeight": 2,
+    "_cacheMode": 0,
+    "_id": ""
+  },
+  {
+    "__type__": "cc.CompPrefabInfo",
+    "fileId": "14VmeqIyNBy6qgAJVzL8bD"
+  },
+  {
+    "__type__": "cc.Widget",
+    "_name": "",
+    "_objFlags": 0,
+    "__editorExtras__": {},
+    "node": {
+      "__id__": 2
+    },
+    "_enabled": true,
+    "__prefab": {
+      "__id__": 8
+    },
+    "_alignFlags": 45,
+    "_target": null,
+    "_left": 0,
+    "_right": 0,
+    "_top": 75,
+    "_bottom": 75,
+    "_horizontalCenter": 0,
+    "_verticalCenter": 0,
+    "_isAbsLeft": true,
+    "_isAbsRight": true,
+    "_isAbsTop": true,
+    "_isAbsBottom": true,
+    "_isAbsHorizontalCenter": true,
+    "_isAbsVerticalCenter": true,
+    "_originalWidth": 91.15234375,
+    "_originalHeight": 50.4,
+    "_alignMode": 2,
+    "_lockFlags": 0,
+    "_id": ""
+  },
+  {
+    "__type__": "cc.CompPrefabInfo",
+    "fileId": "d0c/ZoVpdA1q/dy5BL8y7n"
+  },
+  {
+    "__type__": "cc.PrefabInfo",
+    "root": {
+      "__id__": 1
+    },
+    "asset": {
+      "__id__": 0
+    },
+    "fileId": "55lptLXyNCU78Lt4e9c1QB",
+    "instance": null,
+    "targetOverrides": null,
+    "nestedPrefabInstanceRoots": null
+  },
+  {
+    "__type__": "cc.UITransform",
+    "_name": "",
+    "_objFlags": 0,
+    "__editorExtras__": {},
+    "node": {
+      "__id__": 1
+    },
+    "_enabled": true,
+    "__prefab": {
+      "__id__": 11
+    },
+    "_contentSize": {
+      "__type__": "cc.Size",
+      "width": 400,
+      "height": 200
+    },
+    "_anchorPoint": {
+      "__type__": "cc.Vec2",
+      "x": 0.5,
+      "y": 0.5
+    },
+    "_id": ""
+  },
+  {
+    "__type__": "cc.CompPrefabInfo",
+    "fileId": "57O9ipT+VFL4K/iw+feoH1"
+  },
+  {
+    "__type__": "cc.Sprite",
+    "_name": "",
+    "_objFlags": 0,
+    "__editorExtras__": {},
+    "node": {
+      "__id__": 1
+    },
+    "_enabled": true,
+    "__prefab": {
+      "__id__": 13
+    },
+    "_customMaterial": null,
+    "_srcBlendFactor": 2,
+    "_dstBlendFactor": 4,
+    "_color": {
+      "__type__": "cc.Color",
+      "r": 255,
+      "g": 255,
+      "b": 255,
+      "a": 255
+    },
+    "_spriteFrame": {
+      "__uuid__": "20835ba4-6145-4fbc-a58a-051ce700aa3e@f9941",
+      "__expectedType__": "cc.SpriteFrame"
+    },
+    "_type": 0,
+    "_fillType": 0,
+    "_sizeMode": 0,
+    "_fillCenter": {
+      "__type__": "cc.Vec2",
+      "x": 0,
+      "y": 0
+    },
+    "_fillStart": 0,
+    "_fillRange": 0,
+    "_isTrimmedMode": true,
+    "_useGrayscale": false,
+    "_atlas": null,
+    "_id": ""
+  },
+  {
+    "__type__": "cc.CompPrefabInfo",
+    "fileId": "d9fvXUPORDUZ3ZC/NsY7PN"
+  },
+  {
+    "__type__": "5cbfdgUaENJ7riEID6ClvZl",
+    "_name": "",
+    "_objFlags": 0,
+    "__editorExtras__": {},
+    "node": {
+      "__id__": 1
+    },
+    "_enabled": true,
+    "__prefab": {
+      "__id__": 15
+    },
+    "lab_name": {
+      "__id__": 2
+    },
+    "_id": ""
+  },
+  {
+    "__type__": "cc.CompPrefabInfo",
+    "fileId": "d4jNCOEg1E5oLvavn+jYHM"
+  },
+  {
+    "__type__": "cc.PrefabInfo",
+    "root": {
+      "__id__": 1
+    },
+    "asset": {
+      "__id__": 0
+    },
+    "fileId": "c46/YsCPVOJYA4mWEpNYRx",
+    "instance": null,
+    "targetOverrides": null
+  }
+]

+ 13 - 0
assets/resources/prefab/long_story_list_item.prefab.meta

@@ -0,0 +1,13 @@
+{
+  "ver": "1.1.49",
+  "importer": "prefab",
+  "imported": true,
+  "uuid": "6bad5cc6-eaa3-4382-a3c8-6afd4eef7f58",
+  "files": [
+    ".json"
+  ],
+  "subMetas": {},
+  "userData": {
+    "syncNodeName": "long_story_list_item"
+  }
+}

+ 1 - 1
assets/script/config.ts

@@ -5,7 +5,7 @@ const { ccclass, property } = _decorator;
 export class config {
     static debug = true;
     static domain = "https://zcapi.xwrun.com";
-    static version = '调试 v2.0.7'
+    static version = '调试 v2.1.0'
     static is_MAC_edit = false; //目前临时处理:如果是Mac并且浏览器打开了检查时设置为true,正式打包需要设置为false
     static select_res_and_control_type = {
         RES_TYPE:0,

+ 45 - 42
assets/script/edit/level_list.ts

@@ -1,30 +1,38 @@
-import { _decorator, Component, instantiate, Label, Node, Prefab } from 'cc';
+import { _decorator, Component, instantiate, Label, Node, Prefab, utils } from 'cc';
 import { http } from '../http';
 import { config } from '../config';
-import { level_list_item_data } from '../../data/data';
+import { level_list_item_data, long_story_list_item_data } from '../../data/data';
 import { level_list_item } from './level_list_item';
 import { tools } from '../tools';
 const { ccclass, property } = _decorator;
 
 @ccclass('level_list')
 export class level_list extends Component {
-    @property(Node) version:Node = null;
+    @property(Node) btn_back:Node = null;
+    @property(Node) lab_title:Node = null;
     @property(Node) content:Node = null;
     @property(Prefab) item:Prefab = null;
     @property(Node) page_number:Node = null;
     @property(Node) btn_previous_page:Node = null;
     @property(Node) lab_current_page:Node = null;
     @property(Node) btn_next_page:Node = null;
-
+ 
+    private m_long_story_list_data: long_story_list_item_data = null
+    
+    private m_back_call_back = null;
     private m_click_callback = null;
 
     private m_cur_page:number = 1;
     private m_every_page_count:number = 18;
     private m_total_page_count:number = 0;
-    private m_prefab_node_list:Node[] = [];
 
     protected start(): void {
-        this.version.getComponent(Label).string = config.version
+        this.btn_back.on(Node.EventType.TOUCH_END,()=>{
+            if(this.m_back_call_back) {
+                this.m_back_call_back()
+            }
+        })
+
         this.page_number.active = false
         let self = this
         this.btn_previous_page.on(Node.EventType.TOUCH_END, ()=> {
@@ -45,52 +53,47 @@ export class level_list extends Component {
         },this)
     }
 
-    public init(call_back){
+    public init(long_story_list_data: long_story_list_item_data, back_call_back, call_back){
+        this.m_long_story_list_data = long_story_list_data
+        if(this.m_long_story_list_data) {
+            this.lab_title.getComponent(Label).string = this.m_long_story_list_data.name
+        }
+        this.m_back_call_back = back_call_back;
         this.m_click_callback = call_back;
         this.requestData()
     }
 
     initView(list:level_list_item_data[]){
-        if(this.m_prefab_node_list.length == 0) {
-            this.content.removeAllChildren()
-            for (let index = 0; index < list.length; index++) {
-                const element = list[index];
-                let node = instantiate(this.item)
-                node.parent = this.content;
-                this.m_prefab_node_list.push(node)
-                node.getComponent(level_list_item).initView(element,this.m_click_callback)
-            }
-        } else {
-            for(let index = 0; index < this.m_prefab_node_list.length; index++) {
-                let node = this.m_prefab_node_list[index]
-                if(index < list.length) {
-                    node.active = true
-                    const element = list[index]
-                    node.getComponent(level_list_item).initView(element,this.m_click_callback)
-                } else {
-                    node.active = false
-                }
-            }
+        for (let index = 0; index < list.length; index++) {
+            const element = list[index];
+            let node = instantiate(this.item)
+            node.parent = this.content;
+            node.getComponent(level_list_item).initView(element,this.m_click_callback)
         }
     }
 
     requestData() {
-        let request_data = {"page":this.m_cur_page,"limit":this.m_every_page_count}
-        http.post("/tool/mysnote/levels",request_data,(err,data)=>{
-            if(!err){
-                // console.log(data)
-                let _data = JSON.parse(data);
-                let __data =  _data.content
-                if(this.m_cur_page == 1) {
-                    this.page_number.active = true
-                    this.m_total_page_count = Math.ceil(__data.tool_number/this.m_every_page_count)
+        this.content.removeAllChildren()
+        if(this.m_long_story_list_data==null) {
+            let request_data = {"page":this.m_cur_page,"limit":this.m_every_page_count}
+            http.post("/tool/mysnote/levels",request_data,(err,data)=>{
+                if(!err){
+                    // console.log(data)
+                    let _data = JSON.parse(data);
+                    let __data =  _data.content
+                    if(this.m_cur_page == 1) {
+                        this.page_number.active = true
+                        this.m_total_page_count = Math.ceil(__data.tool_number/this.m_every_page_count)
+                    }
+                    this.setupLabNumber()
+                    config.last_id = parseInt(_data.content.zujian_id)
+                    console.log("level_list",config.last_id )
+                    this.initView(__data.list)
                 }
-                this.setupLabNumber()
-                config.last_id = parseInt(_data.content.zujian_id)
-                console.log("level_list",config.last_id )
-                this.initView(__data.list)
-            }
-        })
+            })
+        } else {
+
+        }
     }
 
     setupLabNumber() {

+ 109 - 0
assets/script/edit/long_story_list.ts

@@ -0,0 +1,109 @@
+import { _decorator, Component, instantiate, Label, Node, Prefab } from 'cc';
+import { tools } from '../tools';
+import { long_story_list_item } from './long_story_list_item';
+import { long_story_list_item_data } from '../../data/data';
+const { ccclass, property } = _decorator;
+
+@ccclass('long_story_list')
+export class long_story_list extends Component {
+    @property(Node) btn_back:Node = null;
+    @property(Node) content:Node = null;
+    @property(Prefab) item:Prefab = null;
+    @property(Node) page_number:Node = null;
+    @property(Node) btn_previous_page:Node = null;
+    @property(Node) lab_current_page:Node = null;
+    @property(Node) btn_next_page:Node = null;
+
+    private m_back_call_back = null;
+    private m_click_callback = null;
+
+    private m_cur_page:number = 1;
+    private m_every_page_count:number = 9;
+    private m_total_page_count:number = 0;
+    private m_prefab_node_list:Node[] = [];
+
+    start() {
+        this.btn_back.on(Node.EventType.TOUCH_END,()=>{
+            if(this.m_back_call_back) {
+                this.m_back_call_back()
+            }
+        })
+        this.page_number.active = false
+        let self = this
+        this.btn_previous_page.on(Node.EventType.TOUCH_END, ()=> {
+            if(self.m_cur_page == 1) {
+                tools.showToast("已是第一页")
+                return
+            }
+            self.m_cur_page-=1
+            self.requestData()
+        })
+        this.btn_next_page.on(Node.EventType.TOUCH_END, ()=> {
+            if(self.m_cur_page >= self.m_total_page_count) {
+                tools.showToast("已是最后一页")
+                return
+            }
+            self.m_cur_page+=1
+            self.requestData()
+        })
+    }
+
+    init(back_callback, click_call_back) {
+        this.m_back_call_back = back_callback
+        this.m_click_callback = click_call_back
+        this.requestData()
+    }
+
+    private requestData() {
+        this.initView()
+    }
+
+    initView(){
+        setTimeout(()=>{
+            if(this.m_cur_page == 1) {
+                this.page_number.active = true
+                this.m_total_page_count = Math.ceil(9/this.m_every_page_count)
+            }
+            this.setupLabNumber()
+            
+            this.content.removeAllChildren()
+            for(let index = 0; index<9; index++) {
+                let element:long_story_list_item_data = new long_story_list_item_data()
+                element.id = index+1
+                element.name = '小说'+(index+1)
+    
+                let node = instantiate(this.item)
+                node.parent = this.content
+                node.getComponent(long_story_list_item).init(element,this.m_click_callback)
+            }
+            this.page_number.active = true
+        },100)
+        // if(this.m_prefab_node_list.length == 0) {
+        //     this.content.removeAllChildren()
+        //     for (let index = 0; index < list.length; index++) {
+        //         const element = list[index];
+        //         let node = instantiate(this.item)
+        //         node.parent = this.content;
+        //         this.m_prefab_node_list.push(node)
+        //         node.getComponent(level_list_item).initView(element,this.m_click_callback)
+        //     }
+        // } else {
+        //     for(let index = 0; index < this.m_prefab_node_list.length; index++) {
+        //         let node = this.m_prefab_node_list[index]
+        //         if(index < list.length) {
+        //             node.active = true
+        //             const element = list[index]
+        //             node.getComponent(level_list_item).initView(element,this.m_click_callback)
+        //         } else {
+        //             node.active = false
+        //         }
+        //     }
+        // }
+    }
+
+    setupLabNumber() {
+        let string = this.m_cur_page + ' / ' + this.m_total_page_count
+        this.lab_current_page.getComponent(Label).string = string
+    }
+}
+

+ 9 - 0
assets/script/edit/long_story_list.ts.meta

@@ -0,0 +1,9 @@
+{
+  "ver": "4.0.23",
+  "importer": "typescript",
+  "imported": true,
+  "uuid": "84763035-eaf4-4ef6-8c63-321e26d82c83",
+  "files": [],
+  "subMetas": {},
+  "userData": {}
+}

+ 24 - 0
assets/script/edit/long_story_list_item.ts

@@ -0,0 +1,24 @@
+import { _decorator, Component, Label, Node } from 'cc';
+import { long_story_list_item_data } from '../../data/data';
+const { ccclass, property } = _decorator;
+
+@ccclass('long_story_list_item')
+export class long_story_list_item extends Component {
+    @property(Node) lab_name:Node = null;
+    private m_data:long_story_list_item_data = null;
+    private m_call_back = null
+    start() {
+        this.node.on(Node.EventType.TOUCH_END,()=>{
+            if(this.m_call_back) {
+                this.m_call_back(this.m_data)
+            }
+        })
+    }
+
+    init(data:long_story_list_item_data, call_back) {
+        this.m_data = data;
+        this.m_call_back = call_back
+        this.lab_name.getComponent(Label).string = data.name;
+    }
+}
+

+ 9 - 0
assets/script/edit/long_story_list_item.ts.meta

@@ -0,0 +1,9 @@
+{
+  "ver": "4.0.23",
+  "importer": "typescript",
+  "imported": true,
+  "uuid": "5cbfd814-6843-49ee-b884-203e8296f665",
+  "files": [],
+  "subMetas": {},
+  "userData": {}
+}

+ 32 - 0
assets/script/edit/select_long_story_level.ts

@@ -0,0 +1,32 @@
+import { _decorator, Component, Label, Node } from 'cc';
+import { config } from '../config';
+const { ccclass, property } = _decorator;
+
+@ccclass('select_long_story_level')
+export class select_long_story_level extends Component {
+    @property(Node) version = null
+    @property(Node) btn_short:Node = null
+    @property(Node) btn_long:Node = null
+    private m_short_cb = null
+    private m_long_cb = null
+
+    protected start(): void {
+        this.version.getComponent(Label).string = config.version
+        this.btn_short.on(Node.EventType.TOUCH_END,()=>{
+            if(this.m_short_cb) {
+                this.m_short_cb()
+            }
+        })
+        this.btn_long.on(Node.EventType.TOUCH_END,()=>{
+            if(this.m_long_cb) {
+                this.m_long_cb()
+            }
+        })
+    }
+   
+    initView(short_cb:Function, long_cb: Function) {
+        this.m_short_cb = short_cb
+        this.m_long_cb = long_cb
+    }
+}
+

+ 9 - 0
assets/script/edit/select_long_story_level.ts.meta

@@ -0,0 +1,9 @@
+{
+  "ver": "4.0.23",
+  "importer": "typescript",
+  "imported": true,
+  "uuid": "c567af80-a13a-4fe6-b80b-fc80b1425b5e",
+  "files": [],
+  "subMetas": {},
+  "userData": {}
+}

+ 46 - 11
assets/script/main.ts

@@ -1,7 +1,7 @@
 import { _decorator, AudioSource, Canvas, Component, EventTouch, instantiate, Node, Rect, Size, UITransform, Vec3 } from 'cc';
 import { level_list } from './edit/level_list';
 import { http } from './http';
-import { level_list_item_data } from '../data/data';
+import { level_list_item_data, long_story_list_item_data } from '../data/data';
 import { tools } from './tools';
 import { control } from './edit/control';
 import { config } from './config';
@@ -11,6 +11,8 @@ import { Attributes } from './edit/Attributes';
 import { base_res } from './edit/base_res';
 import { widget_item } from './edit/widget_item';
 import { img_item } from './edit/img_item';
+import { long_story_list } from './edit/long_story_list';
+import { select_long_story_level } from './edit/select_long_story_level';
 const { ccclass, property } = _decorator;
 
 @ccclass('main')
@@ -20,6 +22,8 @@ export class main extends Component {
     public static g_audioSource:AudioSource = null;
     public static cur_play_audio:string = "";
     public static Singleton:main = null;
+    @property(Node) select_long_story_level_node:Node = null;
+    @property(Node) long_story_list:Node = null;
     @property(Node) level_list:Node = null;
     @property(Node) btn_back_level_list:Node = null;
     @property(control) control_view:control = null;
@@ -28,13 +32,10 @@ export class main extends Component {
     @property(Node) res_action_node:Node = null;
     @property(Node) attributes_node:Node = null;
     protected start(): void {
-        this.level_list.active = true;
+        this.initView()
+
         main.Singleton = this;
         main.g_canvas = this.node.getComponent(Canvas);
-        this.level_list.getComponent(level_list).init(this.onSelectLevel.bind(this))
-        this.btn_back_level_list.on(Node.EventType.TOUCH_END,()=>{
-            this.onBackLevelList()
-        })
         main.g_audioSource = this.node.addComponent(AudioSource)
         ClientEvent.on(config.Event.DragWidget,this.onDragWidget,this)
         ClientEvent.on(config.Event.DragRes,this.onDragRes,this)
@@ -54,6 +55,45 @@ export class main extends Component {
         this.attributes_node.getComponent(Attributes).initView(this)
     }
 
+    public initView() {
+        this.select_long_story_level_node.active = true
+        this.select_long_story_level_node.getComponent(select_long_story_level).initView(()=>{
+            // 显示-关卡
+            this.select_long_story_level_node.active = false
+            this.level_list.active = true
+            this.level_list.getComponent(level_list).init(null,()=>{
+                this.select_long_story_level_node.active = true
+                this.level_list.active = false
+            },this.onSelectLevel.bind(this))
+
+        },()=>{
+            this.select_long_story_level_node.active = false
+            this.long_story_list.active = true
+            this.long_story_list.getComponent(long_story_list).init(()=>{
+                // 显示-长篇列表
+                this.select_long_story_level_node.active = true
+                this.long_story_list.active = false
+            },(d:long_story_list_item_data)=>{
+                // 显示-关卡
+                this.long_story_list.active = false
+                this.level_list.active = true
+                this.level_list.getComponent(level_list).init(d,()=>{
+                    this.long_story_list.active = true
+                    this.level_list.active = false
+                },this.onSelectLevel.bind(this))
+            })
+        })
+
+        this.btn_back_level_list.on(Node.EventType.TOUCH_END,()=>{
+            this.onBackLevelList()
+        })
+    }
+
+    onBackLevelList(){
+        this.level_list.active = true;
+        ClientEvent.dispatchEvent(config.Event.BackLevelList)
+    }
+
     public static getAudioSource(){
         return main.g_audioSource;
     }
@@ -89,11 +129,6 @@ export class main extends Component {
         })
     }
 
-    onBackLevelList(){
-        this.level_list.active = true;
-        ClientEvent.dispatchEvent(config.Event.BackLevelList)
-    }
-
     onDragWidget(node:Node){
         if(this.action_node.children.length<=0&&!this.action_node.active){
             this.action_node.active = true;

Some files were not shown because too many files changed in this diff