ソースを参照

4/13更新

2025/4/12	添加登录中间页面,未来可以开发出用户自己的狗在家门口等待的效果。
领养界面调起摄像头扫描二维码成功
2025/4/13	修改右侧菜单打开角度自动算法,根据subMenu数量自动计算角度
添加部分生成狗狗传送二维码代码
Jees 1 ヶ月 前
コミット
f4c4153f1a

+ 1 - 0
.gitignore

@@ -7,3 +7,4 @@
 /.vscode/
 /.vscode/
 /.utmp/
 /.utmp/
 /.vsconfig
 /.vsconfig
+.DS_Store

ファイルの差分が大きいため隠しています
+ 0 - 25
Assembly-CSharp-Editor.csproj


ファイルの差分が大きいため隠しています
+ 0 - 25
Assembly-CSharp-firstpass.csproj


ファイルの差分が大きいため隠しています
+ 0 - 25
Assembly-CSharp.csproj


+ 22 - 0
Assets/Resources/Data/languages.json

@@ -218,6 +218,10 @@
             "en": "Will you send<<dog name>>to foster care? It will cost 200 coins.",
             "en": "Will you send<<dog name>>to foster care? It will cost 200 coins.",
             "zh-cn": "把<<dog name>>送去寄养吗?将花费200金币。"
             "zh-cn": "把<<dog name>>送去寄养吗?将花费200金币。"
         },
         },
+        "transfer_dog_prompt": {
+            "en": "Will you send <<dog name>> to your friend?",
+            "zh-cn": "把<<dog name>>送给你的好友吗?"
+        },
         "record_dog_name": {
         "record_dog_name": {
             "en": "Are you ready? Please hold record and say the puppy's name.",
             "en": "Are you ready? Please hold record and say the puppy's name.",
             "zh-cn": "准备好了吗?按住下面的录音按键说出狗狗的名字。"
             "zh-cn": "准备好了吗?按住下面的录音按键说出狗狗的名字。"
@@ -318,6 +322,14 @@
                     "zh-cn": "请在这里输入你的用密码."
                     "zh-cn": "请在这里输入你的用密码."
                 }
                 }
             }
             }
+        },
+        "start_game":{
+            "button":{
+                "start": {
+                    "en": "Start",
+                    "zh-cn": "开始"
+                }
+            }
         }
         }
     },
     },
     "user_message": {
     "user_message": {
@@ -353,6 +365,10 @@
             "back": {
             "back": {
                 "en": "Back",
                 "en": "Back",
                 "zh-cn": "返回"
                 "zh-cn": "返回"
+            },
+            "cancel": {
+                "en": "Cancel",
+                "zh-cn": "放弃"
             }
             }
         },
         },
         "status": {
         "status": {
@@ -408,6 +424,12 @@
                 "en": "It is too fat.",
                 "en": "It is too fat.",
                 "zh-cn": "它看起来胖成一个球了"
                 "zh-cn": "它看起来胖成一个球了"
             }
             }
+        },
+        "message":{
+            "scan_QRcode": {
+                "en": "Please let your friend scan the QR code within <<second>> seconds.",
+                "zh-cn": "请在<<second>>秒内让你的好友扫描二维码。"
+            }
         }
         }
     },
     },
     "shoppingUI": {
     "shoppingUI": {

+ 74 - 1
Assets/Resources/Status/Status.prefab

@@ -1,5 +1,77 @@
 %YAML 1.1
 %YAML 1.1
 %TAG !u! tag:unity3d.com,2011:
 %TAG !u! tag:unity3d.com,2011:
+--- !u!1 &2330952801800188458
+GameObject:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  serializedVersion: 6
+  m_Component:
+  - component: {fileID: 2036284543114359424}
+  - component: {fileID: 4389362542847398255}
+  - component: {fileID: 1922957480217080132}
+  m_Layer: 5
+  m_Name: QRCode
+  m_TagString: Untagged
+  m_Icon: {fileID: 0}
+  m_NavMeshLayer: 0
+  m_StaticEditorFlags: 0
+  m_IsActive: 1
+--- !u!224 &2036284543114359424
+RectTransform:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_GameObject: {fileID: 2330952801800188458}
+  m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
+  m_LocalPosition: {x: 0, y: 0, z: 0}
+  m_LocalScale: {x: 1, y: 1, z: 1}
+  m_ConstrainProportionsScale: 0
+  m_Children: []
+  m_Father: {fileID: 8435704930564478781}
+  m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
+  m_AnchorMin: {x: 0.5, y: 0.5}
+  m_AnchorMax: {x: 0.5, y: 0.5}
+  m_AnchoredPosition: {x: 0, y: 60}
+  m_SizeDelta: {x: 256, y: 256}
+  m_Pivot: {x: 0.5, y: 0.5}
+--- !u!222 &4389362542847398255
+CanvasRenderer:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_GameObject: {fileID: 2330952801800188458}
+  m_CullTransparentMesh: 1
+--- !u!114 &1922957480217080132
+MonoBehaviour:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_GameObject: {fileID: 2330952801800188458}
+  m_Enabled: 1
+  m_EditorHideFlags: 0
+  m_Script: {fileID: 11500000, guid: 1344c3c82d62a2a41a3576d8abb8e3ea, type: 3}
+  m_Name: 
+  m_EditorClassIdentifier: 
+  m_Material: {fileID: 0}
+  m_Color: {r: 1, g: 1, b: 1, a: 1}
+  m_RaycastTarget: 1
+  m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
+  m_Maskable: 1
+  m_OnCullStateChanged:
+    m_PersistentCalls:
+      m_Calls: []
+  m_Texture: {fileID: 0}
+  m_UVRect:
+    serializedVersion: 2
+    x: 0
+    y: 0
+    width: 1
+    height: 1
 --- !u!1 &2559338786808445806
 --- !u!1 &2559338786808445806
 GameObject:
 GameObject:
   m_ObjectHideFlags: 0
   m_ObjectHideFlags: 0
@@ -86,7 +158,7 @@ GameObject:
   m_Icon: {fileID: 0}
   m_Icon: {fileID: 0}
   m_NavMeshLayer: 0
   m_NavMeshLayer: 0
   m_StaticEditorFlags: 0
   m_StaticEditorFlags: 0
-  m_IsActive: 0
+  m_IsActive: 1
 --- !u!224 &8435704930564478781
 --- !u!224 &8435704930564478781
 RectTransform:
 RectTransform:
   m_ObjectHideFlags: 0
   m_ObjectHideFlags: 0
@@ -100,6 +172,7 @@ RectTransform:
   m_ConstrainProportionsScale: 0
   m_ConstrainProportionsScale: 0
   m_Children:
   m_Children:
   - {fileID: 6977922947396265147}
   - {fileID: 6977922947396265147}
+  - {fileID: 2036284543114359424}
   m_Father: {fileID: 0}
   m_Father: {fileID: 0}
   m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
   m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
   m_AnchorMin: {x: 0, y: 0}
   m_AnchorMin: {x: 0, y: 0}

+ 77 - 13
Assets/Resources/Status/StatusController.cs

@@ -11,17 +11,24 @@ using UnityEngine.UIElements;
  */
  */
 public class StatusController : MonoBehaviour
 public class StatusController : MonoBehaviour
 {
 {
-    private Button backButton;
+    private Button backButton, cancelButton;
     private Label nameLabel, genderLabel, breedLabel, hostLabel, hostnameLabel, ageLabel, ageValueLabel, statusLabel, statusValueLabel;
     private Label nameLabel, genderLabel, breedLabel, hostLabel, hostnameLabel, ageLabel, ageValueLabel, statusLabel, statusValueLabel;
     private Label leftArrow, rightArrow;
     private Label leftArrow, rightArrow;
     private Label addLabel, transfer, remove, callback;
     private Label addLabel, transfer, remove, callback;
+    private Label transferMsgLabel;
+    private string transferMsgBasic;
+    private DateTime transferCountStartTime = new DateTime();
     DogProperty puppy;
     DogProperty puppy;
-    private VisualElement selectElement;
+    private VisualElement selectElement, statusElement, transferElement;
+    private StausUIPage currentPage = StausUIPage.Status;
     // Start is called before the first frame update
     // Start is called before the first frame update
     void OnEnable()
     void OnEnable()
     {
     {
         var root = GetComponent<UIDocument>().rootVisualElement;
         var root = GetComponent<UIDocument>().rootVisualElement;
+        statusElement = root.Q("statusElement");
+        transferElement = root.Q("transferElement");
         backButton = root.Q<Button>("back");
         backButton = root.Q<Button>("back");
+        cancelButton = root.Q<Button>("cancel");
         nameLabel = root.Q<Label>("name");
         nameLabel = root.Q<Label>("name");
         genderLabel = root.Q<Label>("gender");
         genderLabel = root.Q<Label>("gender");
         breedLabel = root.Q<Label>("breed");
         breedLabel = root.Q<Label>("breed");
@@ -38,9 +45,11 @@ public class StatusController : MonoBehaviour
         transfer = root.Q<Label>("transfer");
         transfer = root.Q<Label>("transfer");
         remove = root.Q<Label>("remove");
         remove = root.Q<Label>("remove");
         callback = root.Q<Label>("callback");
         callback = root.Q<Label>("callback");
+        transferMsgLabel = root.Q<Label>("transferMsg");
 
 
         // 绑定事件
         // 绑定事件
         backButton.clicked += BackBtnClick;
         backButton.clicked += BackBtnClick;
+        cancelButton.clicked += CancelBtnClick;
         leftArrow.RegisterCallback<ClickEvent>(e => LeftArrowClicked(e));
         leftArrow.RegisterCallback<ClickEvent>(e => LeftArrowClicked(e));
         rightArrow.RegisterCallback<ClickEvent>(e => RightArrowClicked(e));
         rightArrow.RegisterCallback<ClickEvent>(e => RightArrowClicked(e));
         addLabel.RegisterCallback<ClickEvent>(e => AddClick(e));
         addLabel.RegisterCallback<ClickEvent>(e => AddClick(e));
@@ -78,6 +87,12 @@ public class StatusController : MonoBehaviour
         {
         {
             addLabel.style.display = DisplayStyle.Flex;
             addLabel.style.display = DisplayStyle.Flex;
         }
         }
+
+        // 刷新狗的数据
+        puppy = UserProperty.dogs[GameData.focusDog];
+        StatusPageUpdate();
+        LabelLanguageSetting();
+        StatusSummary();
     }
     }
 
 
     //private void Start()
     //private void Start()
@@ -89,10 +104,21 @@ public class StatusController : MonoBehaviour
     void Update()
     void Update()
     {
     {
         // 刷新狗的数据
         // 刷新狗的数据
-        puppy = UserProperty.dogs[GameData.focusDog];
-        StatusPageUpdate();
-        LabelLanguageSetting();
-        StatusSummary();
+        // puppy = UserProperty.dogs[GameData.focusDog];
+        // StatusPageUpdate();
+        // LabelLanguageSetting();
+        // StatusSummary();
+        if (currentPage == StausUIPage.Transfer)
+        {
+            TimeSpan ts = DateTime.Now - transferCountStartTime;
+            if (ts.TotalSeconds > 120)
+            {
+                // todo 超过120秒,关闭二维码
+                transferElement.style.display = DisplayStyle.None;
+                statusElement.style.display = DisplayStyle.Flex;
+                currentPage = StausUIPage.Status;
+            }
+        }
     }
     }
 
 
     //void BackPressed()
     //void BackPressed()
@@ -149,12 +175,16 @@ public class StatusController : MonoBehaviour
         // 设置status UI界面里面label和按键的语言显示
         // 设置status UI界面里面label和按键的语言显示
         string textValue = GameTool.GetValueAtPath(EnviromentSetting.languageData, new string[] { "statusUI", "button", "back", EnviromentSetting.languageCode });
         string textValue = GameTool.GetValueAtPath(EnviromentSetting.languageData, new string[] { "statusUI", "button", "back", EnviromentSetting.languageCode });
         backButton.text = textValue;
         backButton.text = textValue;
+        textValue = GameTool.GetValueAtPath(EnviromentSetting.languageData, new string[] { "statusUI", "button", "cancel", EnviromentSetting.languageCode });
+        cancelButton.text = textValue;
         textValue = GameTool.GetValueAtPath(EnviromentSetting.languageData, new string[] { "statusUI", "label", "host", EnviromentSetting.languageCode });
         textValue = GameTool.GetValueAtPath(EnviromentSetting.languageData, new string[] { "statusUI", "label", "host", EnviromentSetting.languageCode });
         hostLabel.text = textValue;
         hostLabel.text = textValue;
         textValue = GameTool.GetValueAtPath(EnviromentSetting.languageData, new string[] { "statusUI", "label", "days", EnviromentSetting.languageCode });
         textValue = GameTool.GetValueAtPath(EnviromentSetting.languageData, new string[] { "statusUI", "label", "days", EnviromentSetting.languageCode });
         ageLabel.text = textValue;
         ageLabel.text = textValue;
         textValue = GameTool.GetValueAtPath(EnviromentSetting.languageData, new string[] { "statusUI", "label", "status", EnviromentSetting.languageCode });
         textValue = GameTool.GetValueAtPath(EnviromentSetting.languageData, new string[] { "statusUI", "label", "status", EnviromentSetting.languageCode });
         statusLabel.text = textValue;
         statusLabel.text = textValue;
+        textValue = GameTool.GetValueAtPath(EnviromentSetting.languageData, new string[] { "statusUI", "message", "scan_QRcode", EnviromentSetting.languageCode });
+        transferMsgBasic = textValue;
     }
     }
     void StatusSummary()
     void StatusSummary()
     {
     {
@@ -291,14 +321,21 @@ public class StatusController : MonoBehaviour
         }
         }
     }
     }
 
 
+    void CancelBtnClick()
+    {
+        statusElement.style.display = DisplayStyle.Flex;
+        transferElement.style.display = DisplayStyle.None;
+        currentPage = StausUIPage.Status;
+    }
+
     void AddClick(ClickEvent e)
     void AddClick(ClickEvent e)
     {
     {
-        if (UserProperty.level == "basic")
-        {
-            string msg = GameTool.GetValueAtPath(EnviromentSetting.languageData, new string[] { "game_message", "add_dog_fail_account_level", EnviromentSetting.languageCode });
-            MessageBoxController.ShowMessage(msg);
-        }
-        else if (UserProperty.dogs.Count == EnviromentSetting.maxDogQty)
+        // if (UserProperty.level == "basic")
+        // {
+        //     string msg = GameTool.GetValueAtPath(EnviromentSetting.languageData, new string[] { "game_message", "add_dog_fail_account_level", EnviromentSetting.languageCode });
+        //     MessageBoxController.ShowMessage(msg);
+        // }
+        if (UserProperty.dogs.Count >= EnviromentSetting.maxDogQty)
         {
         {
             string msg = GameTool.GetValueAtPath(EnviromentSetting.languageData, new string[] { "game_message", "add_dog_fail_no_more", EnviromentSetting.languageCode });
             string msg = GameTool.GetValueAtPath(EnviromentSetting.languageData, new string[] { "game_message", "add_dog_fail_no_more", EnviromentSetting.languageCode });
             MessageBoxController.ShowMessage(msg);
             MessageBoxController.ShowMessage(msg);
@@ -315,7 +352,7 @@ public class StatusController : MonoBehaviour
     void SwitchAddNewDog()
     void SwitchAddNewDog()
     {
     {
         GameData.subScene = "Login_InitDog";
         GameData.subScene = "Login_InitDog";
-        SceneManager.LoadScene("Home");
+        MaskTransitions.TransitionManager.Instance.LoadLevel("Login");
     }
     }
 
 
     void RemoveClick(ClickEvent e) {
     void RemoveClick(ClickEvent e) {
@@ -342,6 +379,33 @@ public class StatusController : MonoBehaviour
     void TransferClick(ClickEvent e)
     void TransferClick(ClickEvent e)
     {
     {
         // TODO 添加代码增加面对面赠送狗的功能
         // TODO 添加代码增加面对面赠送狗的功能
+        string msg = GameTool.GetValueAtPath(EnviromentSetting.languageData, new string[] { "game_message", "transfer_dog_prompt", EnviromentSetting.languageCode });
+        msg = msg.Replace("<<dog name>>", UserProperty.dogs[GameData.focusDog].dog_name);
+        MessageBoxController.YorN_Message(msg, TransferDogRequest);
+        
+    }
+
+    void TransferDogRequest()
+    {
+        string url = "/api/transfer_dog/receive/";
+        Dictionary<string, string> formData = new();
+        WWWForm form = new();
+        form.AddField("user_id", UserProperty.userId);
+        form.AddField("dog_id", UserProperty.GetDogIdByIndex(GameData.focusDog));
+        StartCoroutine(WebController.PostRequest(url, form, callback: TransferDogCallback));
+    }
+
+    void TransferDogCallback(string json){
+        // TODO 生成二维码,和120秒倒计时
+        transferCountStartTime = DateTime.Now;
+        currentPage = StausUIPage.Transfer;
+        
     }
     }
 }
 }
 
 
+enum StausUIPage
+{
+    Status,
+    Transfer,
+}
+

+ 0 - 22
Assets/Resources/Status/StatusUI backup.uxml

@@ -1,22 +0,0 @@
-<ui:UXML xmlns:ui="UnityEngine.UIElements" xmlns:uie="UnityEditor.UIElements" editor-extension-mode="False">
-    <Style src="project://database/Assets/Resources/Status/sytleLabels.uss?fileID=7433441132597879392&amp;guid=21d236151b567a34aafb4dd11ce02947&amp;type=3#sytleLabels" />
-    <ui:VisualElement name="Basic" style="flex-grow: 1; width: 100%; height: 466px; background-color: rgb(248, 255, 218); position: absolute; max-height: none; min-height: auto; background-image: none; -unity-background-image-tint-color: rgb(255, 255, 255); align-items: flex-start; visibility: visible; overflow: visible; display: flex; opacity: 1; right: auto; bottom: auto; justify-content: flex-start; align-self: center; margin-top: 25px; margin-right: 0; margin-bottom: 0; margin-left: 0; border-top-left-radius: 10px; border-top-right-radius: 10px; border-bottom-right-radius: 10px; border-bottom-left-radius: 10px; top: auto; left: auto; -unity-background-scale-mode: stretch-to-fill;">
-        <ui:Label tabindex="-1" text="&lt;dog name&gt;" parse-escape-sequences="true" display-tooltip-when-elided="true" name="name" class="Labels" style="width: 200px; position: absolute; left: 5px; height: 40px; margin-top: 10px;" />
-        <ui:Label tabindex="-1" text="&lt;dog gender&gt;" parse-escape-sequences="true" display-tooltip-when-elided="true" name="gender" class="Labels" style="position: absolute; left: 200px; width: auto; height: 40px; right: 5px; margin-top: 10px;" />
-        <ui:Label tabindex="-1" text="&lt;breed&gt;" parse-escape-sequences="true" display-tooltip-when-elided="true" name="breed" class="Labels" style="position: absolute; top: 46px; left: 5px; height: 40px; width: auto; right: 5px;" />
-        <ui:Label tabindex="-1" text="主人" parse-escape-sequences="true" display-tooltip-when-elided="true" name="host" class="Labels" style="position: absolute; top: 82px; left: 5px; height: 40px; width: 100px; align-self: auto; align-items: center; justify-content: center; -unity-text-align: upper-left;" />
-        <ui:Label tabindex="-1" text="&lt;Host name&gt;" parse-escape-sequences="true" display-tooltip-when-elided="true" name="hostname" class="Labels" style="top: 82px; left: 101px; height: 40px; width: auto; -unity-text-align: upper-left; right: 5px;" />
-        <ui:Label tabindex="-1" text="共度时光" parse-escape-sequences="true" display-tooltip-when-elided="true" name="age" class="Labels" style="position: absolute; top: 118px; left: 5px; height: 40px; width: 100px; align-self: auto; align-items: center; justify-content: center; -unity-text-align: upper-left;" />
-        <ui:Label tabindex="-1" text="&lt;YY:MM:DD&gt;" parse-escape-sequences="true" display-tooltip-when-elided="true" name="ageValue" class="Labels" style="top: 118px; left: 101px; height: 40px; width: auto; -unity-text-align: upper-left; right: 5px;" />
-        <ui:Label tabindex="-1" text="状态" parse-escape-sequences="true" display-tooltip-when-elided="true" name="status" class="Labels" style="position: absolute; top: 180px; left: 30px; height: 40px; width: 100px; align-self: auto; align-items: center; justify-content: center; -unity-text-align: upper-left; border-top-width: 0; border-right-width: 0; border-bottom-width: 0; border-left-width: 0;" />
-        <ui:Label tabindex="-1" text="&lt;Status Comment&gt;" parse-escape-sequences="true" display-tooltip-when-elided="true" name="statusValue" class="Labels" style="top: 180px; left: 120px; height: 40px; width: auto; -unity-text-align: upper-left; right: 5px; border-top-width: 0; border-right-width: 0; border-bottom-width: 0; border-left-width: 0;" />
-        <ui:Label tabindex="-1" text="饥饿程度" parse-escape-sequences="true" display-tooltip-when-elided="true" name="hungry" class="Labels" style="position: absolute; top: 220px; left: 30px; height: 40px; width: 100px; align-self: auto; align-items: center; justify-content: center; -unity-text-align: upper-left; border-top-width: 0; border-right-width: 0; border-bottom-width: 0; border-left-width: 0;" />
-        <ui:Label tabindex="-1" text="&lt;Hungry Comment&gt;" parse-escape-sequences="true" display-tooltip-when-elided="true" name="hungryValue" class="Labels" style="top: 220px; left: 120px; height: 40px; width: auto; -unity-text-align: upper-left; right: 5px; border-top-width: 0; border-right-width: 0; border-bottom-width: 0; border-left-width: 0;" />
-        <ui:Label tabindex="-1" text="口渴程度" parse-escape-sequences="true" display-tooltip-when-elided="true" name="thirsty" class="Labels" style="position: absolute; top: 260px; left: 30px; height: 40px; width: 100px; align-self: auto; align-items: center; justify-content: center; -unity-text-align: upper-left; border-top-width: 0; border-right-width: 0; border-bottom-width: 0; border-left-width: 0;" />
-        <ui:Label tabindex="-1" text="&lt;Hungry Comment&gt;" parse-escape-sequences="true" display-tooltip-when-elided="true" name="hungryValue" class="Labels" style="top: 260px; left: 120px; height: 40px; width: auto; -unity-text-align: upper-left; right: 5px; border-top-width: 0; border-right-width: 0; border-bottom-width: 0; border-left-width: 0;" />
-        <ui:Label tabindex="-1" text="肥胖" parse-escape-sequences="true" display-tooltip-when-elided="true" name="obesity" class="Labels" style="position: absolute; top: 300px; left: 30px; height: 40px; width: 100px; align-self: auto; align-items: center; justify-content: center; -unity-text-align: upper-left; border-top-width: 0; border-right-width: 0; border-bottom-width: 0; border-left-width: 0;" />
-        <ui:Label tabindex="-1" text="&lt;obesity Comment&gt;" parse-escape-sequences="true" display-tooltip-when-elided="true" name="obesityValue" class="Labels" style="top: 300px; left: 120px; height: 40px; width: auto; -unity-text-align: upper-left; right: 5px; border-top-width: 0; border-right-width: 0; border-bottom-width: 0; border-left-width: 0;" />
-        <ui:Label tabindex="-1" text="肥胖" parse-escape-sequences="true" display-tooltip-when-elided="true" name="obesity" class="Labels" style="position: absolute; top: 340px; left: 30px; height: 40px; width: 100px; align-self: auto; align-items: center; justify-content: center; -unity-text-align: upper-left; border-top-width: 0; border-right-width: 0; border-bottom-width: 0; border-left-width: 0;" />
-        <ui:Label tabindex="-1" text="&lt;obesity Comment&gt;" parse-escape-sequences="true" display-tooltip-when-elided="true" name="obesityValue" class="Labels" style="top: 340px; left: 120px; height: 40px; width: auto; -unity-text-align: upper-left; right: 5px; border-top-width: 0; border-right-width: 0; border-bottom-width: 0; border-left-width: 0;" />
-    </ui:VisualElement>
-</ui:UXML>

+ 5 - 1
Assets/Resources/Status/StatusUI.uxml

@@ -1,7 +1,7 @@
 <ui:UXML xmlns:ui="UnityEngine.UIElements" xmlns:uie="UnityEditor.UIElements" editor-extension-mode="False">
 <ui:UXML xmlns:ui="UnityEngine.UIElements" xmlns:uie="UnityEditor.UIElements" editor-extension-mode="False">
     <Style src="project://database/Assets/Resources/Status/StatusStyle.uss?fileID=7433441132597879392&amp;guid=21d236151b567a34aafb4dd11ce02947&amp;type=3#StatusStyle" />
     <Style src="project://database/Assets/Resources/Status/StatusStyle.uss?fileID=7433441132597879392&amp;guid=21d236151b567a34aafb4dd11ce02947&amp;type=3#StatusStyle" />
     <Style src="project://database/Assets/UI%20Toolkit/Style/rootStyle.uss?fileID=7433441132597879392&amp;guid=b30eb17a0ca8bf64087af4e59d565fdd&amp;type=3#rootStyle" />
     <Style src="project://database/Assets/UI%20Toolkit/Style/rootStyle.uss?fileID=7433441132597879392&amp;guid=b30eb17a0ca8bf64087af4e59d565fdd&amp;type=3#rootStyle" />
-    <ui:VisualElement name="Basic" class="background" style="background-image: url(&quot;project://database/Assets/Pictures/status%20background.jpg?fileID=2800000&amp;guid=0152cbfe524647a4498a5a7ce74af4a2&amp;type=3#status background&quot;);">
+    <ui:VisualElement name="statusUI" class="background" style="background-image: url(&quot;project://database/Assets/Pictures/status%20background.jpg?fileID=2800000&amp;guid=0152cbfe524647a4498a5a7ce74af4a2&amp;type=3#status background&quot;); height: auto; display: flex;">
         <ui:Label tabindex="-1" text="&lt;dog name&gt;" parse-escape-sequences="true" display-tooltip-when-elided="true" name="name" class="Labels" style="position: absolute; left: 5px; height: 40px; margin-top: 0; top: 10px; right: auto; align-items: center; justify-content: center; width: 200px;" />
         <ui:Label tabindex="-1" text="&lt;dog name&gt;" parse-escape-sequences="true" display-tooltip-when-elided="true" name="name" class="Labels" style="position: absolute; left: 5px; height: 40px; margin-top: 0; top: 10px; right: auto; align-items: center; justify-content: center; width: 200px;" />
         <ui:Label tabindex="-1" text="&lt;dog gender&gt;" parse-escape-sequences="true" display-tooltip-when-elided="true" name="gender" class="Labels" style="position: absolute; left: 202px; width: auto; height: 40px; right: 5px; margin-top: 0; top: 10px;" />
         <ui:Label tabindex="-1" text="&lt;dog gender&gt;" parse-escape-sequences="true" display-tooltip-when-elided="true" name="gender" class="Labels" style="position: absolute; left: 202px; width: auto; height: 40px; right: 5px; margin-top: 0; top: 10px;" />
         <ui:Label tabindex="-1" text="&lt;breed&gt;" parse-escape-sequences="true" display-tooltip-when-elided="true" name="breed" class="Labels" style="position: absolute; top: 46px; left: 5px; height: 40px; width: auto; right: 5px;" />
         <ui:Label tabindex="-1" text="&lt;breed&gt;" parse-escape-sequences="true" display-tooltip-when-elided="true" name="breed" class="Labels" style="position: absolute; top: 46px; left: 5px; height: 40px; width: auto; right: 5px;" />
@@ -23,4 +23,8 @@
             <ui:Label text="➡" emoji-fallback-support="false" name="rightArrow" class="arrow" style="visibility: visible; -unity-text-outline-color: rgba(22, 131, 245, 0.78); -unity-text-outline-width: 1px;" />
             <ui:Label text="➡" emoji-fallback-support="false" name="rightArrow" class="arrow" style="visibility: visible; -unity-text-outline-color: rgba(22, 131, 245, 0.78); -unity-text-outline-width: 1px;" />
         </ui:VisualElement>
         </ui:VisualElement>
     </ui:VisualElement>
     </ui:VisualElement>
+    <ui:VisualElement name="transferElement" style="flex-grow: 1; flex-direction: column-reverse; bottom: 70px; display: none;">
+        <ui:Button text="&lt;cancel&gt;" name="cancel" enable-rich-text="false" emoji-fallback-support="false" class="button" style="align-self: center; background-color: rgb(255, 255, 255);" />
+        <ui:Label text="trasnfer message here." name="transferMsg" class="message" style="border-top-width: 2px; border-right-width: 2px; border-bottom-width: 2px; border-left-width: 2px; border-top-left-radius: 2px; border-top-right-radius: 2px; border-bottom-right-radius: 2px; border-bottom-left-radius: 2px; background-color: rgba(255, 198, 109, 0.86); margin-bottom: 4px; border-left-color: rgba(0, 0, 0, 0.24); border-right-color: rgba(0, 0, 0, 0.24); border-top-color: rgba(0, 0, 0, 0.24); border-bottom-color: rgba(0, 0, 0, 0.24);" />
+    </ui:VisualElement>
 </ui:UXML>
 </ui:UXML>

+ 12 - 10
Assets/Resources/UserInfo/UserInfo.uxml

@@ -1,16 +1,18 @@
 <ui:UXML xmlns:ui="UnityEngine.UIElements" xmlns:uie="UnityEditor.UIElements" editor-extension-mode="True">
 <ui:UXML xmlns:ui="UnityEngine.UIElements" xmlns:uie="UnityEditor.UIElements" editor-extension-mode="True">
     <ui:Template name="confirmArea" src="project://database/Assets/UI%20Toolkit/UI%20template/confirmArea.uxml?fileID=9197481963319205126&amp;guid=030fcebdf097b964ebdb70bc2362ffa6&amp;type=3#confirmArea" />
     <ui:Template name="confirmArea" src="project://database/Assets/UI%20Toolkit/UI%20template/confirmArea.uxml?fileID=9197481963319205126&amp;guid=030fcebdf097b964ebdb70bc2362ffa6&amp;type=3#confirmArea" />
     <Style src="project://database/Assets/UI%20Toolkit/Style/rootStyle.uss?fileID=7433441132597879392&amp;guid=b30eb17a0ca8bf64087af4e59d565fdd&amp;type=3#rootStyle" />
     <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">
-        <ui:TextField label="Your name:" max-length="16" value="Nintendo1234567890" hide-placeholder-on-focus="false" name="name" class="TextField textField" style="height: auto; -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;); margin-top: 0;" />
-        <ui:TextField label="Password:" name="password" value="********" password="true" max-length="16" is-delayed="false" emoji-fallback-support="false" class="textField" />
-        <ui:TextField label="手机号码:" max-length="16" value="13012345678" name="mobile" class="textField" style="display: flex;" />
-        <ui:TextField label="Email:" name="email" value="geniusjees@echo3991.com and kenny@flex.com&#10;" multiline="false" password="false" max-length="50" enabled="true" keyboard-type="EmailAddress" class="textField__multiline" style="white-space: normal;" />
-        <ui:Label text="* error message&#10;* message 2" name="error_msg" class="err_msg" />
-        <ui:VisualElement style="flex-grow: 1; flex-direction: column-reverse; bottom: 80px; align-self: flex-end;">
-            <ui:Button text="Log out" name="logout" class="tranparentBtn" style="display: flex;" />
-            <ui:Button text="注销" name="delete_account" class="tranparentBtn" style="align-self: flex-end; -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;); display: none;" />
+    <ui:VisualElement name="root" class="rootStyle" style="border-top-left-radius: 0; border-top-right-radius: 0; border-bottom-right-radius: 0; border-bottom-left-radius: 0;">
+        <ui:VisualElement class="rootStyle" style="flex-grow: 1; background-image: url(&quot;project://database/Assets/Texture/wood2.jpg?fileID=2800000&amp;guid=d475b519c7081d3468cca2d4d1b504b1&amp;type=3#wood2&quot;); margin-top: 0; margin-left: 0; margin-right: 0; margin-bottom: 0;">
+            <ui:TextField label="Your name:" max-length="16" value="Nintendo1234567890" hide-placeholder-on-focus="false" name="name" class="TextField textField" style="height: auto; -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;); margin-top: 0;" />
+            <ui:TextField label="Password:" name="password" value="********" password="true" max-length="16" is-delayed="false" emoji-fallback-support="false" class="textField" />
+            <ui:TextField label="手机号码:" max-length="16" value="13012345678" name="mobile" class="textField" style="display: flex;" />
+            <ui:TextField label="Email:" name="email" value="geniusjees@echo3991.com and kenny@flex.com&#10;" multiline="false" password="false" max-length="50" enabled="true" keyboard-type="EmailAddress" class="textField__multiline" style="white-space: normal;" />
+            <ui:Label text="* error message&#10;* message 2" name="error_msg" class="err_msg" />
+            <ui:VisualElement style="flex-grow: 1; flex-direction: column-reverse; bottom: 80px; align-self: flex-end;">
+                <ui:Button text="Log out" name="logout" class="tranparentBtn" style="display: flex; -unity-font-style: italic; font-size: 12px;" />
+                <ui:Button text="注销" name="delete_account" class="tranparentBtn" style="align-self: flex-end; -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;); display: none;" />
+            </ui:VisualElement>
+            <ui:Instance template="confirmArea" name="confirmArea" style="bottom: 0; position: absolute; width: 100%;" />
         </ui:VisualElement>
         </ui:VisualElement>
-        <ui:Instance template="confirmArea" name="confirmArea" style="bottom: 0; position: absolute; width: 100%;" />
     </ui:VisualElement>
     </ui:VisualElement>
 </ui:UXML>
 </ui:UXML>

+ 11 - 8
Assets/Resources/VoiceAndManu/MenuController.cs

@@ -79,11 +79,13 @@ public class MenuController : MonoBehaviour
         }
         }
         if (UserProperty.isRegUser == false)
         if (UserProperty.isRegUser == false)
         {
         {
-            home.style.display = DisplayStyle.None;
+            // home.style.display = DisplayStyle.None;
+            subMenu.Remove(home);
         }
         }
 
 
         // 目前开发暂时隐藏camera按钮
         // 目前开发暂时隐藏camera按钮
-        cameraBtn.style.display = DisplayStyle.None;
+        // cameraBtn.style.display = DisplayStyle.None;
+        subMenu.Remove(cameraBtn);
     }
     }
 
 
     private void Start()
     private void Start()
@@ -133,16 +135,17 @@ public class MenuController : MonoBehaviour
             return;
             return;
         }
         }
         // curAngle 初始角度,angleDelta 2个子菜单之间角度,distance 弹出距离,showTimer 显示时间
         // curAngle 初始角度,angleDelta 2个子菜单之间角度,distance 弹出距离,showTimer 显示时间
-        float curAngle = 75f;
-        float angleDelta = 40f;
+        float curAngle = 100f;
+        // float angleDelta = 40f;
+        float angleDelta = 200/subMenu.Count;
         float distance = 70f;
         float distance = 70f;
         //float showTimer = 3.0f;
         //float showTimer = 3.0f;
-        foreach (var subMenu in subMenu)
+        foreach (var menu in subMenu)
         {
         {
-            subMenu.visible = true;
+            menu.visible = true;
             var newPosition = CalcPosition(mainMenu.layout.position, curAngle, distance);
             var newPosition = CalcPosition(mainMenu.layout.position, curAngle, distance);
-            subMenu.style.left = newPosition.x;
-            subMenu.style.top = newPosition.y;
+            menu.style.left = newPosition.x;
+            menu.style.top = newPosition.y;
             curAngle += angleDelta;
             curAngle += angleDelta;
         }
         }
         mainMenu.transform.scale = new Vector2(0.8f, 0.8f);
         mainMenu.transform.scale = new Vector2(0.8f, 0.8f);

+ 4 - 0
Assets/Scenes/Home.unity

@@ -13663,6 +13663,10 @@ PrefabInstance:
       propertyPath: m_Name
       propertyPath: m_Name
       value: Status
       value: Status
       objectReference: {fileID: 0}
       objectReference: {fileID: 0}
+    - target: {fileID: 5997909836355842307, guid: 00b97733408f83840b44ba387e9ae31b, type: 3}
+      propertyPath: m_IsActive
+      value: 0
+      objectReference: {fileID: 0}
     - target: {fileID: 8435704930564478781, guid: 00b97733408f83840b44ba387e9ae31b, type: 3}
     - target: {fileID: 8435704930564478781, guid: 00b97733408f83840b44ba387e9ae31b, type: 3}
       propertyPath: m_Pivot.x
       propertyPath: m_Pivot.x
       value: 0
       value: 0

+ 245 - 4
Assets/Scenes/Login.unity

@@ -539,8 +539,8 @@ MonoBehaviour:
   m_Lens:
   m_Lens:
     FieldOfView: 60
     FieldOfView: 60
     OrthographicSize: 5
     OrthographicSize: 5
-    NearClipPlane: 2
-    FarClipPlane: 55
+    NearClipPlane: 1
+    FarClipPlane: 35
     Dutch: 0
     Dutch: 0
     ModeOverride: 0
     ModeOverride: 0
     LensShift: {x: 0, y: 0}
     LensShift: {x: 0, y: 0}
@@ -700,6 +700,70 @@ Transform:
   m_Children: []
   m_Children: []
   m_Father: {fileID: 0}
   m_Father: {fileID: 0}
   m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
   m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
+--- !u!1 &415346089
+GameObject:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  serializedVersion: 6
+  m_Component:
+  - component: {fileID: 415346090}
+  - component: {fileID: 415346091}
+  - component: {fileID: 415346092}
+  m_Layer: 0
+  m_Name: UIDocument
+  m_TagString: Untagged
+  m_Icon: {fileID: 0}
+  m_NavMeshLayer: 0
+  m_StaticEditorFlags: 0
+  m_IsActive: 1
+--- !u!4 &415346090
+Transform:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_GameObject: {fileID: 415346089}
+  serializedVersion: 2
+  m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
+  m_LocalPosition: {x: 0, y: 0, z: 0}
+  m_LocalScale: {x: 1, y: 1, z: 1}
+  m_ConstrainProportionsScale: 0
+  m_Children: []
+  m_Father: {fileID: 1016814390}
+  m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
+--- !u!114 &415346091
+MonoBehaviour:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_GameObject: {fileID: 415346089}
+  m_Enabled: 1
+  m_EditorHideFlags: 0
+  m_Script: {fileID: 19102, guid: 0000000000000000e000000000000000, type: 0}
+  m_Name: 
+  m_EditorClassIdentifier: 
+  m_PanelSettings: {fileID: 11400000, guid: 7ca44f0cc21b574428c09a7b6ce95659, type: 2}
+  m_ParentUI: {fileID: 0}
+  sourceAsset: {fileID: 9197481963319205126, guid: dc8e0b51d92174a998939e46353040c0, type: 3}
+  m_SortingOrder: 0
+  m_WorldSpaceSizeMode: 1
+  m_WorldSpaceWidth: 1920
+  m_WorldSpaceHeight: 1080
+--- !u!114 &415346092
+MonoBehaviour:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_GameObject: {fileID: 415346089}
+  m_Enabled: 1
+  m_EditorHideFlags: 0
+  m_Script: {fileID: 11500000, guid: 5955757544b38487baf1875e9adcd650, type: 3}
+  m_Name: 
+  m_EditorClassIdentifier: 
 --- !u!1 &462186836
 --- !u!1 &462186836
 GameObject:
 GameObject:
   m_ObjectHideFlags: 0
   m_ObjectHideFlags: 0
@@ -732,6 +796,7 @@ RectTransform:
   m_ConstrainProportionsScale: 0
   m_ConstrainProportionsScale: 0
   m_Children:
   m_Children:
   - {fileID: 1206893360}
   - {fileID: 1206893360}
+  - {fileID: 2072118115}
   m_Father: {fileID: 1751824541}
   m_Father: {fileID: 1751824541}
   m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
   m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
   m_AnchorMin: {x: 0, y: 0}
   m_AnchorMin: {x: 0, y: 0}
@@ -1849,7 +1914,7 @@ MonoBehaviour:
     FieldOfView: 60
     FieldOfView: 60
     OrthographicSize: 5
     OrthographicSize: 5
     NearClipPlane: 2
     NearClipPlane: 2
-    FarClipPlane: 55
+    FarClipPlane: 35
     Dutch: 0
     Dutch: 0
     ModeOverride: 0
     ModeOverride: 0
     LensShift: {x: 0, y: 0}
     LensShift: {x: 0, y: 0}
@@ -2256,7 +2321,7 @@ Camera:
     width: 1
     width: 1
     height: 1
     height: 1
   near clip plane: 2
   near clip plane: 2
-  far clip plane: 55
+  far clip plane: 35
   field of view: 60
   field of view: 60
   orthographic: 0
   orthographic: 0
   orthographic size: 5
   orthographic size: 5
@@ -2590,6 +2655,108 @@ CanvasRenderer:
   m_PrefabAsset: {fileID: 0}
   m_PrefabAsset: {fileID: 0}
   m_GameObject: {fileID: 977618151}
   m_GameObject: {fileID: 977618151}
   m_CullTransparentMesh: 1
   m_CullTransparentMesh: 1
+--- !u!1 &1016814389
+GameObject:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  serializedVersion: 6
+  m_Component:
+  - component: {fileID: 1016814390}
+  - component: {fileID: 1016814393}
+  - component: {fileID: 1016814392}
+  - component: {fileID: 1016814391}
+  m_Layer: 0
+  m_Name: Start Game Canvas
+  m_TagString: Untagged
+  m_Icon: {fileID: 0}
+  m_NavMeshLayer: 0
+  m_StaticEditorFlags: 0
+  m_IsActive: 0
+--- !u!224 &1016814390
+RectTransform:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_GameObject: {fileID: 1016814389}
+  m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
+  m_LocalPosition: {x: 0, y: 0, z: 0}
+  m_LocalScale: {x: 0, y: 0, z: 0}
+  m_ConstrainProportionsScale: 0
+  m_Children:
+  - {fileID: 415346090}
+  m_Father: {fileID: 1751824541}
+  m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
+  m_AnchorMin: {x: 0, y: 0}
+  m_AnchorMax: {x: 0, y: 0}
+  m_AnchoredPosition: {x: 0, y: 0}
+  m_SizeDelta: {x: 0, y: 0}
+  m_Pivot: {x: 0, y: 0}
+--- !u!114 &1016814391
+MonoBehaviour:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_GameObject: {fileID: 1016814389}
+  m_Enabled: 1
+  m_EditorHideFlags: 0
+  m_Script: {fileID: 11500000, guid: dc42784cf147c0c48a680349fa168899, type: 3}
+  m_Name: 
+  m_EditorClassIdentifier: 
+  m_IgnoreReversedGraphics: 1
+  m_BlockingObjects: 0
+  m_BlockingMask:
+    serializedVersion: 2
+    m_Bits: 4294967295
+--- !u!114 &1016814392
+MonoBehaviour:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_GameObject: {fileID: 1016814389}
+  m_Enabled: 1
+  m_EditorHideFlags: 0
+  m_Script: {fileID: 11500000, guid: 0cd44c1031e13a943bb63640046fad76, type: 3}
+  m_Name: 
+  m_EditorClassIdentifier: 
+  m_UiScaleMode: 0
+  m_ReferencePixelsPerUnit: 100
+  m_ScaleFactor: 1
+  m_ReferenceResolution: {x: 800, y: 600}
+  m_ScreenMatchMode: 0
+  m_MatchWidthOrHeight: 0
+  m_PhysicalUnit: 3
+  m_FallbackScreenDPI: 96
+  m_DefaultSpriteDPI: 96
+  m_DynamicPixelsPerUnit: 1
+  m_PresetInfoIsWorld: 0
+--- !u!223 &1016814393
+Canvas:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_GameObject: {fileID: 1016814389}
+  m_Enabled: 1
+  serializedVersion: 3
+  m_RenderMode: 0
+  m_Camera: {fileID: 0}
+  m_PlaneDistance: 100
+  m_PixelPerfect: 0
+  m_ReceivesEvents: 1
+  m_OverrideSorting: 0
+  m_OverridePixelPerfect: 0
+  m_SortingBucketNormalizedSize: 0
+  m_VertexColorAlwaysGammaSpace: 0
+  m_AdditionalShaderChannelsFlag: 0
+  m_UpdateRectTransformForStandalone: 0
+  m_SortingLayerID: 0
+  m_SortingOrder: 0
+  m_TargetDisplay: 0
 --- !u!1001 &1043721802
 --- !u!1001 &1043721802
 PrefabInstance:
 PrefabInstance:
   m_ObjectHideFlags: 0
   m_ObjectHideFlags: 0
@@ -3357,6 +3524,7 @@ MonoBehaviour:
   m_Script: {fileID: 11500000, guid: ca415a1a1528e3847aa1c683d86cb48c, type: 3}
   m_Script: {fileID: 11500000, guid: ca415a1a1528e3847aa1c683d86cb48c, type: 3}
   m_Name: 
   m_Name: 
   m_EditorClassIdentifier: 
   m_EditorClassIdentifier: 
+  cameraTexture: {fileID: 2072118116}
 --- !u!1 &1349309764
 --- !u!1 &1349309764
 GameObject:
 GameObject:
   m_ObjectHideFlags: 0
   m_ObjectHideFlags: 0
@@ -4099,6 +4267,7 @@ Transform:
   - {fileID: 462186837}
   - {fileID: 462186837}
   - {fileID: 1349309768}
   - {fileID: 1349309768}
   - {fileID: 1401908991}
   - {fileID: 1401908991}
+  - {fileID: 1016814390}
   m_Father: {fileID: 0}
   m_Father: {fileID: 0}
   m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
   m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
 --- !u!1 &1863178294 stripped
 --- !u!1 &1863178294 stripped
@@ -4692,6 +4861,78 @@ CanvasRenderer:
   m_PrefabAsset: {fileID: 0}
   m_PrefabAsset: {fileID: 0}
   m_GameObject: {fileID: 1994667331}
   m_GameObject: {fileID: 1994667331}
   m_CullTransparentMesh: 1
   m_CullTransparentMesh: 1
+--- !u!1 &2072118114
+GameObject:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  serializedVersion: 6
+  m_Component:
+  - component: {fileID: 2072118115}
+  - component: {fileID: 2072118117}
+  - component: {fileID: 2072118116}
+  m_Layer: 0
+  m_Name: Camera Content
+  m_TagString: Untagged
+  m_Icon: {fileID: 0}
+  m_NavMeshLayer: 0
+  m_StaticEditorFlags: 0
+  m_IsActive: 0
+--- !u!224 &2072118115
+RectTransform:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_GameObject: {fileID: 2072118114}
+  m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
+  m_LocalPosition: {x: 0, y: 0, z: 0}
+  m_LocalScale: {x: 1.5, y: 1.5, z: 1.5}
+  m_ConstrainProportionsScale: 1
+  m_Children: []
+  m_Father: {fileID: 462186837}
+  m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
+  m_AnchorMin: {x: 0.5, y: 0.5}
+  m_AnchorMax: {x: 0.5, y: 0.5}
+  m_AnchoredPosition: {x: 0, y: 0}
+  m_SizeDelta: {x: 640, y: 480}
+  m_Pivot: {x: 0.5, y: 0.5}
+--- !u!114 &2072118116
+MonoBehaviour:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_GameObject: {fileID: 2072118114}
+  m_Enabled: 1
+  m_EditorHideFlags: 0
+  m_Script: {fileID: 11500000, guid: 1344c3c82d62a2a41a3576d8abb8e3ea, type: 3}
+  m_Name: 
+  m_EditorClassIdentifier: 
+  m_Material: {fileID: 0}
+  m_Color: {r: 1, g: 1, b: 1, a: 1}
+  m_RaycastTarget: 1
+  m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
+  m_Maskable: 1
+  m_OnCullStateChanged:
+    m_PersistentCalls:
+      m_Calls: []
+  m_Texture: {fileID: 0}
+  m_UVRect:
+    serializedVersion: 2
+    x: 0
+    y: 0
+    width: 1
+    height: 1
+--- !u!222 &2072118117
+CanvasRenderer:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_GameObject: {fileID: 2072118114}
+  m_CullTransparentMesh: 1
 --- !u!1 &2083184152
 --- !u!1 &2083184152
 GameObject:
 GameObject:
   m_ObjectHideFlags: 0
   m_ObjectHideFlags: 0

+ 4 - 3
Assets/Scenes/Login/CreateOrAdopt.uxml

@@ -2,10 +2,11 @@
     <Style src="project://database/Assets/UI%20Toolkit/Style/rootStyle.uss?fileID=7433441132597879392&amp;guid=b30eb17a0ca8bf64087af4e59d565fdd&amp;type=3#rootStyle" />
     <Style src="project://database/Assets/UI%20Toolkit/Style/rootStyle.uss?fileID=7433441132597879392&amp;guid=b30eb17a0ca8bf64087af4e59d565fdd&amp;type=3#rootStyle" />
     <Style src="project://database/Assets/Scenes/Login/LoginStyleSheet.uss?fileID=7433441132597879392&amp;guid=15362e7779c14ad4e93118389edfa6bf&amp;type=3#LoginStyleSheet" />
     <Style src="project://database/Assets/Scenes/Login/LoginStyleSheet.uss?fileID=7433441132597879392&amp;guid=15362e7779c14ad4e93118389edfa6bf&amp;type=3#LoginStyleSheet" />
     <engine:VisualElement name="base" style="flex-grow: 1; margin-top: 65px;">
     <engine:VisualElement name="base" style="flex-grow: 1; margin-top: 65px;">
-        <engine:Label text="Label" name="message" parse-escape-sequences="true" style="height: 20%; margin-top: 15px; background-color: rgb(255, 255, 255); border-top-left-radius: 5px; border-top-right-radius: 5px; border-bottom-right-radius: 5px; border-bottom-left-radius: 5px; border-left-color: rgba(24, 24, 24, 0.47); border-right-color: rgba(24, 24, 24, 0.47); border-top-color: rgba(24, 24, 24, 0.47); border-bottom-color: rgba(24, 24, 24, 0.47); border-top-width: 2px; border-right-width: 2px; border-bottom-width: 2px; border-left-width: 2px; -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;); font-size: 14px; white-space: normal; margin-bottom: 8px; margin-left: 6px; margin-right: 6px;" />
+        <engine:Label text="Label" name="message" parse-escape-sequences="true" style="height: 20%; margin-top: 15px; background-color: rgb(255, 255, 255); border-top-left-radius: 5px; border-top-right-radius: 5px; border-bottom-right-radius: 5px; border-bottom-left-radius: 5px; border-left-color: rgba(24, 24, 24, 0.47); border-right-color: rgba(24, 24, 24, 0.47); border-top-color: rgba(24, 24, 24, 0.47); border-bottom-color: rgba(24, 24, 24, 0.47); border-top-width: 2px; border-right-width: 2px; border-bottom-width: 2px; border-left-width: 2px; -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;); font-size: 14px; white-space: normal; margin-bottom: 8px; margin-left: 6px; margin-right: 6px; visibility: visible;" />
         <engine:VisualElement name="VisualElement" style="flex-grow: 1; flex-direction: row; align-items: flex-start; justify-content: space-around; bottom: -60%;">
         <engine:VisualElement name="VisualElement" style="flex-grow: 1; flex-direction: row; align-items: flex-start; justify-content: space-around; bottom: -60%;">
-            <engine:Button text="Create" name="create" class="button" />
-            <engine:Button text="Adopt" name="adopt" class="button" />
+            <engine:Button text="Create" name="create" class="button" style="display: flex;" />
+            <engine:Button text="&lt;Cancel&gt;" name="cancel" class="button" style="display: none;" />
+            <engine:Button text="Adopt" name="adopt" class="button" style="display: flex;" />
         </engine:VisualElement>
         </engine:VisualElement>
     </engine:VisualElement>
     </engine:VisualElement>
 </engine:UXML>
 </engine:UXML>

+ 7 - 0
Assets/Scenes/Login/StartGameUI.uxml

@@ -0,0 +1,7 @@
+<ui:UXML xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ui="UnityEngine.UIElements" xmlns:uie="UnityEditor.UIElements" noNamespaceSchemaLocation="../../../UIElementsSchema/UIElements.xsd" editor-extension-mode="False">
+    <Style src="project://database/Assets/UI%20Toolkit/Style/rootStyle.uss?fileID=7433441132597879392&amp;guid=b30eb17a0ca8bf64087af4e59d565fdd&amp;type=3#rootStyle" />
+    <ui:VisualElement style="flex-grow: 1; flex-direction: column-reverse;">
+        <ui:Label text="&lt;information&gt;" name="InfoLabel" class="message" style="-unity-text-align: upper-right;" />
+        <ui:Button text="&lt;Start Game&gt;" name="StartButton" class="button" style="align-self: center; width: 60%; margin-bottom: 8px; font-size: 20px; color: rgb(255, 255, 255); background-color: rgba(22, 35, 245, 0.78);" />
+    </ui:VisualElement>
+</ui:UXML>

+ 1 - 1
Assets/Resources/Status/StatusUI backup.uxml.meta → Assets/Scenes/Login/StartGameUI.uxml.meta

@@ -1,5 +1,5 @@
 fileFormatVersion: 2
 fileFormatVersion: 2
-guid: f41b5aa8683785a468cb2c967997061f
+guid: dc8e0b51d92174a998939e46353040c0
 ScriptedImporter:
 ScriptedImporter:
   internalIDToNameTable: []
   internalIDToNameTable: []
   externalObjects: {}
   externalObjects: {}

+ 1 - 0
Assets/Scripts/Develop Script/TestSetup.cs

@@ -80,6 +80,7 @@ public class TestSetup : MonoBehaviour
             DateTime now = DateTime.Now;
             DateTime now = DateTime.Now;
             DateTime oneHourAgo = now.AddHours(-1);
             DateTime oneHourAgo = now.AddHours(-1);
             PlayerPrefs.SetString("LoginTokenTime", oneHourAgo.ToString());
             PlayerPrefs.SetString("LoginTokenTime", oneHourAgo.ToString());
+            
             // PlayerPrefs.DeleteAll();
             // PlayerPrefs.DeleteAll();
             // EnviromentSetting.languageCode = "en";
             // EnviromentSetting.languageCode = "en";
         }
         }

+ 1 - 0
Assets/Scripts/GameControllers/UserProperty.cs

@@ -47,6 +47,7 @@ public static class UserProperty
         UserProperty.email = userInfo["email"];
         UserProperty.email = userInfo["email"];
         UserProperty.mobile = userInfo["mobile"];
         UserProperty.mobile = userInfo["mobile"];
         UserProperty.level = userInfo["level"];
         UserProperty.level = userInfo["level"];
+        if (UserProperty.level == "basic") { EnviromentSetting.maxDogQty = 2; }
         if (UserProperty.level == "pro") { EnviromentSetting.maxDogQty = 3; }
         if (UserProperty.level == "pro") { EnviromentSetting.maxDogQty = 3; }
         UserProperty.isRegUser = bool.Parse(userInfo["isRegUser"]);
         UserProperty.isRegUser = bool.Parse(userInfo["isRegUser"]);
     }
     }

+ 3 - 1
Assets/Scripts/Home/HomeController.cs

@@ -85,7 +85,7 @@ public class HomeController : MonoBehaviour
 
 
                 foreach (var dog in dogsInScene)
                 foreach (var dog in dogsInScene)
                 {
                 {
-                    if (dateTime.Hour >= 18 || dateTime.Hour <= 5)      // 深夜模式,狗默认在睡觉状态
+                    if (dateTime.Hour >= 22 || dateTime.Hour <= 5)      // 深夜模式,狗默认在睡觉状态
                     {
                     {
                         dog.Sleep();
                         dog.Sleep();
 
 
@@ -332,6 +332,8 @@ public class HomeController : MonoBehaviour
         questionMarkParticle.transform.SetParent(dog.transform);
         questionMarkParticle.transform.SetParent(dog.transform);
         questionMarkParticle.transform.localPosition = new Vector3(0, 0.4f, 0.4f);
         questionMarkParticle.transform.localPosition = new Vector3(0, 0.4f, 0.4f);
         questionMarkParticle.transform.localRotation = Quaternion.Euler(-90, 0, 0);
         questionMarkParticle.transform.localRotation = Quaternion.Euler(-90, 0, 0);
+        ParticleSystem ps = questionMarkParticle.GetComponent<ParticleSystem>();
+        ps.Stop();
 
 
         // 加载sleep particle
         // 加载sleep particle
         ParticleSystem zzzParticle = Resources.Load<ParticleSystem>("Home/Particle_Z");
         ParticleSystem zzzParticle = Resources.Load<ParticleSystem>("Home/Particle_Z");

+ 143 - 23
Assets/Scripts/Login/CreateOrAdopt.cs

@@ -1,36 +1,52 @@
-using Cinemachine;
+using System.Collections.Generic;
 using UnityEngine;
 using UnityEngine;
+using UnityEngine.UI;
 using UnityEngine.UIElements;
 using UnityEngine.UIElements;
+using ZXing;
+using Button = UnityEngine.UIElements.Button;
 
 
 /* 第一次创建狗的时候选择创建或者是领养
 /* 第一次创建狗的时候选择创建或者是领养
 */
 */
 
 
 public class CreateOrAdopt : MonoBehaviour
 public class CreateOrAdopt : MonoBehaviour
 {
 {
-    private Label message;
-    private Button create, adopt;
-    GameObject canvasPlaceholder, initDogCanvas, CreateAdoptCanvas;
+    private Label messageLabel;
+    private Button createBtn, adoptBtn, cancelBtn;
+    GameObject canvasPlaceholder, initDogCanvas, createAdoptCanvas, cameraContent;
+
+    public RawImage cameraTexture; // 摄像头画面显示区域
+    private WebCamTexture webCamTexture; // 摄像头纹理
+    private BarcodeReader barcodeReader; // 二维码识别器
+    private bool isScanning = false; // 是否正在扫描
+    private float interval = 0.5f; // 扫描间隔
     // Start is called once before the first execution of Update after the MonoBehaviour is created
     // Start is called once before the first execution of Update after the MonoBehaviour is created
     void Start()
     void Start()
     {
     {
         var root = GetComponent<UIDocument>().rootVisualElement;
         var root = GetComponent<UIDocument>().rootVisualElement;
-        message = root.Q<Label>("message");
-        create = root.Q<Button>("create");
-        adopt = root.Q<Button>("adopt");
+        messageLabel = root.Q<Label>("message");
+        createBtn = root.Q<Button>("create");
+        adoptBtn = root.Q<Button>("adopt");
+        cancelBtn = root.Q<Button>("cancel");
 
 
         canvasPlaceholder = GameObject.Find("Canvas Placeholder");
         canvasPlaceholder = GameObject.Find("Canvas Placeholder");
         initDogCanvas = canvasPlaceholder.transform.Find("Init Dog Canvas").gameObject;
         initDogCanvas = canvasPlaceholder.transform.Find("Init Dog Canvas").gameObject;
-        CreateAdoptCanvas = canvasPlaceholder.transform.Find("Create Or Adopt Canvas").gameObject;
+        createAdoptCanvas = canvasPlaceholder.transform.Find("Create Or Adopt Canvas").gameObject;
 
 
-        create.RegisterCallback<ClickEvent>(e => CreateClick(e));
-        adopt.RegisterCallback<ClickEvent>(e => AdoptClick(e));
+        createBtn.RegisterCallback<ClickEvent>(e => CreateClick(e));
+        adoptBtn.RegisterCallback<ClickEvent>(e => AdoptClick(e));
+        cancelBtn.RegisterCallback<ClickEvent>(e => CancelClick(e));
 
 
         string textValue = GameTool.GetValueAtPath(EnviromentSetting.languageData, new string[] { "InitDogUI", "button", "create", EnviromentSetting.languageCode });
         string textValue = GameTool.GetValueAtPath(EnviromentSetting.languageData, new string[] { "InitDogUI", "button", "create", EnviromentSetting.languageCode });
-        create.text = textValue;
+        createBtn.text = textValue;
         textValue = GameTool.GetValueAtPath(EnviromentSetting.languageData, new string[] { "InitDogUI", "button", "adopt", EnviromentSetting.languageCode });
         textValue = GameTool.GetValueAtPath(EnviromentSetting.languageData, new string[] { "InitDogUI", "button", "adopt", EnviromentSetting.languageCode });
-        adopt.text = textValue;
+        adoptBtn.text = textValue;
+        textValue = GameTool.GetValueAtPath(EnviromentSetting.languageData, new string[] { "InitDogUI", "button", "cancel", EnviromentSetting.languageCode });
+        cancelBtn.text = textValue;
         textValue = GameTool.GetValueAtPath(EnviromentSetting.languageData, new string[] { "InitDogUI", "label", "create or adopt msg", EnviromentSetting.languageCode });
         textValue = GameTool.GetValueAtPath(EnviromentSetting.languageData, new string[] { "InitDogUI", "label", "create or adopt msg", EnviromentSetting.languageCode });
-        message.text = textValue;
+        messageLabel.text = textValue;
+
+        cameraContent = createAdoptCanvas.transform.Find("Camera Content").gameObject;
+        cameraContent.SetActive(false);
 
 
         if (UserProperty.dogs.Count > 0)
         if (UserProperty.dogs.Count > 0)
         {
         {
@@ -39,21 +55,31 @@ public class CreateOrAdopt : MonoBehaviour
     }
     }
 
 
     // Update is called once per frame
     // Update is called once per frame
-    //void Update()
-    //{
-        
-    //}
+    void Update()
+    {
+        if (isScanning)
+        {
+            interval -= Time.deltaTime;
+            if (interval <= 0)
+            {
+                interval = 0.5f;
+                ScanQRCode();
+            }
+        }
+    }
 
 
     void SwitchToCreate()
     void SwitchToCreate()
     {
     {
         initDogCanvas.SetActive(true);
         initDogCanvas.SetActive(true);
-        CreateAdoptCanvas.SetActive(false);
+        createAdoptCanvas.SetActive(false);
     }
     }
 
 
-    void SwitchToAdopt()
-    {
-        // todo 扫码从别人那边继承狗
-    }
+    // void SwitchToAdopt()
+    // {
+
+    // }
+
+
 
 
     void CreateClick(ClickEvent e)
     void CreateClick(ClickEvent e)
     {
     {
@@ -62,6 +88,100 @@ public class CreateOrAdopt : MonoBehaviour
 
 
     void AdoptClick(ClickEvent e)
     void AdoptClick(ClickEvent e)
     {
     {
-        SwitchToAdopt();
+        // todo 扫码从别人那边继承狗
+        if (!isScanning)
+        {
+            isScanning = true;
+            InitCamera();
+        }
+    }
+
+    void CancelClick(ClickEvent e)
+    {
+        if (webCamTexture != null)
+        {
+            webCamTexture.Stop();
+        }
+        isScanning = false;
+        var cameraContent = GameObject.Find("Camera Content");
+        cameraContent.SetActive(false);
+        messageLabel.visible = true;
+        // messageLabel.style.display = DisplayStyle.Flex;
+        createBtn.style.display = DisplayStyle.Flex;
+        adoptBtn.style.display = DisplayStyle.Flex;
+        cancelBtn.style.display = DisplayStyle.None;
+    }
+
+    private void InitCamera()
+    {
+        WebCamDevice[] devices = WebCamTexture.devices;
+        if (devices.Length > 0)
+        {
+            webCamTexture = new WebCamTexture(devices[0].name, 640, 480);
+            cameraTexture.texture = webCamTexture;
+            webCamTexture.Play();
+            barcodeReader = new BarcodeReader();
+            
+            cameraContent.SetActive(true);
+            messageLabel.visible = false;
+            // messageLabel.style.display = DisplayStyle.None;
+            createBtn.style.display = DisplayStyle.None;
+            adoptBtn.style.display = DisplayStyle.None;
+            cancelBtn.style.display = DisplayStyle.Flex;    
+        }
+        else
+        {
+            Debug.LogError("No camera found!");
+        }
+    }
+
+    private void ScanQRCode()
+    {
+        if (webCamTexture != null && webCamTexture.didUpdateThisFrame)
+        {
+            Color32[] pixels = webCamTexture.GetPixels32();
+            Result result = barcodeReader.Decode(pixels, webCamTexture.width, webCamTexture.height);
+            if (result != null)
+            {
+                Debug.Log("扫描结果:" + result.Text); // 将扫描结果输出到控制台
+                SubmitQRCodeRequest(result.Text); // 提交二维码请求
+                isScanning = false;
+                webCamTexture.Stop();
+            }
+        }
+    }
+
+    private void OnDestroy()
+    {
+        if (webCamTexture != null)
+        {
+            webCamTexture.Stop();
+        }
+    }
+
+    private void SubmitQRCodeRequest(string qrCode)
+    {
+        string url = "/api/transfer_dog/receive/";
+        Dictionary<string, string> formData = new();
+        WWWForm form = new();
+        form.AddField("user_id", UserProperty.userId);
+        form.AddField("transfer_code", qrCode);
+        StartCoroutine(WebController.PostRequest(url, form, callback: SubmitQRCodeCallback));
+    }
+
+    private void SubmitQRCodeCallback(string response)
+    {
+        Debug.Log("QuickStartCallback: " + response);
+        // 处理返回的结果
+        if (response.Contains("success"))
+        {
+            // 成功处理逻辑
+            Debug.Log("狗狗领养成功!");
+        }
+        else
+        {
+            // 失败处理逻辑
+            Debug.Log("狗狗领养失败!");
+        }
     }
     }
 }
 }

+ 14 - 4
Assets/Scripts/Login/LoginController.cs

@@ -188,18 +188,28 @@ public class LoginController : MonoBehaviour
                 loginCanvas.SetActive(false);
                 loginCanvas.SetActive(false);
                 string msg = GameTool.GetValueAtPath(EnviromentSetting.languageData, new string[] { "game_message", "reg_reminder", EnviromentSetting.languageCode });
                 string msg = GameTool.GetValueAtPath(EnviromentSetting.languageData, new string[] { "game_message", "reg_reminder", EnviromentSetting.languageCode });
                 //MessageBoxController.YorN_Message(msg, ()=> regCanvas.SetActive(true), ()=> SceneManager.LoadScene("Home"));
                 //MessageBoxController.YorN_Message(msg, ()=> regCanvas.SetActive(true), ()=> SceneManager.LoadScene("Home"));
-                MessageBoxController.YorN_Message(msg, () => regCanvas.SetActive(true), () => MaskTransitions.TransitionManager.Instance.LoadLevel("Home"));
+                MessageBoxController.YorN_Message(msg, () => regCanvas.SetActive(true), ()=> MaskTransitions.TransitionManager.Instance.LoadLevel("Home"));
 
 
             }
             }
             else
             else
             {
             {
-                //SceneManager.LoadScene("Home");
-                MaskTransitions.TransitionManager.Instance.LoadLevel("Home");
+                ShowStartGameUI();
+                ;
             }
             }
         }else{
         }else{
             Debug.Log(data["message"]);
             Debug.Log(data["message"]);
         }
         }
-        
+    }
+
+    void ShowStartGameUI(){
+        var uiPlaceholder = GameObject.Find("Canvas Placeholder");
+        if (uiPlaceholder != null)
+        {
+            var startGameUI = uiPlaceholder.transform.Find("Start Game Canvas").gameObject;
+            startGameUI.SetActive(true);
+            var loginCanvas = uiPlaceholder.transform.Find("Login Canvas").gameObject;
+            loginCanvas.SetActive(false);
+        }
     }
     }
 
 
 
 

+ 34 - 0
Assets/Scripts/Login/StartGameUIController.cs

@@ -0,0 +1,34 @@
+using UnityEngine;
+using UnityEngine.UIElements;
+
+/* 本段代码控制Start Game UI
+*/
+
+public class StartGameUIController : MonoBehaviour
+{
+    // Start is called once before the first execution of Update after the MonoBehaviour is created
+    private Label infoLabel;
+    private Button startButton;
+    void Start()
+    {
+        var root = GetComponent<UIDocument>().rootVisualElement;
+        infoLabel = root.Q<Label>("InfoLabel");
+        startButton = root.Q<Button>("StartButton");
+
+        infoLabel.text = UserProperty.name + "-" + EnviromentSetting.version;
+
+        string textValue = GameTool.GetValueAtPath(EnviromentSetting.languageData, new string[] { "canvas", "start_game", "button", "start", EnviromentSetting.languageCode });
+        startButton.text = textValue;
+        startButton.clicked += StartClick;
+    }
+
+    // Update is called once per frame
+    // void Update()
+    // {
+        
+    // }
+
+    void StartClick(){
+        MaskTransitions.TransitionManager.Instance.LoadLevel("Home");
+    }
+}

+ 2 - 0
Assets/Scripts/Login/StartGameUIController.cs.meta

@@ -0,0 +1,2 @@
+fileFormatVersion: 2
+guid: 5955757544b38487baf1875e9adcd650

+ 32 - 0
PuppyClient.sln

@@ -0,0 +1,32 @@
+
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio 15
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Assembly-CSharp", "Assembly-CSharp.csproj", "{3FC04BFF-67C7-F5EC-CA41-E7098D1E5312}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Assembly-CSharp-firstpass", "Assembly-CSharp-firstpass.csproj", "{68486523-2EF9-DEC2-ECC0-8AC238555828}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Assembly-CSharp-Editor", "Assembly-CSharp-Editor.csproj", "{AE5CE618-3280-2D9C-2622-299C92DE0507}"
+EndProject
+Global
+	GlobalSection(SolutionConfigurationPlatforms) = preSolution
+		Debug|Any CPU = Debug|Any CPU
+		Release|Any CPU = Release|Any CPU
+	EndGlobalSection
+	GlobalSection(ProjectConfigurationPlatforms) = postSolution
+		{3FC04BFF-67C7-F5EC-CA41-E7098D1E5312}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{3FC04BFF-67C7-F5EC-CA41-E7098D1E5312}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{3FC04BFF-67C7-F5EC-CA41-E7098D1E5312}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{3FC04BFF-67C7-F5EC-CA41-E7098D1E5312}.Release|Any CPU.Build.0 = Release|Any CPU
+		{68486523-2EF9-DEC2-ECC0-8AC238555828}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{68486523-2EF9-DEC2-ECC0-8AC238555828}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{68486523-2EF9-DEC2-ECC0-8AC238555828}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{68486523-2EF9-DEC2-ECC0-8AC238555828}.Release|Any CPU.Build.0 = Release|Any CPU
+		{AE5CE618-3280-2D9C-2622-299C92DE0507}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{AE5CE618-3280-2D9C-2622-299C92DE0507}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{AE5CE618-3280-2D9C-2622-299C92DE0507}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{AE5CE618-3280-2D9C-2622-299C92DE0507}.Release|Any CPU.Build.0 = Release|Any CPU
+	EndGlobalSection
+	GlobalSection(SolutionProperties) = preSolution
+		HideSolutionNode = FALSE
+	EndGlobalSection
+EndGlobal

+ 1 - 0
ignore.conf

@@ -58,3 +58,4 @@ crashlytics-build.properties
 .DS_Store*
 .DS_Store*
 Thumbs.db
 Thumbs.db
 Desktop.ini
 Desktop.ini
+*.DS_Store

この差分においてかなりの量のファイルが変更されているため、一部のファイルを表示していません