Sfoglia il codice sorgente

add the menu and half of shopview

Jidongchen 3 anni fa
parent
commit
7e08370abc

BIN
Assets/GameMain/DataTables/UIForm.txt


+ 11 - 0
Assets/GameMain/Scripts/UI/UICustom.cs

@@ -168,6 +168,7 @@ namespace MetaClient
             {
                 return;
             }
+
             isTween = true;
             leftView.transform.DOLocalMoveX(tween_leftMin, tweenTime).SetEase(Ease.InOutBack).OnComplete(()=> {
                 //whitebg.SetActive(bg);
@@ -301,6 +302,10 @@ namespace MetaClient
             {
                 case 0:
                     Debug.Log("返回上一层");
+                    //GameEntry.UI.CloseUIForm(104);
+                    
+                    GameEntry.UI.OpenUIForm(UIFormId.GameMenuForm);
+                   // Close();
                     break;
                 case 1:
                     Debug.Log("返回选择捏脸/身体/服装");
@@ -329,6 +334,12 @@ namespace MetaClient
             {
                 return;
             }
+            //if (histroy.Count == 0)
+            //{
+            //    GameEntry.UI.OpenUIForm(UIFormId.GameMenuForm);
+            //    Close();
+            //    return;
+            //}
             isTween = true;
             leftView.transform.DOLocalMoveX(tween_leftMin, tweenTime).SetEase(Ease.InOutBack).OnComplete(() => {
                 //whitebg.SetActive(bg);

+ 7 - 4
Assets/GameMain/Scripts/UI/UIFormId.cs

@@ -39,11 +39,14 @@ namespace MetaClient
         /// </summary>
         CustomRoleForm = 103,
 
+        CustomRole=104,
         /// <summary>
-        /// 自定义角色。
+        /// 主界面
         /// </summary>
-        FinchFace = 104,
-
-        CustomRole=105,
+        GameMenuForm = 105,
+        /// <summary>
+        /// 商城
+        /// </summary>
+        ShopForm=106,
     }
 }

+ 94 - 0
Assets/GameMain/Scripts/UI/UIGameMenuForm.cs

@@ -0,0 +1,94 @@
+using System.Collections;
+using System.Collections.Generic;
+using UnityEngine;
+using UnityEngine.UI;
+namespace MetaClient
+{
+    public class UIGameMenuForm : UGuiForm
+    {
+        // Start is called before the first frame update
+
+        [Header("金币数量")]
+        public Text coinMoneyText;
+        [Header("砖石数量")]
+        public Text diamondMoneyText;
+        [Header("人物icon")]
+        public Image roleIcon;
+
+
+
+        protected override void OnOpen(object userData)
+        {
+            base.OnOpen(userData);
+            Refesh();
+
+        }
+        protected override void OnClose(bool isShutdown, object userData)
+        {
+            base.OnClose(isShutdown, userData);
+        }
+        /// <summary>
+        /// 金币数量,钻石数量,人物icon刷新
+        /// </summary>
+
+        public void Refesh()
+        {
+            //roleIcon.sprite=
+            coinMoneyText.text = 1000 + "";
+            diamondMoneyText.text = 10 + "";
+        }
+        public void AddCoinMoneyFun() {
+        
+        }
+        public void AddDiamondMoneyfun()
+        { 
+
+        }
+        public void RoleIconChangeFun()
+        { 
+        }
+        ///// <summary>
+        ///// 切换界面
+        ///// </summary>
+        //public void OpenViewUIFormId(UIFormId uIFormId) {
+        //    GameEntry.UI.OpenUIForm(uIFormId);
+        //}
+        /// <summary>
+        /// 打开元宇宙界面
+        /// </summary>
+        public void OpenYUniverseView()
+        {
+            //GameEntry.UI.OpenUIForm();
+        }
+        /// <summary>
+        /// 打开创作界面
+        /// </summary>
+        public void OpenCreateView()
+        {
+            //GameEntry.UI.OpenUIForm();
+        }
+        /// <summary>
+        /// 打开创作界面
+        /// </summary>
+        public void OpenCameraView()
+        {
+            //GameEntry.UI.OpenUIForm();
+        }
+        /// <summary>
+        /// 打开捏脸界面
+        /// </summary>
+        public void OpenBehaviorView()
+        {
+            Debug.Log("打开捏脸界面");
+            Close();
+           // GameEntry.UI.OpenUIForm(UIFormId.CustomRole);
+            
+        }
+        public void OpenShopView()
+        {
+            GameEntry.UI.OpenUIForm(UIFormId.CustomRole);
+        }
+
+
+    }
+}

+ 11 - 0
Assets/GameMain/Scripts/UI/UIGameMenuForm.cs.meta

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

+ 26 - 0
Assets/GameMain/Scripts/UI/UIShopForm.cs

@@ -0,0 +1,26 @@
+using System.Collections;
+using System.Collections.Generic;
+using UnityEngine;
+namespace MetaClient
+{
+
+    public class UIShopForm : UGuiForm
+    {
+        // Start is called before the first frame update
+
+
+        public void CloseUiShopFun()
+        {
+            this.Close();
+        }
+        protected override void OnOpen(object userData)
+        {
+
+            base.OnOpen(userData);
+        }
+        protected override void OnClose(bool isShutdown, object userData)
+        {
+            base.OnClose(isShutdown, userData);
+        }
+    }
+}

+ 11 - 0
Assets/GameMain/Scripts/UI/UIShopForm.cs.meta

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

File diff suppressed because it is too large
+ 1104 - 169
Assets/GameMain/UI/UIForms/GameMenuForm.prefab


File diff suppressed because it is too large
+ 8579 - 0
Assets/GameMain/UI/UIForms/ShopForm.prefab


+ 8 - 0
Assets/GameMain/UI/UIForms/ShopForm.prefab.meta

@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: 45785b616a61b2b4083e30cda015aaff
+timeCreated: 1528026169
+licenseType: Pro
+NativeFormatImporter:
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

BIN
Assets/GameMain/UI/UISprites/GameMenu/allPic/主.jpg


+ 128 - 0
Assets/GameMain/UI/UISprites/GameMenu/allPic/主.jpg.meta

@@ -0,0 +1,128 @@
+fileFormatVersion: 2
+guid: 28c26530a0227c6429727030c8ef067d
+TextureImporter:
+  internalIDToNameTable: []
+  externalObjects: {}
+  serializedVersion: 11
+  mipmaps:
+    mipMapMode: 0
+    enableMipMap: 0
+    sRGBTexture: 1
+    linearTexture: 0
+    fadeOut: 0
+    borderMipMap: 0
+    mipMapsPreserveCoverage: 0
+    alphaTestReferenceValue: 0.5
+    mipMapFadeDistanceStart: 1
+    mipMapFadeDistanceEnd: 3
+  bumpmap:
+    convertToNormalMap: 0
+    externalNormalMap: 0
+    heightScale: 0.25
+    normalMapFilter: 0
+  isReadable: 0
+  streamingMipmaps: 0
+  streamingMipmapsPriority: 0
+  grayScaleToAlpha: 0
+  generateCubemap: 6
+  cubemapConvolution: 0
+  seamlessCubemap: 0
+  textureFormat: 1
+  maxTextureSize: 2048
+  textureSettings:
+    serializedVersion: 2
+    filterMode: 1
+    aniso: 1
+    mipBias: 0
+    wrapU: 1
+    wrapV: 1
+    wrapW: 0
+  nPOTScale: 0
+  lightmap: 0
+  compressionQuality: 50
+  spriteMode: 1
+  spriteExtrude: 1
+  spriteMeshType: 1
+  alignment: 0
+  spritePivot: {x: 0.5, y: 0.5}
+  spritePixelsToUnits: 100
+  spriteBorder: {x: 0, y: 0, z: 0, w: 0}
+  spriteGenerateFallbackPhysicsShape: 1
+  alphaUsage: 1
+  alphaIsTransparency: 1
+  spriteTessellationDetail: -1
+  textureType: 8
+  textureShape: 1
+  singleChannelComponent: 0
+  maxTextureSizeSet: 0
+  compressionQualitySet: 0
+  textureFormatSet: 0
+  applyGammaDecoding: 0
+  platformSettings:
+  - serializedVersion: 3
+    buildTarget: DefaultTexturePlatform
+    maxTextureSize: 2048
+    resizeAlgorithm: 0
+    textureFormat: -1
+    textureCompression: 1
+    compressionQuality: 50
+    crunchedCompression: 0
+    allowsAlphaSplitting: 0
+    overridden: 0
+    androidETC2FallbackOverride: 0
+    forceMaximumCompressionQuality_BC6H_BC7: 0
+  - serializedVersion: 3
+    buildTarget: Standalone
+    maxTextureSize: 2048
+    resizeAlgorithm: 0
+    textureFormat: -1
+    textureCompression: 1
+    compressionQuality: 50
+    crunchedCompression: 0
+    allowsAlphaSplitting: 0
+    overridden: 0
+    androidETC2FallbackOverride: 0
+    forceMaximumCompressionQuality_BC6H_BC7: 0
+  - serializedVersion: 3
+    buildTarget: iPhone
+    maxTextureSize: 2048
+    resizeAlgorithm: 0
+    textureFormat: -1
+    textureCompression: 1
+    compressionQuality: 50
+    crunchedCompression: 0
+    allowsAlphaSplitting: 0
+    overridden: 0
+    androidETC2FallbackOverride: 0
+    forceMaximumCompressionQuality_BC6H_BC7: 0
+  - serializedVersion: 3
+    buildTarget: Android
+    maxTextureSize: 2048
+    resizeAlgorithm: 0
+    textureFormat: -1
+    textureCompression: 1
+    compressionQuality: 50
+    crunchedCompression: 0
+    allowsAlphaSplitting: 0
+    overridden: 0
+    androidETC2FallbackOverride: 0
+    forceMaximumCompressionQuality_BC6H_BC7: 0
+  spriteSheet:
+    serializedVersion: 2
+    sprites: []
+    outline: []
+    physicsShape: []
+    bones: []
+    spriteID: 5e97eb03825dee720800000000000000
+    internalID: 0
+    vertices: []
+    indices: 
+    edges: []
+    weights: []
+    secondaryTextures: []
+  spritePackingTag: 
+  pSDRemoveMatte: 0
+  pSDShowRemoveMatteOption: 0
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

+ 8 - 0
Assets/GameMain/UI/UISprites/Shop.meta

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