future 1 жил өмнө
parent
commit
30d410577b

+ 26 - 1
assets/data/data.ts

@@ -1,4 +1,4 @@
-import { NodeEventType } from "cc";
+import { Color, NodeEventType } from "cc";
 import { config } from "../script/config";
 
 export class attributes_data{
@@ -42,6 +42,7 @@ export class att_count_down{
     public start_event_id:number = -1;
     public finish_event_id:number = -1;
     public fail_event_id:number = -1;
+    public font_info:font_info = new font_info;
 }
 
 export class att_question_select{
@@ -150,6 +151,30 @@ export class att_top_data{
     }
 }
 
+export class font_color_info{
+    public r:number = 255;
+    public g:number = 255;
+    public b:number = 255;
+
+    public info(r:number,g:number,b:number):font_color_info{
+        this.r = r;
+        this.g = g;
+        this.b = b;
+        return this;
+    }
+    public infoColor(color:Color):font_color_info{
+        this.r = color.r;
+        this.g = color.g;
+        this.b = color.b;
+        return this;
+    }
+}
+
+export class font_info{
+    public font_color:font_color_info = new font_color_info;
+    public font_size:number = 20;
+}
+
 export class ui_att_item{
     public x:number = 0;
     public y:number = 0;

+ 6 - 6
assets/resources/prefab/run/scene_page.prefab

@@ -165,8 +165,8 @@
     },
     "_lpos": {
       "__type__": "cc.Vec3",
-      "x": 0,
-      "y": 0,
+      "x": -540,
+      "y": -960,
       "z": 0
     },
     "_lrot": {
@@ -221,8 +221,8 @@
     },
     "_lpos": {
       "__type__": "cc.Vec3",
-      "x": -540,
-      "y": -960,
+      "x": 0,
+      "y": 0,
       "z": 0
     },
     "_lrot": {
@@ -407,8 +407,8 @@
     },
     "_anchorPoint": {
       "__type__": "cc.Vec2",
-      "x": 0.5,
-      "y": 0.5
+      "x": 0,
+      "y": 0
     },
     "_id": ""
   },

+ 1 - 1
assets/scene/game.scene

@@ -6870,7 +6870,7 @@
     "_contentSize": {
       "__type__": "cc.Size",
       "width": 190,
-      "height": 400
+      "height": 40
     },
     "_anchorPoint": {
       "__type__": "cc.Vec2",

+ 4 - 1
assets/script/run/TaskSchedule/taskServce.ts

@@ -411,7 +411,10 @@ export class taskServce {
 
         if(isFinish){
             let id =taskServce.mTaskData._zhao_xi_jie_data.finish_event_id;
-            ClientEvent.dispatchEvent(config.EventRun.ON_ZHAO_BU_TONG_ALL_FINISH, taskServce.mTaskData._zhao_xi_jie_data)
+            gameManager.Singleton.setScheduleOnce(()=>{
+                ClientEvent.dispatchEvent(config.EventRun.ON_ZHAO_BU_TONG_ALL_FINISH, taskServce.mTaskData._zhao_xi_jie_data)
+            },0.2)
+            gameManager
             if(id==-1){
                 return tools.showToast("未设置全部找完任务的下一个事件!")
             }else{

+ 4 - 0
assets/script/run/gameManager.ts

@@ -716,6 +716,10 @@ export class gameManager extends Component {
     public getCurSceneLayerPage(){
         return this.mGameRun.getCurSceneLayerPage()
     }
+
+    public setScheduleOnce(callback:any, delay?:number) {
+        this.scheduleOnce(callback,delay)
+    }
     
     public static request_user_unlock_number_status(status = config.User_unlock_levels_number_status.GET, success_callback:any, fail_callback:any) {
         if(status != config.User_unlock_levels_number_status.GET) {

+ 1 - 1
assets/script/run/scene_page.ts

@@ -1,4 +1,4 @@
-import { _decorator, Color, Component, instantiate, misc, Node, Prefab, ScrollView, Size, Sprite, tween, Tween, UIOpacity, UITransform, Vec3, Widget } from 'cc';
+import { _decorator, color, Color, Component, instantiate, misc, Node, Prefab, ScrollView, Size, Sprite, tween, Tween, UIOpacity, UITransform, Vec3, Widget } from 'cc';
 import { ani_frame, att_ani_data, attributes_data, event_item, event_item_delete_drag_other, guo_ju_qing_dai_dao_ju, scene_item_data, widget_item_data, zhao_xi_jie_data, zhao_xi_jie_item_data } from '../../data/data';
 import { config } from '../config';
 import { tools } from '../tools';

+ 7 - 1
assets/script/run/ui/count_down.ts

@@ -1,4 +1,4 @@
-import { _decorator, Component, Label, Node, ProgressBar } from 'cc';
+import { _decorator, Color, Component, Label, Node, ProgressBar } from 'cc';
 import { att_count_down, widget_item_data } from '../../../data/data';
 import { gameManager } from '../gameManager';
 const { ccclass, property } = _decorator;
@@ -24,6 +24,12 @@ export class count_down extends Component {
 
         this.add_time = 0;
 
+        if(this.m_data.font_info!=undefined){
+            this.lab_time.getComponent(Label).fontSize = this.m_data.font_info.font_size;
+            this.lab_time.getComponent(Label).lineHeight = this.m_data.font_info.font_size;
+            this.lab_time.getComponent(Label).color = new Color(this.m_data.font_info.font_color.r,this.m_data.font_info.font_color.g,this.m_data.font_info.font_color.b)
+        }
+
         gameManager.initUiBaseAtt(this.ProgressBar_Bar,this.m_data.ProgressBar_Bar)
         
         gameManager.initUiBaseAtt(this.ProgressBar_Bg,this.m_data.ProgressBar_Bg)

+ 1 - 1
assets/script/run/ui/ui_boss_info.ts

@@ -9,7 +9,7 @@ const { ccclass, property } = _decorator;
 
 @ccclass('ui_boss_info')
 export class ui_boss_info extends ui_base {
-    @property(Node) bg:Node = null;
+    // @property(Node) bg:Node = null; //ui_base中属性bg重复,控制台报黄色警告
     @property(Node) bg_bar:Node = null;
     @property(Node) bar:Node = null;
     @property(Node) head:Node = null;