future 11 月之前
父节点
当前提交
4c84bf8c1e

+ 10 - 0
assets/data/data.ts

@@ -666,6 +666,16 @@ export class LevelItemData{
     public category_id:number = 0;//"0=>"无","1"=>"恐怖","2"=>"剧情","3"=>"怀旧","4"=>"脑洞","5"=>"推理"
     public label_id:number = 0; // "0"=>"无","1"=>"新","2"=>"热"
 }
+
+export class gameMessage extends Message{
+    public content :game_config = null;
+} 
+
+export class game_config {
+    public short_txt_status:number = 1 
+    public long_txt_status:number = 1  // 0:不显示 1:显示
+}
+
 export class sysMessage extends Message{
     public content :sys_config = null;
 }

二进制
assets/run/login/img_long_story_logo.png


+ 29 - 29
assets/run/login/img_long_story_logo.png.meta

@@ -42,12 +42,12 @@
         "trimType": "auto",
         "trimThreshold": 1,
         "rotated": false,
-        "offsetX": 0,
+        "offsetX": 0.5,
         "offsetY": 0,
-        "trimX": 0,
-        "trimY": 0,
-        "width": 394,
-        "height": 287,
+        "trimX": 1,
+        "trimY": 1,
+        "width": 393,
+        "height": 285,
         "rawWidth": 394,
         "rawHeight": 287,
         "borderTop": 0,
@@ -61,17 +61,17 @@
         "meshType": 0,
         "vertices": {
           "rawPosition": [
-            -197,
-            -143.5,
+            -196.5,
+            -142.5,
             0,
-            197,
-            -143.5,
+            196.5,
+            -142.5,
             0,
-            -197,
-            143.5,
+            -196.5,
+            142.5,
             0,
-            197,
-            143.5,
+            196.5,
+            142.5,
             0
           ],
           "indexes": [
@@ -83,33 +83,33 @@
             3
           ],
           "uv": [
-            0,
-            287,
+            1,
+            286,
             394,
-            287,
-            0,
-            0,
+            286,
+            1,
+            1,
             394,
-            0
+            1
           ],
           "nuv": [
-            0,
-            0,
-            1,
-            0,
-            0,
+            0.0025380710659898475,
+            0.003484320557491289,
             1,
+            0.003484320557491289,
+            0.0025380710659898475,
+            0.9965156794425087,
             1,
-            1
+            0.9965156794425087
           ],
           "minPos": [
-            -197,
-            -143.5,
+            -196.5,
+            -142.5,
             0
           ],
           "maxPos": [
-            197,
-            143.5,
+            196.5,
+            142.5,
             0
           ]
         },

二进制
assets/run/login/img_start.png


二进制
assets/run/login/img_start_glow.png


+ 12 - 12
assets/run/login/img_start_glow.png.meta

@@ -43,11 +43,11 @@
         "trimThreshold": 1,
         "rotated": false,
         "offsetX": 0,
-        "offsetY": 0,
+        "offsetY": 1,
         "trimX": 0,
         "trimY": 0,
         "width": 265,
-        "height": 133,
+        "height": 131,
         "rawWidth": 265,
         "rawHeight": 133,
         "borderTop": 0,
@@ -62,16 +62,16 @@
         "vertices": {
           "rawPosition": [
             -132.5,
-            -66.5,
+            -65.5,
             0,
             132.5,
-            -66.5,
+            -65.5,
             0,
             -132.5,
-            66.5,
+            65.5,
             0,
             132.5,
-            66.5,
+            65.5,
             0
           ],
           "indexes": [
@@ -88,15 +88,15 @@
             265,
             133,
             0,
-            0,
+            2,
             265,
-            0
+            2
           ],
           "nuv": [
             0,
-            0,
+            0.015037593984962405,
             1,
-            0,
+            0.015037593984962405,
             0,
             1,
             1,
@@ -104,12 +104,12 @@
           ],
           "minPos": [
             -132.5,
-            -66.5,
+            -65.5,
             0
           ],
           "maxPos": [
             132.5,
-            66.5,
+            65.5,
             0
           ]
         },

+ 3 - 3
assets/scene/game.scene

@@ -20620,7 +20620,7 @@
     "_contentSize": {
       "__type__": "cc.Size",
       "width": 265,
-      "height": 133
+      "height": 131
     },
     "_anchorPoint": {
       "__type__": "cc.Vec2",
@@ -21130,8 +21130,8 @@
     "__prefab": null,
     "_contentSize": {
       "__type__": "cc.Size",
-      "width": 394,
-      "height": 287
+      "width": 393,
+      "height": 285
     },
     "_anchorPoint": {
       "__type__": "cc.Vec2",

+ 1 - 0
assets/script/config.ts

@@ -5,6 +5,7 @@ const { ccclass, property } = _decorator;
 export class config {
     static debug = true;
     static is_zb = false; //是否是主播模式
+    static gameID = 10000;
     static gameName = "神秘的笔记";
     static Platform = {
         BROWSER:"BROWSER",

+ 4 - 0
assets/script/http.ts

@@ -88,6 +88,10 @@ export class http {
         return `/note/user/login`
     }
 
+    public static get_game_config(game_id:number,platform:string):string {
+        return `/smistatic/game_config/${game_id}_${platform}.json`
+    }
+
     public static get_sys_config(): string {
         return `/smistatic/sys_config.json`
     }

+ 11 - 2
assets/script/run/gameManager.ts

@@ -1,6 +1,6 @@
 import { _decorator, AudioClip, AudioSource, Component, Node, Size, Sprite, SpriteFrame, sys, UITransform, Vec3 } from 'cc';
 import { game_run } from './game_run';
-import { attributes_data, event_item, LevelItemData, other_widget_finish_listen_item, scene_item_data, SelectLongStoryData, sysMessage, task_data, ui_att_item, UserData, UserUnlockLevesData, widget_item_data } from '../../data/data';
+import { attributes_data, event_item, gameMessage, LevelItemData, other_widget_finish_listen_item, scene_item_data, SelectLongStoryData, sysMessage, task_data, ui_att_item, UserData, UserUnlockLevesData, widget_item_data } from '../../data/data';
 import { config } from '../config';
 import { sceneManager } from './sceneManager';
 
@@ -25,6 +25,7 @@ export class gameManager extends Component {
     public static res_map:Map<string,SpriteFrame> = new Map()
     public static mp3_cache:Map<string,AudioClip> = new Map()
     private mLevelData:LevelItemData = null;
+    private static game_data:gameMessage = null;
     private static sys_data:sysMessage = null;
     private static isLoadingStatus:boolean = false;
     public static lookVideoAdsNumber:number = 0;
@@ -195,7 +196,15 @@ export class gameManager extends Component {
         return this.mLevelData;
     }
 
-    public  static setSysData(data:sysMessage){
+    public static setGameData(data:gameMessage) {
+        gameManager.game_data = data
+    }
+
+    public static getGameData() {
+        return gameManager.game_data
+    }
+
+    public static setSysData(data:sysMessage){
         gameManager.sys_data = data;
     }
 

+ 14 - 6
assets/script/run/game_list_view/game_list.ts

@@ -47,6 +47,14 @@ export class game_list extends Component {
     }
 
     public initButtonType() {
+        let game_config = gameManager.getGameData().content
+        if(game_config.long_txt_status==1) {
+            this.btn_long_story_type.active = true
+        } else {
+            this.btn_level_type.active = false
+            this.btn_long_story_type.active = false
+        }
+
         this.btn_level_type.on(Node.EventType.TOUCH_END, ()=>{
             this.clickButtonType(config.LevelType.LEVEL)
         })
@@ -99,7 +107,7 @@ export class game_list extends Component {
         ClientEvent.off(config.EventRun.WIN_LATER_AUTO_UNLOCK_NEXT_LEVEL,this.autoUnlockNextLevel.bind(this),this)
         ClientEvent.on(config.EventRun.WIN_LATER_AUTO_UNLOCK_NEXT_LEVEL,this.autoUnlockNextLevel.bind(this),this)
         this.initContentTouch()
-        this.loadView()      
+        this.loadLevelView()      
     }
 
     private requestLongStoryData() {
@@ -139,7 +147,7 @@ export class game_list extends Component {
         item.getComponent(long_story_item).initView(null,null) 
     }
 
-    private requestData(cb=null) {
+    private requestLevelData(cb=null) {
         let user_data = gameManager.getStaticUserData()
         let url = http.getPlatformLevelsList(config.LevelType.LEVEL,0,SdkUtil.getPlatformIdentify(), user_data.select_page, this.page_limit_count)
         http.run_get_static(url,(err,data)=>{
@@ -151,14 +159,14 @@ export class game_list extends Component {
         })
     }
 
-    public loadView(){
-        this.requestData(()=>{
+    public loadLevelView(){
+        this.requestLevelData(()=>{
             this.initContentPosition()
             if(this.is_selectPage_dayu_allPage==false && gameManager.getStaticUserData().select_page>this.getAllPage()) {
                 this.is_selectPage_dayu_allPage = true
                 gameManager.getStaticUserData().select_page = 1
                 gameManager.saveUserData()
-                this.loadView()
+                this.loadLevelView()
                 return
             } 
             this.m_loading_finish_call && this.m_loading_finish_call()
@@ -258,7 +266,7 @@ export class game_list extends Component {
         this.level_content.removeAllChildren()
         gameManager.getStaticUserData().select_page = page
         gameManager.saveUserData()
-        this.requestData()
+        this.requestLevelData()
     }
 
     onUpPage(){

+ 13 - 1
assets/script/run/loading_view/loading_view.ts

@@ -1,5 +1,5 @@
 import { _decorator, Component, Label, Node, ProgressBar, sys } from 'cc';
-import { getOpenidMessage, getTestUserListMessage, LevelMessage, sysMessage, UserData } from '../../../data/data';
+import { gameMessage, getOpenidMessage, getTestUserListMessage, LevelMessage, sysMessage, UserData } from '../../../data/data';
 import { gameManager } from '../gameManager';
 import { http } from '../../http';
 import { config } from '../../config';
@@ -37,6 +37,7 @@ export class loading_view extends Component {
                 return;
             }
             progress +=0.1
+            progress = parseFloat(progress.toFixed(1))
             if(progress<=1) {
                 this.loading_bar.getComponent(ProgressBar).progress = progress - 0.02
                 this.lab_loading_bar.getComponent(Label).string = `${(progress*100).toFixed()}%`
@@ -52,6 +53,17 @@ export class loading_view extends Component {
                         }
                     })
                 break;
+                case 0.3:
+                    this.m_pause_status = true;
+                    let url = http.get_game_config(config.gameID,SdkUtil.getPlatformIdentify())
+                    http.run_get_static(url, (err,data)=>{
+                        if(!err) {
+                            let game_data:gameMessage = JSON.parse(data)
+                            gameManager.setGameData(game_data)
+                            this.m_pause_status = false;
+                        }
+                    })
+                break;
                 case 0.5:
                     this.m_pause_status = true;
                     let user_data;

+ 1 - 2
assets/script/sdkUtil.ts

@@ -76,9 +76,8 @@ export class SdkUtil {
             case config.Platform.KS:
                 identify = config.PLATFORM_IDENTIFY.KS
                 break;
-            
             default:
-            break;
+                break;
         }
         return identify
     }