Browse Source

6/8更新

2025/6/7	添加飞盘场景,客户端提交游戏结果功能,待后端开发完成后验证。
添加当狗饱腹度和口渴度超过90后直接走开的动画
2025/6/8	优化创建狗的页面,增加狗的简介显示
Jees 6 hours ago
parent
commit
aa60a4721b

+ 5 - 4
Assets/Scenes/Login/InitDogUI.uxml

@@ -3,12 +3,13 @@
     <Style src="project://database/Assets/UI%20Toolkit/Style/rootStyle.uss?fileID=7433441132597879392&amp;guid=b30eb17a0ca8bf64087af4e59d565fdd&amp;type=3#rootStyle" />
     <ui:VisualElement name="root" class="rootStyle" style="background-image: none;">
         <ui:VisualElement name="VisualElement" style="flex-grow: initial; background-color: rgba(253, 251, 251, 0.63); border-top-left-radius: 15px; border-top-right-radius: 15px; border-bottom-right-radius: 15px; border-bottom-left-radius: 15px;">
-            <ui:TextField label="Dog name:" max-length="16" hide-placeholder-on-focus="false" name="name" class="TextField textField" style="-unity-text-align: middle-left; -unity-font-definition: url(&quot;project://database/Assets/Font/MaoKenZhuYuanTi-MaokenZhuyuanTi-2.ttf?fileID=12800000&amp;guid=50a63638b44907e46a3fa871d63b7d39&amp;type=3#MaoKenZhuYuanTi-MaokenZhuyuanTi-2&quot;);" />
             <ui:DropdownField label="Breed" name="breed" class="dropdownField" />
             <ui:DropdownField label="Sex" name="sex" choices="Male,Female" class="dropdownField" />
-            <ui:VisualElement style="flex-grow: 1; flex-direction: row; justify-content: space-between;">
-                <ui:VisualElement name="VisualElement" style="flex-grow: initial; background-image: url(&quot;project://database/Assets/Packages/2D%20Casual%20UI/Sprite/GUI.png?fileID=21300042&amp;guid=1eaee135ce037439d925cee5e41ce026&amp;type=3#GUI_21&quot;); width: 30px; height: 30px; flex-shrink: initial; max-width: 100%; max-height: 100%; margin-left: 49px; margin-bottom: 2px;" />
-                <ui:Label name="price" style="margin-right: 120px;" />
+            <ui:TextField label="Dog name:" max-length="16" hide-placeholder-on-focus="false" name="name" class="TextField textField" style="-unity-text-align: middle-left; -unity-font-definition: url(&quot;project://database/Assets/Font/MaoKenZhuYuanTi-MaokenZhuyuanTi-2.ttf?fileID=12800000&amp;guid=50a63638b44907e46a3fa871d63b7d39&amp;type=3#MaoKenZhuYuanTi-MaokenZhuyuanTi-2&quot;);" />
+            <ui:Label text="&lt;basic introduction of the dog.&gt;&lt;basic introduction of the dog.&gt;" name="description" style="font-size: 11px; -unity-font-definition: url(&quot;project://database/Assets/Font/MaoKenZhuYuanTi-MaokenZhuyuanTi-2.ttf?fileID=12800000&amp;guid=50a63638b44907e46a3fa871d63b7d39&amp;type=3#MaoKenZhuYuanTi-MaokenZhuyuanTi-2&quot;); visibility: visible; display: none; white-space: normal;" />
+            <ui:VisualElement name="priceArea" style="flex-grow: 1; flex-direction: row; justify-content: space-between; display: none;">
+                <ui:VisualElement name="coinPic" style="flex-grow: initial; background-image: url(&quot;project://database/Assets/Packages/2D%20Casual%20UI/Sprite/GUI.png?fileID=21300042&amp;guid=1eaee135ce037439d925cee5e41ce026&amp;type=3#GUI_21&quot;); width: 30px; height: 30px; flex-shrink: initial; max-width: 100%; max-height: 100%; margin-left: 49px; margin-bottom: 2px;" />
+                <ui:Label name="price" text="???" style="margin-right: 120px; -unity-font-definition: url(&quot;project://database/Assets/Font/MaoKenZhuYuanTi-MaokenZhuyuanTi-2.ttf?fileID=12800000&amp;guid=50a63638b44907e46a3fa871d63b7d39&amp;type=3#MaoKenZhuYuanTi-MaokenZhuyuanTi-2&quot;);" />
             </ui:VisualElement>
             <ui:Label text="* error message&#10;* message 2" name="error_msg" class="err_msg" style="border-top-left-radius: 0; border-top-right-radius: 0; border-bottom-right-radius: 0; border-bottom-left-radius: 0; display: none;" />
         </ui:VisualElement>

+ 0 - 0
Assets/Scenes/Login_Profiles/V Cam Login Profile.asset → Assets/Scenes/Login/V Cam Login Profile.asset


+ 0 - 0
Assets/Scenes/Login_Profiles/V Cam Login Profile.asset.meta → Assets/Scenes/Login/V Cam Login Profile.asset.meta


+ 0 - 8
Assets/Scenes/Login_Profiles.meta

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

+ 1 - 1
Assets/Scenes/Playground.unity

@@ -1926,7 +1926,7 @@ PrefabInstance:
       objectReference: {fileID: 0}
     - target: {fileID: 2417705292335416526, guid: 7b8797bfcbfe3f549ba74d2a9250e660, type: 3}
       propertyPath: m_IsActive
-      value: 1
+      value: 0
       objectReference: {fileID: 0}
     - target: {fileID: 2750614306868268629, guid: 7b8797bfcbfe3f549ba74d2a9250e660, type: 3}
       propertyPath: 'm_Materials.Array.data[0]'

+ 40 - 56
Assets/Scripts/Home/DogInScene.cs

@@ -22,6 +22,8 @@ public class DogInScene //: ScriptableObject
     public DateTime drinkStartTime, eatStartTime;      // 记录吃喝开始时间
     public bool itemConsumeProgress = false;     // 是否在吃和喝的进程中。如果是的话,跳过常规动画检测
     public bool isMovingToBowl;
+    private float shortIntakeTime = 0.5f;      // 喝水和吃饭的短时间间隔,单位秒。当宠物吃饱喝足时候调用。
+    private float longIntakeTime = 10f;       // 喝水和吃饭的长时间间隔,单位秒。当宠物没有吃饱喝足时候调用。
 
 
 
@@ -481,43 +483,34 @@ public class DogInScene //: ScriptableObject
         HomeController.dogCam.Priority = 10;
         HomeController.playerCam.Priority = 1;
 
-        while (ts.TotalSeconds < 10)
+        float intakeTime;
+        if (dogProperty.thirsty >= 90)
+        {
+            intakeTime = shortIntakeTime;      // 如果狗口渴程度大于90,喝水时间为短时间
+        }
+        else
+        {
+            intakeTime = longIntakeTime;       // 否则喝水时间为长时间
+        }
+        while (ts.TotalSeconds < intakeTime)
         {
             yield return new WaitForSeconds(0.25f);
             ts = DateTime.Now - this.drinkStartTime;
             //Debug.Log("结束饮水过程:" + ts.TotalSeconds);
 
-            // 狗一致看向谁碰,确保就算被撞击后依然看向水盆
+            // 狗一致看向碗,确保就算被撞击后依然看向碗
             this.gameObject.transform.LookAt(targetBowl.transform.position);
         }
-        // 播放10秒后结束饮水过程
-        this.animator.SetBool("isDrinking", false);
-
-        // 摄像头恢复玩家视角
-        HomeController.dogCam.Priority = 1;
-        HomeController.playerCam.Priority = 10;
-
-        // 让水物消失
-        var water = GameObject.Find("Water");
-        water.transform.localPosition = new Vector3(-1, -10, -1);
-
-        //var water = GameObject.Find("Water");
-        //water.SetActive(false);
+               // 结束吃狗粮动画
+        this.animator.SetBool("isEating", false);
+        itemConsumeProgress = false;      // 关闭整个道具使用的进程
+        dogState = DogState.IDLE;
+        QuitItemConsume();
 
-        // 再等待几秒后让水盆消失
-        while (ts.TotalSeconds < 18)
+        if (!HomeController.Instance.isHideBowlRunning)
         {
-            yield return new WaitForSeconds(0.25f);
-            ts = DateTime.Now - this.drinkStartTime;
-            //Debug.Log("让水盆消失:" + ts.TotalSeconds);
+            HomeController.Instance.StartCoroutine(HomeController.Instance.HideBowlAfterItemConsume(ItemGroup.WATER));       // 启动碗隐藏的协程
         }
-
-        targetBowl.transform.position = new Vector3(-1, -10, -1);       // 将喝水碗回归原位
-        water.transform.localPosition = Vector3.zero;       // 将食物回归原位
-        this.itemConsumeProgress = false;      // 关闭整个道具使用的进程
-        //this.dogState = "idle";
-        this.dogState = DogState.IDLE;
-        QuitItemConsume();
     }
 
     public IEnumerator EatAnimation()
@@ -532,49 +525,40 @@ public class DogInScene //: ScriptableObject
         HomeController.dogCam.Priority = 10;
         HomeController.playerCam.Priority = 1;
 
-        while (ts.TotalSeconds < 10)
+        float intakeTime;
+        if (dogProperty.satiety >= 90)
+        {
+            intakeTime = shortIntakeTime;      // 如果狗饱腹程度大于90,喝水时间为短时间
+        }
+        else
+        {
+            intakeTime = longIntakeTime;       // 否则喝水时间为长时间
+        }
+        while (ts.TotalSeconds < intakeTime)
         {
             yield return new WaitForSeconds(0.25f);
             ts = DateTime.Now - this.eatStartTime;
 
-            // 狗一致看向谁碰,确保就算被撞击后依然看向水盆
+            // 狗一致看向碗,确保就算被撞击后依然看向碗
             this.gameObject.transform.LookAt(targetBowl.transform.position);
         }
-        // 播放10秒后结束吃狗粮过程
+        // 结束吃狗粮动画
         this.animator.SetBool("isEating", false);
-        //Debug.Log(this.dogProperty.dog_name + "狗吃完了");
-        // 摄像头恢复玩家视角
-        HomeController.dogCam.Priority = 1;
-        HomeController.playerCam.Priority = 10;
-
-        // 让食物消失
-        var food = GameObject.Find("Food");
-        food.transform.localPosition = new Vector3(-1, -10, -1);
-        //var water = GameObject.Find("Water");
-        //water.SetActive(false);
+        itemConsumeProgress = false;      // 关闭整个道具使用的进程
+        dogState = DogState.IDLE;
+        QuitItemConsume();
 
-        // 再等待几秒后让饭盆消失
-        while (ts.TotalSeconds < 18)
+        if (!HomeController.Instance.isHideBowlRunning)
         {
-            yield return new WaitForSeconds(0.25f);
-            ts = DateTime.Now - this.eatStartTime;
-            //Debug.Log("让水盆消失:" + ts.TotalSeconds);
+            HomeController.Instance.StartCoroutine(HomeController.Instance.HideBowlAfterItemConsume(ItemGroup.FOOD));       // 启动碗隐藏的协程
         }
-        //Debug.Log(this.dogProperty.dog_name + "把碗放回去了");
-        targetBowl.transform.position = new Vector3(-1, -10, -1);       // 将饭盆回归原位
-        food.transform.localPosition = Vector3.zero;       // 将食物回归原位
-        this.itemConsumeProgress = false;      // 关闭整个道具使用的进程
-        //this.dogState = "idle";
-        this.dogState = DogState.IDLE;
-        QuitItemConsume();
-
     }
 
     public void QuitItemConsume()
     {
-        var uiPlaceholder = GameObject.Find("UI Placeholder");
-        var vamUI = uiPlaceholder.transform.Find("VoiceAndMenu").gameObject;
-        vamUI.SetActive(true);
+        // var uiPlaceholder = GameObject.Find("UI Placeholder");
+        // var vamUI = uiPlaceholder.transform.Find("VoiceAndMenu").gameObject;
+        // vamUI.SetActive(true);
         BoxCollider boxCollider = gameObject.GetComponent<BoxCollider>();       // 喝水吃饭场景关闭isTrigger
         boxCollider.isTrigger = true;
         this.moveSpeed = UnityEngine.Random.Range(0.3f, 0.6f);

+ 59 - 4
Assets/Scripts/Home/HomeController.cs

@@ -45,6 +45,7 @@ public class HomeController : MonoBehaviour
     private bool isTrainingMsgShowed_1 = false;        // 第一条是否已经显示训练提示
     private bool isTrainingMsgShowed_2 = false;        // 第二条是否已经显示训练提示
     private bool isTrainingAnimationPlayed = false;        // 训练动画是否已经播放
+    public bool isHideBowlRunning = false;        // 是否正在运行隐藏碗的协程
 
     private void Awake()
     {
@@ -131,7 +132,7 @@ public class HomeController : MonoBehaviour
                     {
                         trainingContent = "voiceCall";
                     }
-                    
+
                     if (trainingContent != String.Empty)
                     {
                         sceneMode = SceneMode.TRAINING;
@@ -456,7 +457,7 @@ public class HomeController : MonoBehaviour
         //yield return null;
     }
 
-    
+
 
     #region 语音控制区
     // 用户语音呼唤上传,Voice call指令用于呼唤所有的狗,得分最高的过来进入交互模式
@@ -641,7 +642,7 @@ public class HomeController : MonoBehaviour
                     if (Array.IndexOf(noStatusCommand, animationTrigger) < 0)
                     {
                         animator.SetBool(animationBool, true);
-                        Debug.Log(animationBool+"status is"+animator.GetBool(animationBool));
+                        Debug.Log(animationBool + "status is" + animator.GetBool(animationBool));
                     }
                     else
                     {
@@ -959,7 +960,7 @@ public class HomeController : MonoBehaviour
     // 设置所有狗is trigger属性
     public void SetDogsIsTrigger(bool triggerSetting)
     {
-        foreach ( var dog in dogsInScene)
+        foreach (var dog in dogsInScene)
         {
             BoxCollider boxCollider = dog.gameObject.GetComponent<BoxCollider>();
             if (boxCollider != null)
@@ -969,6 +970,60 @@ public class HomeController : MonoBehaviour
         }
     }
     #endregion
+
+    #region 道具使用控制
+    public IEnumerator HideBowlAfterItemConsume(ItemGroup type)
+    {
+        isHideBowlRunning = true; // 设置为正在运行状态
+
+        string inTheBowl;
+        string bowlName;
+        if (type == ItemGroup.FOOD)
+        {
+            inTheBowl = "Food";
+            bowlName = "Bowl_food";
+        }
+        else if (type == ItemGroup.WATER)
+        {
+            inTheBowl = "Water";
+            bowlName = "Bowl_water";
+        }
+        else
+        {
+            yield break; // 如果类型不匹配,直接返回
+        }
+        bool allDogsDone = false;
+        while (!allDogsDone)
+        {
+            allDogsDone = true; // 假设所有狗都完成了
+            foreach (var dog in dogsInScene)
+            {
+                if (dog.dogState == DogState.ITEM_CONSUME)
+                {
+                    allDogsDone = false; // 如果有狗还在消耗状态,则设置为false
+                    break;
+                }
+            }
+            yield return new WaitForSeconds(0.5f); // 每0.5秒检查一次
+        }
+
+        var food = GameObject.Find(inTheBowl);
+        var targetBowl = GameObject.Find(bowlName);
+        food.transform.localPosition = new Vector3(-1, -10, -1);
+        yield return new WaitForSeconds(2f); // 暂停2秒
+        targetBowl.transform.position = new Vector3(-1, -10, -1);       // 将饭盆回归原位
+        food.transform.localPosition = Vector3.zero;       // 将食物回归原位
+
+        // 重制摄像头和菜单
+        HomeController.dogCam.Priority = 1;
+        HomeController.playerCam.Priority = 10;
+        var uiPlaceholder = GameObject.Find("UI Placeholder");
+        var vamUI = uiPlaceholder.transform.Find("VoiceAndMenu").gameObject;
+        vamUI.SetActive(true);
+
+        isHideBowlRunning = false; // 设置为不在运行状态
+    }
+    #endregion
 }
 
 public enum ItemGroup

+ 1 - 1
Assets/Scripts/Login/CreateOrAdopt.cs

@@ -23,7 +23,7 @@ public class CreateOrAdopt : MonoBehaviour
     private bool isScanning = false; // 是否正在扫描
     private float interval = 0.5f; // 扫描间隔
     // Start is called once before the first execution of Update after the MonoBehaviour is created
-    void Start()
+    void OnEnable()
     {
         var root = GetComponent<UIDocument>().rootVisualElement;
         messageLabel = root.Q<Label>("message");

+ 26 - 8
Assets/Scripts/Login/InitDogUIController.cs

@@ -15,7 +15,8 @@ using UnityEngine.UIElements;
 public class InitDogUIController : MonoBehaviour
 {
     private TextField dogNameTextField;
-    private Label priceLabel;
+    private Label priceLabel, descriptionLabel;
+    private VisualElement priceArea;
     private Label leftArrow, rightArrow;
     private DropdownField breedDropdownField, sexDropdownField;
     private Button confirmBtn, cancelBtn;
@@ -26,7 +27,7 @@ public class InitDogUIController : MonoBehaviour
 
     private string displayDogName = "createdDog";
     // Start is called once before the first execution of Update after the MonoBehaviour is created
-    void Start()
+    void OnEnable()
     {
         // 检测狗的数量如果达到最大数量就停止创建
         if (UserProperty.dogs.Count >= EnviromentSetting.maxDogQty)
@@ -44,6 +45,8 @@ public class InitDogUIController : MonoBehaviour
         leftArrow = root.Q<Label>("leftArrow");
         rightArrow = root.Q<Label>("rightArrow");
         priceLabel = root.Q<Label>("price");
+        descriptionLabel = root.Q<Label>("description");
+        priceArea = root.Q<VisualElement>("priceArea");
 
         InitSetting();
         cancelBtn.clicked += CancelClick;
@@ -64,12 +67,7 @@ public class InitDogUIController : MonoBehaviour
     // 绑定breed下拉框更新,读取相对应的狗的数据
     void OnBreedChanged(ChangeEvent<string> evt)
     {
-        // 清理已经显示的狗
-        GameObject existDog = GameObject.Find(displayDogName);
-        if (existDog != null)
-        {
-            Destroy(existDog);
-        }
+        DestoryExistingDog();
 
         dogBreed = EnviromentSetting.dogBreeds[breedDropdownField.index];
         priceLabel.text = dogBreed.cost.ToString();
@@ -101,6 +99,23 @@ public class InitDogUIController : MonoBehaviour
 
         DogAnimationLoad();
 
+        // 检测description是否被激活,如果隐藏,先显示
+        if (descriptionLabel.resolvedStyle.display == DisplayStyle.None)
+        {
+            descriptionLabel.style.display = DisplayStyle.Flex;
+        }
+        // 设置description的内容
+        descriptionLabel.text = dogBreed.description[EnviromentSetting.languageCode];
+    }
+
+    // 清理已经显示的狗
+    private void DestoryExistingDog()
+    {
+        GameObject existingDog = GameObject.Find(displayDogName);
+        if (existingDog != null)
+        {
+            Destroy(existingDog);
+        }
     }
 
     void RightArrowClicked(ClickEvent e)
@@ -255,6 +270,7 @@ public class InitDogUIController : MonoBehaviour
     // 绑定取消按键
     void CancelClick()
     {
+        DestoryExistingDog();
         var regCanvas = GameObject.Find("Init Dog Canvas");
         regCanvas.SetActive(false);
         var canvasPlaceholder = GameObject.Find("Canvas Placeholder");
@@ -285,11 +301,13 @@ public class InitDogUIController : MonoBehaviour
         if (UserProperty.dogs.Count >= 1)
         {
             cancelBtn.style.display = DisplayStyle.Flex;
+            priceArea.style.display = DisplayStyle.Flex;
         }
         else
         {
             //cancel.visible = false;
             cancelBtn.style.display = DisplayStyle.None;
+            priceArea.style.display = DisplayStyle.None;
         }
 
         foreach (var item in EnviromentSetting.dogBreeds)

+ 13 - 20
Assets/Scripts/Playground/PlayToyController.cs

@@ -251,9 +251,6 @@ public class PlayToyController : MonoBehaviour
                 textValue = GameTool.GetValueAtPath(EnviromentSetting.languageData, new string[] { "playgroundUI", "label", "game_result", "finishSuccess", EnviromentSetting.languageCode });
                 textValue = textValue.Replace("<<distance>>", Math.Round(PlayData.throwDistance(), 2).ToString());   // 保留小数点后2位
                 gameResult.text = textValue;
-
-                // 飞碟游戏成功后,提交道具使用和受影响狗的列表
-                PlayFinishRequest();
             }
             else if (PlayData.gameStatus == PlayData.GameStatus.finishFail)
             {
@@ -265,6 +262,10 @@ public class PlayToyController : MonoBehaviour
                 textValue = GameTool.GetValueAtPath(EnviromentSetting.languageData, new string[] { "playgroundUI", "label", "game_result", "finishOutOfBound", EnviromentSetting.languageCode });
                 gameResult.text = textValue;
             }
+            // 飞碟游戏成功后,提交成绩
+            float distance = PlayData.throwDistance();
+            bool isSuccess = PlayData.gameStatus == PlayData.GameStatus.finishSuccess;
+            PlayFinishRequest(distance, isSuccess);
         }
         PlayData.isResultShowed = true;
     }
@@ -291,18 +292,18 @@ public class PlayToyController : MonoBehaviour
     }
 
     // 提交道具使用和受影响狗的列表
-    void PlayFinishRequest()
+    void PlayFinishRequest(float distance, bool isSuccess)
     {
         Debug.Log("Play Frisbee finish request");
 
-        List<string> dogs = new List<string>();
-        dogs.Add(UserProperty.dogs[GameData.focusDog].d_id);
-        string dogsJson = JsonConvert.SerializeObject(dogs);
-        string url = "/api/item/use/";
+        string url = "/api/frisbee/score/";
         WWWForm form = new();
+        string dogId = UserProperty.GetDogIdByIndex(GameData.focusDog);
         form.AddField("user_id", UserProperty.userId);
         form.AddField("item_id", GameData.playedToy);
-        form.AddField("dog_list", dogsJson);
+        form.AddField("dog_id", dogId);
+        form.AddField("distance", distance.ToString());
+        form.AddField("is_success", isSuccess ? "true" : "false");
         StartCoroutine(WebController.PostRequest(url, form, callback: PlayFrisbeeReqCallback));
     }
 
@@ -311,22 +312,14 @@ public class PlayToyController : MonoBehaviour
         var data = JsonConvert.DeserializeObject<Dictionary<string, object>>(json);
         if (data != null && data["status"].ToString() == "success")
         {
-            // TODO 清除然后重新写入用户道具数据
-
-            // 清除然后重新写入狗的数据
-            DogProperty[] dogProperties = JsonConvert.DeserializeObject<DogProperty[]>(data["dogs"].ToString());
-            UserProperty.dogs.Clear();
-            foreach (var dog in dogProperties)
-            {
-                UserProperty.dogs.Add(dog);
-            }
-
+            // 刷新狗的数据
+            string dogs = data["dogs"].ToString();
+            UserProperty.RefreshDogInfo(dogs);
         }
         else
         {
             Debug.Log(data["message"]);
         }
-
     }
 }
 

+ 2 - 1
Assets/Scripts/WalkDogs/WalkDogsScoreController.cs

@@ -90,7 +90,8 @@ public class WalkDogsScoreController : MonoBehaviour
 
     private void ConfirmButtonClick()
     {
-        MaskTransitions.TransitionManager.Instance.LoadLevel("Home");
+        // MaskTransitions.TransitionManager.Instance.LoadLevel("Home");
+        ScoreSubmitRequest();
     }
 
     private void ScoreSubmitRequest()

+ 10 - 10
Assets/UI Toolkit/Style/rootStyle.uss

@@ -34,10 +34,10 @@
     padding-right: 1px;
     padding-bottom: 1px;
     padding-left: 1px;
-    margin-top: 10px;
-    margin-right: 10px;
-    margin-bottom: 10px;
-    margin-left: 10px;
+    margin-top: 4px;
+    margin-right: 4px;
+    margin-bottom: 4px;
+    margin-left: 4px;
     max-width: 100%;
     -unity-text-align: middle-center;
 }
@@ -46,7 +46,7 @@
     align-items: center;
     flex-shrink: initial;
     flex-grow: initial;
-    margin-top: 4px;
+    margin-top: 2px;
 }
 
 .textField__multiline {
@@ -124,7 +124,7 @@
 
 .dropdownField > .unity-label {
     width: 33%;
-    height: 50px;
+    height: auto;
     -unity-font-definition: url("project://database/Assets/Font/MaoKenZhuYuanTi-MaokenZhuyuanTi-2.ttf?fileID=12800000&guid=50a63638b44907e46a3fa871d63b7d39&type=3#MaoKenZhuYuanTi-MaokenZhuyuanTi-2");
     font-size: 13px;
     min-width: 0;
@@ -145,10 +145,10 @@
     padding-right: 1px;
     padding-bottom: 1px;
     padding-left: 1px;
-    margin-top: 10px;
-    margin-right: 10px;
-    margin-bottom: 10px;
-    margin-left: 10px;
+    margin-top: 4px;
+    margin-right: 4px;
+    margin-bottom: 4px;
+    margin-left: 4px;
     max-width: 100%;
     -unity-text-align: middle-center;
 }