zhaoyang 3 жил өмнө
parent
commit
ccee90ba5e

+ 2 - 0
FGUIProject/assets/Friend/FriendAddUI.xml

@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="utf-8"?>
+<component size="1080,1920"/>

+ 7 - 0
FGUIProject/assets/Friend/FriendUI.xml

@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="utf-8"?>
+<component size="1080,1920">
+  <displayList>
+    <component id="n0_jdju" name="btnBack" src="9xlo8" fileName="components/ButtonBack1.xml" pkg="eg2y0ldp" xy="35,80"/>
+    <component id="n1_jdju" name="btnAdd" src="jdju1" fileName="components/Button1.xml" xy="120,1686"/>
+  </displayList>
+</component>

+ 19 - 0
FGUIProject/assets/Friend/components/Button1.xml

@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="utf-8"?>
+<component size="100,100" extention="Button">
+  <controller name="button" pages="0,up,1,down,2,over,3,selectedOver" selected="0"/>
+  <displayList>
+    <graph id="n0_jdju" name="n0" xy="0,0" size="100,100" touchable="false" type="rect" lineSize="0" fillColor="#fff0f0f0">
+      <gearDisplay controller="button" pages="0"/>
+      <relation target="" sidePair="width-width,height-height"/>
+    </graph>
+    <graph id="n1_jdju" name="n1" xy="0,0" size="100,100" touchable="false" type="rect" lineSize="0" fillColor="#fffafafa">
+      <gearDisplay controller="button" pages="2"/>
+      <relation target="" sidePair="width-width,height-height"/>
+    </graph>
+    <graph id="n2_jdju" name="n2" xy="0,0" size="100,100" touchable="false" type="rect" lineSize="0" fillColor="#ffcccccc">
+      <gearDisplay controller="button" pages="1,3"/>
+      <relation target="" sidePair="width-width,height-height"/>
+    </graph>
+  </displayList>
+  <Button/>
+</component>

+ 9 - 0
FGUIProject/assets/Friend/package.xml

@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="utf-8"?>
+<packageDescription id="wez2ujnn">
+  <resources>
+    <component id="jdju0" name="FriendUI.xml" path="/" exported="true"/>
+    <component id="jdju1" name="Button1.xml" path="/components/"/>
+    <component id="jdju2" name="FriendAddUI.xml" path="/" exported="true"/>
+  </resources>
+  <publish name="" path="..\GameClient\Assets\ResIn\UI\Friend" packageCount="2" genCode="true"/>
+</packageDescription>

+ 7 - 0
GameClient/Assets/Game/HotUpdate/Data/FriendDataManager.cs

@@ -0,0 +1,7 @@
+namespace GFGGame
+{
+    public class FriendDataManager : SingletonBase<FriendDataManager>
+    {
+
+    }
+}

+ 11 - 0
GameClient/Assets/Game/HotUpdate/Data/FriendDataManager.cs.meta

@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 461322fbbf493fa4f960b73268bacd4b
+MonoImporter:
+  externalObjects: {}
+  serializedVersion: 2
+  defaultReferences: []
+  executionOrder: 0
+  icon: {instanceID: 0}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

+ 8 - 0
GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/Friend.meta

@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: 569efbfc140aa5b4786f7ef20fdf0d4f
+folderAsset: yes
+DefaultImporter:
+  externalObjects: {}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

+ 71 - 0
GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/Friend/UI_FriendUI.cs

@@ -0,0 +1,71 @@
+/** This is an automatically generated class by FairyGUI. Please do not modify it. **/
+
+using FairyGUI;
+
+namespace UI.Friend
+{
+    public partial class UI_FriendUI
+    {
+        public GComponent target;
+        public GButton m_btnBack;
+        public const string URL = "ui://wez2ujnnjdju0";
+        public const string PACKAGE_NAME = "Friend";
+        public const string RES_NAME = "FriendUI";
+        private static UI_FriendUI _proxy;
+
+        public static UI_FriendUI Create(GObject gObject = null)
+        {
+            var ui = new UI_FriendUI();
+            if(gObject == null)
+            	ui.target =  (GComponent)UIPackage.CreateObject(PACKAGE_NAME, RES_NAME);
+            else
+            	ui.target =  (GComponent)gObject;
+            ui.Init(ui.target);
+            return ui;
+        }
+
+        public static UI_FriendUI Proxy(GObject gObject = null)
+        {
+            if(_proxy == null)
+            {
+                _proxy = new UI_FriendUI();
+            }
+            var ui = _proxy;
+            if(gObject == null)
+            	ui.target =  (GComponent)UIPackage.CreateObject(PACKAGE_NAME, RES_NAME);
+            else
+            	ui.target =  (GComponent)gObject;
+            ui.Init(ui.target);
+            return ui;
+        }
+
+        public static void ProxyEnd()
+        {
+            if (_proxy != null)
+            {
+                _proxy.Dispose();
+            }
+        }
+
+        public static void ClearProxy()
+        {
+            ProxyEnd();
+            _proxy = null;
+        }
+
+        private void Init(GComponent comp)
+        {
+            m_btnBack = (GButton)comp.GetChild("btnBack");
+        }
+        public void Dispose(bool disposeTarget = false)
+        {
+            m_btnBack = null;
+            if(disposeTarget && target != null)
+            {
+                target.RemoveFromParent();
+                target.Dispose();
+            }
+            target = null;
+        }
+    }
+}

+ 11 - 0
GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/Friend/UI_FriendUI.cs.meta

@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 87360f64bffdd2d45b6242f305993d8f
+MonoImporter:
+  externalObjects: {}
+  serializedVersion: 2
+  defaultReferences: []
+  executionOrder: 0
+  icon: {instanceID: 0}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

+ 25 - 0
GameClient/Assets/Game/HotUpdate/ServerProxy/FriendSProxy.cs

@@ -0,0 +1,25 @@
+using System.Collections.Generic;
+using ET;
+using GFGGame;
+
+
+namespace GFGGame
+{
+    public static class FriendSProxy
+    {
+        public static async ETTask<bool> ClothingDecompose(List<int> itemIds, List<int> itemNums)
+        {
+            M2C_ClothingDecompose response = null;
+            response = (M2C_ClothingDecompose)await MessageHelper.SendToServer(new C2M_ClothingDecompose() { itemIds = itemIds, itemNums = itemNums });
+            if (response != null)
+            {
+                if (response.Error == ErrorCode.ERR_Success)
+                {
+                    BonusController.TryShowBonusList(ItemUtil.CreateItemDataList(response.bonusList));
+                    return true;
+                }
+            }
+            return false;
+        }
+    }
+}

+ 11 - 0
GameClient/Assets/Game/HotUpdate/ServerProxy/FriendSProxy.cs.meta

@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: fa9036d75a569174f8a0f20b825e06cb
+MonoImporter:
+  externalObjects: {}
+  serializedVersion: 2
+  defaultReferences: []
+  executionOrder: 0
+  icon: {instanceID: 0}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

+ 8 - 0
GameClient/Assets/Game/HotUpdate/Views/Friend.meta

@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: 8b6db34311359ed46961a7be5a4d9e4d
+folderAsset: yes
+DefaultImporter:
+  externalObjects: {}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

+ 63 - 0
GameClient/Assets/Game/HotUpdate/Views/Friend/FriendView.cs

@@ -0,0 +1,63 @@
+using UnityEngine;
+using FairyGUI;
+using UI.Friend;
+
+namespace GFGGame
+{
+    public class FriendView : BaseView
+    {
+        private UI_FriendUI _ui;
+
+        private GameObject _scenePrefab;
+        private GameObject _sceneObject;
+
+        public override void Dispose()
+        {
+            if (_scenePrefab != null)
+            {
+                GameObject.Destroy(_scenePrefab);
+                _scenePrefab = null;
+            }
+
+            base.Dispose();
+        }
+
+        protected override void Init()
+        {
+            base.Init();
+            packageName = UI_FriendUI.PACKAGE_NAME;
+            _ui = UI_FriendUI.Create();
+            viewCom = _ui.target;
+            isfullScreen = true;
+            _scenePrefab = GFGAsset.Load<GameObject>(ResPathUtil.GetPrefabPath("SceneFriend"));
+        }
+
+        protected override void OnInit()
+        {
+            base.OnInit();
+            _ui.m_btnBack.onClick.Add(OnHide);
+        }
+
+        protected override void OnShown()
+        {
+            base.OnShown();
+            if (_sceneObject == null)
+            {
+                _sceneObject = GameObject.Instantiate(_scenePrefab);
+                EquipDataCache.cacher.setSceneObj(_sceneObject);
+            }
+            EquipDataCache.cacher.PutOnCurrentSuitSaved();
+
+        }
+
+        protected override void OnHide()
+        {
+            if (_sceneObject != null)
+            {
+                GameObject.Destroy(_sceneObject);
+                _sceneObject = null;
+            }
+            ViewManager.GoBackFrom(typeof(FriendView).Name);
+        }
+    }
+}

+ 11 - 0
GameClient/Assets/Game/HotUpdate/Views/Friend/FriendView.cs.meta

@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 088321a2bc67ca547b68f9f10a4db5d3
+MonoImporter:
+  externalObjects: {}
+  serializedVersion: 2
+  defaultReferences: []
+  executionOrder: 0
+  icon: {instanceID: 0}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

+ 6 - 1
GameClient/Assets/Game/HotUpdate/Views/MainUI/MainUIView.cs

@@ -97,7 +97,7 @@ namespace GFGGame
             _btnJInShu = _ui.m_list.GetChild("btnJInShu").asButton;
 
             _btnGongGao.visible = false;
-            _btnHaoYou.visible = false;
+            // _btnHaoYou.visible = false;
             _btnRenWu.visible = false;
             _btnPengYouQuan.visible = false;
             _btnJInShu.visible = false;
@@ -114,6 +114,7 @@ namespace GFGGame
             _btnStore.onClick.Add(OnClickBtnStore);
             _btnTuJian.onClick.Add(OnClickBtnTuJian);
             _btnYouJian.onClick.Add(OnClickBtnYouJian);
+            _btnHaoYou.onClick.Add(OnClickBtnHaoYou);
 
 
             AddEffect();
@@ -269,6 +270,10 @@ namespace GFGGame
         {
             ViewManager.Show<MailView>();
         }
+        private void OnClickBtnHaoYou()
+        {
+            ViewManager.Show<FriendView>(null, new object[] { ViewName.MAINUI_VIEW, this.viewData }, true);
+        }
         private void OnClickHeadBar()
         {
             ViewManager.Show(ViewName.ROLE_INFO_VIEW);

+ 8 - 0
GameClient/Assets/ResIn/UI/Friend.meta

@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: 4c307ffbe1ae9c74db6261a301776b96
+folderAsset: yes
+DefaultImporter:
+  externalObjects: {}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

BIN
GameClient/Assets/ResIn/UI/Friend/Friend_fui.bytes


+ 7 - 0
GameClient/Assets/ResIn/UI/Friend/Friend_fui.bytes.meta

@@ -0,0 +1,7 @@
+fileFormatVersion: 2
+guid: cc831997ac1bc324691d95824d16611d
+TextScriptImporter:
+  externalObjects: {}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: