future 1 年之前
父節點
當前提交
6d2d147b16
共有 3 個文件被更改,包括 270 次插入148 次删除
  1. 259 145
      assets/edit_game.scene
  2. 6 2
      assets/resources/prefab/ui/ui_top.prefab
  3. 5 1
      assets/script/edit/uiWidget/view_not_have_interact.ts

文件差異過大導致無法顯示
+ 259 - 145
assets/edit_game.scene


+ 6 - 2
assets/resources/prefab/ui/ui_top.prefab

@@ -328,7 +328,7 @@
     "_contentSize": {
       "__type__": "cc.Size",
       "width": 1920,
-      "height": 1080
+      "height": 1920
     },
     "_anchorPoint": {
       "__type__": "cc.Vec2",
@@ -434,6 +434,10 @@
     "bg": {
       "__id__": 3
     },
+    "sf_bg_default": {
+      "__uuid__": "838412db-8fc1-4e7f-a375-ae4e8fe28b0d@f9941",
+      "__expectedType__": "cc.SpriteFrame"
+    },
     "_id": ""
   },
   {
@@ -12969,7 +12973,7 @@
     "_contentSize": {
       "__type__": "cc.Size",
       "width": 1920,
-      "height": 1080
+      "height": 1920
     },
     "_anchorPoint": {
       "__type__": "cc.Vec2",

+ 5 - 1
assets/script/edit/uiWidget/view_not_have_interact.ts

@@ -1,4 +1,4 @@
-import { _decorator, Component, Node } from 'cc';
+import { _decorator, Component, Node, Sprite, SpriteFrame } from 'cc';
 import { view_ui_att_item } from './view_ui_att_item';
 import { not_have_interact_data } from '../../../data/data';
 const { ccclass, property } = _decorator;
@@ -6,6 +6,7 @@ const { ccclass, property } = _decorator;
 @ccclass('view_not_have_interact')
 export class view_not_have_interact extends Component {
     @property(Node) bg:Node = null;
+    @property(SpriteFrame) sf_bg_default:SpriteFrame = null;
     private m_data:not_have_interact_data = null;
     public updateView(data:not_have_interact_data){
         if(data===null){
@@ -14,6 +15,9 @@ export class view_not_have_interact extends Component {
         this.m_data = data;
         this.bg.getComponent(view_ui_att_item).updateAtt(data.bg)
         data.bg = this.bg.getComponent(view_ui_att_item).getData()
+        if(this.m_data.bg.res.length==0||this.m_data.bg.res_name.length==0) {
+            this.bg.getComponent(view_ui_att_item).getComponent(Sprite).spriteFrame = this.sf_bg_default
+        }
     }
 
     public getData(){

部分文件因文件數量過多而無法顯示