瀏覽代碼

投币部分问题修改,添加枪端口修改。

slambb 6 月之前
父節點
當前提交
d48aa4eaa8

+ 1 - 1
Assets/BowArrow/InfraredCamera/InfraredDemo.cs

@@ -105,7 +105,7 @@ public class InfraredDemo : JCUnityLib.ViewBase
         GUIStyle labelFont = new GUIStyle();
         GUIStyle labelFont = new GUIStyle();
         labelFont.normal.textColor = new Color(1, 0.6f, 0.6f);
         labelFont.normal.textColor = new Color(1, 0.6f, 0.6f);
         labelFont.fontSize = Mathf.CeilToInt(Screen.height * 0.03f);
         labelFont.fontSize = Mathf.CeilToInt(Screen.height * 0.03f);
-        GUI.Label(new Rect(Screen.width / 100, Screen.height / 100, 100, 100), "game-20250224-1422-5-1", labelFont);
+        GUI.Label(new Rect(Screen.width / 100, Screen.height / 100, 100, 100), "game-20250409-1422-5-1", labelFont);
     }
     }
 
 
     void Update()
     void Update()

+ 315 - 0
Assets/BowArrow/Resources/Textures/GameIcon/Prefabs/Views/Home/HomeView.prefab

@@ -3603,6 +3603,44 @@ MonoBehaviour:
           m_StringArgument: "\u5F00\u59CB\u6E38\u620F"
           m_StringArgument: "\u5F00\u59CB\u6E38\u620F"
           m_BoolArgument: 0
           m_BoolArgument: 0
         m_CallState: 2
         m_CallState: 2
+--- !u!1 &2838709938721468623
+GameObject:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  serializedVersion: 6
+  m_Component:
+  - component: {fileID: 6451374795007201806}
+  m_Layer: 5
+  m_Name: ConfigClick
+  m_TagString: Untagged
+  m_Icon: {fileID: 0}
+  m_NavMeshLayer: 0
+  m_StaticEditorFlags: 0
+  m_IsActive: 1
+--- !u!224 &6451374795007201806
+RectTransform:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_GameObject: {fileID: 2838709938721468623}
+  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:
+  - {fileID: 6097949637964590107}
+  - {fileID: 2175833302938035315}
+  m_Father: {fileID: 7022781866214807768}
+  m_RootOrder: 18
+  m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
+  m_AnchorMin: {x: 0, y: 0}
+  m_AnchorMax: {x: 1, y: 1}
+  m_AnchoredPosition: {x: 0, y: 0}
+  m_SizeDelta: {x: 0, y: 0}
+  m_Pivot: {x: 0.5, y: 0.5}
 --- !u!1 &2945131765112293574
 --- !u!1 &2945131765112293574
 GameObject:
 GameObject:
   m_ObjectHideFlags: 0
   m_ObjectHideFlags: 0
@@ -8579,6 +8617,144 @@ MonoBehaviour:
   layoutRebuildObject: {fileID: 0}
   layoutRebuildObject: {fileID: 0}
   textFormatArgs: []
   textFormatArgs: []
   languageFontSizes: []
   languageFontSizes: []
+--- !u!1 &5113664707661342148
+GameObject:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  serializedVersion: 6
+  m_Component:
+  - component: {fileID: 2175833302938035315}
+  - component: {fileID: 1552338132730884414}
+  - component: {fileID: 1363898582289154330}
+  - component: {fileID: 7122808131113355622}
+  m_Layer: 5
+  m_Name: RightImage
+  m_TagString: Untagged
+  m_Icon: {fileID: 0}
+  m_NavMeshLayer: 0
+  m_StaticEditorFlags: 0
+  m_IsActive: 0
+--- !u!224 &2175833302938035315
+RectTransform:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_GameObject: {fileID: 5113664707661342148}
+  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: 6451374795007201806}
+  m_RootOrder: 1
+  m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
+  m_AnchorMin: {x: 1, y: 0}
+  m_AnchorMax: {x: 1, y: 0}
+  m_AnchoredPosition: {x: 0, y: 0}
+  m_SizeDelta: {x: 100, y: 100}
+  m_Pivot: {x: 1, y: 0}
+--- !u!222 &1552338132730884414
+CanvasRenderer:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_GameObject: {fileID: 5113664707661342148}
+  m_CullTransparentMesh: 1
+--- !u!114 &1363898582289154330
+MonoBehaviour:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_GameObject: {fileID: 5113664707661342148}
+  m_Enabled: 1
+  m_EditorHideFlags: 0
+  m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
+  m_Name: 
+  m_EditorClassIdentifier: 
+  m_Material: {fileID: 0}
+  m_Color: {r: 1, g: 1, b: 1, a: 0}
+  m_RaycastTarget: 1
+  m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
+  m_Maskable: 1
+  m_OnCullStateChanged:
+    m_PersistentCalls:
+      m_Calls: []
+  m_Sprite: {fileID: 0}
+  m_Type: 0
+  m_PreserveAspect: 0
+  m_FillCenter: 1
+  m_FillMethod: 4
+  m_FillAmount: 1
+  m_FillClockwise: 1
+  m_FillOrigin: 0
+  m_UseSpriteMesh: 0
+  m_PixelsPerUnitMultiplier: 1
+--- !u!114 &7122808131113355622
+MonoBehaviour:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_GameObject: {fileID: 5113664707661342148}
+  m_Enabled: 1
+  m_EditorHideFlags: 0
+  m_Script: {fileID: 11500000, guid: 5cbe16c92bc05ac48b7b9423b9f33daa, type: 3}
+  m_Name: 
+  m_EditorClassIdentifier: 
+  m_Navigation:
+    m_Mode: 3
+    m_WrapAround: 0
+    m_SelectOnUp: {fileID: 0}
+    m_SelectOnDown: {fileID: 0}
+    m_SelectOnLeft: {fileID: 0}
+    m_SelectOnRight: {fileID: 0}
+  m_Transition: 0
+  m_Colors:
+    m_NormalColor: {r: 1, g: 1, b: 1, a: 1}
+    m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
+    m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1}
+    m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
+    m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608}
+    m_ColorMultiplier: 1
+    m_FadeDuration: 0.1
+  m_SpriteState:
+    m_HighlightedSprite: {fileID: 0}
+    m_PressedSprite: {fileID: 0}
+    m_SelectedSprite: {fileID: 0}
+    m_DisabledSprite: {fileID: 0}
+  m_AnimationTriggers:
+    m_NormalTrigger: Normal
+    m_HighlightedTrigger: Highlighted
+    m_PressedTrigger: Pressed
+    m_SelectedTrigger: Selected
+    m_DisabledTrigger: Disabled
+  m_Interactable: 1
+  m_TargetGraphic: {fileID: 1363898582289154330}
+  m_OnClick:
+    m_PersistentCalls:
+      m_Calls: []
+  requiredTapCount: 3
+  resetTime: 0.5
+  onMultiTap:
+    m_PersistentCalls:
+      m_Calls:
+      - m_Target: {fileID: 4900885815709082620}
+        m_TargetAssemblyTypeName: HomeView_BottomBarView, Assembly-CSharp
+        m_MethodName: GoToSetup
+        m_Mode: 1
+        m_Arguments:
+          m_ObjectArgument: {fileID: 0}
+          m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine
+          m_IntArgument: 0
+          m_FloatArgument: 0
+          m_StringArgument: 
+          m_BoolArgument: 0
+        m_CallState: 2
 --- !u!1 &5225504661672638459
 --- !u!1 &5225504661672638459
 GameObject:
 GameObject:
   m_ObjectHideFlags: 0
   m_ObjectHideFlags: 0
@@ -10633,6 +10809,7 @@ RectTransform:
   - {fileID: 8672759446345348335}
   - {fileID: 8672759446345348335}
   - {fileID: 2100941116812051735}
   - {fileID: 2100941116812051735}
   - {fileID: 6079929133293675045}
   - {fileID: 6079929133293675045}
+  - {fileID: 6451374795007201806}
   m_Father: {fileID: 0}
   m_Father: {fileID: 0}
   m_RootOrder: 0
   m_RootOrder: 0
   m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
   m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
@@ -12849,6 +13026,144 @@ MonoBehaviour:
   OnEndEvent:
   OnEndEvent:
     m_PersistentCalls:
     m_PersistentCalls:
       m_Calls: []
       m_Calls: []
+--- !u!1 &8522986075014604770
+GameObject:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  serializedVersion: 6
+  m_Component:
+  - component: {fileID: 6097949637964590107}
+  - component: {fileID: 7404104459851199818}
+  - component: {fileID: 5152448787747858688}
+  - component: {fileID: 2513363702881194634}
+  m_Layer: 5
+  m_Name: LeftImage
+  m_TagString: Untagged
+  m_Icon: {fileID: 0}
+  m_NavMeshLayer: 0
+  m_StaticEditorFlags: 0
+  m_IsActive: 1
+--- !u!224 &6097949637964590107
+RectTransform:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_GameObject: {fileID: 8522986075014604770}
+  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: 6451374795007201806}
+  m_RootOrder: 0
+  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: 100, y: 100}
+  m_Pivot: {x: 0, y: 0}
+--- !u!222 &7404104459851199818
+CanvasRenderer:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_GameObject: {fileID: 8522986075014604770}
+  m_CullTransparentMesh: 1
+--- !u!114 &5152448787747858688
+MonoBehaviour:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_GameObject: {fileID: 8522986075014604770}
+  m_Enabled: 1
+  m_EditorHideFlags: 0
+  m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
+  m_Name: 
+  m_EditorClassIdentifier: 
+  m_Material: {fileID: 0}
+  m_Color: {r: 1, g: 1, b: 1, a: 0}
+  m_RaycastTarget: 1
+  m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
+  m_Maskable: 1
+  m_OnCullStateChanged:
+    m_PersistentCalls:
+      m_Calls: []
+  m_Sprite: {fileID: 0}
+  m_Type: 0
+  m_PreserveAspect: 0
+  m_FillCenter: 1
+  m_FillMethod: 4
+  m_FillAmount: 1
+  m_FillClockwise: 1
+  m_FillOrigin: 0
+  m_UseSpriteMesh: 0
+  m_PixelsPerUnitMultiplier: 1
+--- !u!114 &2513363702881194634
+MonoBehaviour:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_GameObject: {fileID: 8522986075014604770}
+  m_Enabled: 1
+  m_EditorHideFlags: 0
+  m_Script: {fileID: 11500000, guid: 5cbe16c92bc05ac48b7b9423b9f33daa, type: 3}
+  m_Name: 
+  m_EditorClassIdentifier: 
+  m_Navigation:
+    m_Mode: 3
+    m_WrapAround: 0
+    m_SelectOnUp: {fileID: 0}
+    m_SelectOnDown: {fileID: 0}
+    m_SelectOnLeft: {fileID: 0}
+    m_SelectOnRight: {fileID: 0}
+  m_Transition: 0
+  m_Colors:
+    m_NormalColor: {r: 1, g: 1, b: 1, a: 1}
+    m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
+    m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1}
+    m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
+    m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608}
+    m_ColorMultiplier: 1
+    m_FadeDuration: 0.1
+  m_SpriteState:
+    m_HighlightedSprite: {fileID: 0}
+    m_PressedSprite: {fileID: 0}
+    m_SelectedSprite: {fileID: 0}
+    m_DisabledSprite: {fileID: 0}
+  m_AnimationTriggers:
+    m_NormalTrigger: Normal
+    m_HighlightedTrigger: Highlighted
+    m_PressedTrigger: Pressed
+    m_SelectedTrigger: Selected
+    m_DisabledTrigger: Disabled
+  m_Interactable: 1
+  m_TargetGraphic: {fileID: 5152448787747858688}
+  m_OnClick:
+    m_PersistentCalls:
+      m_Calls: []
+  requiredTapCount: 3
+  resetTime: 0.5
+  onMultiTap:
+    m_PersistentCalls:
+      m_Calls:
+      - m_Target: {fileID: 4900885815709082620}
+        m_TargetAssemblyTypeName: HomeView_BottomBarView, Assembly-CSharp
+        m_MethodName: GoToSetup
+        m_Mode: 1
+        m_Arguments:
+          m_ObjectArgument: {fileID: 0}
+          m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine
+          m_IntArgument: 0
+          m_FloatArgument: 0
+          m_StringArgument: 
+          m_BoolArgument: 0
+        m_CallState: 2
 --- !u!1 &8581036950486033519
 --- !u!1 &8581036950486033519
 GameObject:
 GameObject:
   m_ObjectHideFlags: 0
   m_ObjectHideFlags: 0

+ 11 - 3
Assets/BowArrow/Scripts/ArrowSerialPort.cs

@@ -84,8 +84,12 @@ public class ArrowSerialPort : MonoBehaviour
             CancelInvoke("RequestDeviceIno");
             CancelInvoke("RequestDeviceIno");
             InvokeRepeating("RequestDeviceIno", 0f, 10f);
             InvokeRepeating("RequestDeviceIno", 0f, 10f);
             //LOG($"{PortName} 串口打开成功!");
             //LOG($"{PortName} 串口打开成功!");
-            ////激光默认打开
-            //RequestLightState(true);
+            if (CommonConfig.bOpenTheLaserWithoutQRCode)
+            {
+                //没有二维码直接开启激光
+                //激光默认打开
+                RequestLightState(true);
+            }
         }
         }
         else if (msg.Equals("CLOSED"))//串口断开
         else if (msg.Equals("CLOSED"))//串口断开
         {
         {
@@ -314,7 +318,11 @@ public class ArrowSerialPort : MonoBehaviour
     private void OnMagazinesInfo(byte[] bytes)
     private void OnMagazinesInfo(byte[] bytes)
     {
     {
         Debug.Log($"{PortName} 收到弹夹消息!");
         Debug.Log($"{PortName} 收到弹夹消息!");
-        SerialPortHelper.ins.OnMagazineChange(bytes);
+        List<byte> data = new List<byte>();
+        data.Add(0x5C);//起始码
+        data.Add(bytes[3]);//命令号 0x01 0x00
+
+        SerialPortHelper.ins.OnMagazineChange(data.ToArray());
     }
     }
 
 
     private void OnLightChange(byte[] bytes)// 0xAA 0x83 0x06 0x01 0x84 0x55
     private void OnLightChange(byte[] bytes)// 0xAA 0x83 0x06 0x01 0x84 0x55

+ 10 - 1
Assets/BowArrow/Scripts/Bluetooth/ShootCheck.cs

@@ -351,8 +351,17 @@ public class ShootCheck : MonoBehaviour
         Debug.Log(logTxt);
         Debug.Log(logTxt);
         //收到射箭数据,就回复硬件,否则n毫秒后硬件会认为丢包进行重传
         //收到射箭数据,就回复硬件,否则n毫秒后硬件会认为丢包进行重传
         //try {
         //try {
-           // if (sumCheckRes) BluetoothAim.ins.ReplyInfraredShoot(); //如果数据正确,则回复硬件
+        // if (sumCheckRes) BluetoothAim.ins.ReplyInfraredShoot(); //如果数据正确,则回复硬件
         //} catch (Exception) { }
         //} catch (Exception) { }
+
+        //不在home页面的话,当设置coin为0时候,不返回,不为0并且没有时间,才会返回
+        if (SceneManager.GetActiveScene().name != "Home" && UserSettings.ins.PerRoundCoin != 0 && StandaloneAPI.GetGameTimeCountDown() <= 0) {
+            //如果射击时候不在home 场景,则返回home 主页
+            StandaloneAPI.ForceBackHome();
+            Debug.Log("射击回退主场景!");
+            return;
+        }
+
         //打印到nodejs
         //打印到nodejs
         try {
         try {
             ShootCheck.ins.webSocket.Send(logTxt);
             ShootCheck.ins.webSocket.Send(logTxt);

+ 7 - 1
Assets/BowArrow/Scripts/CommonConfig.cs

@@ -152,7 +152,13 @@ public class CommonConfig
     /// <summary>
     /// <summary>
     /// 是否播放默认视频
     /// 是否播放默认视频
     /// </summary>
     /// </summary>
-    public static bool bPlayDefaultVideo { get; } = false;
+    public static bool bPlayDefaultVideo { get; } = true;
+
+    /// <summary>
+    /// 是否不判断二维码
+    /// 打开无QRCode时候的激光器,有支付盒子需要设置false
+    /// </summary>
+    public static bool bOpenTheLaserWithoutQRCode { get; } = false;
 
 
     #endregion
     #endregion
 
 

+ 3 - 1
Assets/BowArrow/Scripts/SerialPortExample.cs

@@ -537,7 +537,9 @@ public class SerialPortExample : MonoBehaviour
         var homeView = FindObjectOfType<HomeView>();
         var homeView = FindObjectOfType<HomeView>();
         if (homeView != null)
         if (homeView != null)
             homeView.FlushUrlQR();
             homeView.FlushUrlQR();
-        SerialPortHelper.ins.GetPort()?.RequestLightState(true);
+
+        if(!CommonConfig.bOpenTheLaserWithoutQRCode)
+            SerialPortHelper.ins.GetPort()?.RequestLightState(true);
     }
     }
 
 
     void SendMessage(byte[] bytes,int index)
     void SendMessage(byte[] bytes,int index)

+ 2 - 1
Assets/BowArrow/Scripts/SerialPortHelper.cs

@@ -93,7 +93,8 @@ public class SerialPortHelper : MonoBehaviour
     #region 弹匣变更
     #region 弹匣变更
     public void OnMagazineChange(byte[] bytes)//3-弹夹状态(0x00  弹夹弹出  0x01 弹夹插入)
     public void OnMagazineChange(byte[] bytes)//3-弹夹状态(0x00  弹夹弹出  0x01 弹夹插入)
     {
     {
-
+        //00 弹夹分离,01 上弹夹
+        if (ShootCheck.ins) ShootCheck.ins.UpdateTheMagazine(bytes);
     }
     }
     #endregion
     #endregion
 
 

+ 29 - 1
Assets/BowArrow/Scripts/SerialPortTest.cs

@@ -10,6 +10,8 @@ public class SerialPortTest : MonoBehaviour
 {
 {
     public Button SendButton;
     public Button SendButton;
     public Button ArrowButton;
     public Button ArrowButton;
+    public Button MagazinesOnButton;
+    public Button MagazinesOffButton;
     public TMP_InputField InputField;
     public TMP_InputField InputField;
     private ArrowSerialPort targetPort;
     private ArrowSerialPort targetPort;
     public TMP_InputField PortInputField;
     public TMP_InputField PortInputField;
@@ -23,6 +25,9 @@ public class SerialPortTest : MonoBehaviour
         targetPort = GameObject.FindObjectOfType<ArrowSerialPort>();
         targetPort = GameObject.FindObjectOfType<ArrowSerialPort>();
 
 
         ArrowButton.onClick.AddListener(OnShoot);
         ArrowButton.onClick.AddListener(OnShoot);
+
+        MagazinesOnButton.onClick.AddListener(OnMagazinesOn);
+        MagazinesOffButton.onClick.AddListener(OnMagazinesOff);
     }
     }
 
 
     private void OnShoot()
     private void OnShoot()
@@ -37,7 +42,30 @@ public class SerialPortTest : MonoBehaviour
         data.Add(0x55);
         data.Add(0x55);
         targetPort?.TestRead(data.ToArray());
         targetPort?.TestRead(data.ToArray());
     }
     }
-
+    private void OnMagazinesOff()
+    {
+        List<byte> data = new List<byte>();
+        data.Add(0xaa);
+        data.Add(0x84);
+        data.Add(0x06);
+        data.Add(0x00);
+        data.Add(0x24);
+        data.Add(0xbd);
+        data.Add(0x55);
+        targetPort?.TestRead(data.ToArray());
+    }
+    private void OnMagazinesOn()
+    {
+        List<byte> data = new List<byte>();
+        data.Add(0xaa);
+        data.Add(0x84);
+        data.Add(0x06);
+        data.Add(0x01);
+        data.Add(0x24);
+        data.Add(0xbd);
+        data.Add(0x55);
+        targetPort?.TestRead(data.ToArray());
+    }
     private void OnSendPortData()
     private void OnSendPortData()
     {
     {
         SerialPortExampleGroup = FindObjectsOfType<SerialPortExample>();
         SerialPortExampleGroup = FindObjectsOfType<SerialPortExample>();

+ 1 - 1
Assets/BowArrow/Scripts/ShowGameTime.cs

@@ -22,7 +22,7 @@ public class ShowGameTime : MonoBehaviour
         if (Input.GetKeyDown(KeyCode.Alpha7))
         if (Input.GetKeyDown(KeyCode.Alpha7))
         {
         {
             //Ͷ±Ò½Ó¿Ú²âÊÔ
             //Ͷ±Ò½Ó¿Ú²âÊÔ
-            StandaloneAPI.InsertCoint(1);
+            StandaloneAPI.InsertCoint(7);
         }
         }
 
 
         StandaloneAPI.DoGameTimeCountDown();
         StandaloneAPI.DoGameTimeCountDown();

+ 1 - 1
Assets/BowArrow/Scripts/Standalone/GameTimeCounterSA.cs

@@ -36,7 +36,7 @@ public class GameTimeCounterSA : MonoBehaviour
         if (Input.GetKeyDown(KeyCode.Alpha7))
         if (Input.GetKeyDown(KeyCode.Alpha7))
         {
         {
             //投币接口测试
             //投币接口测试
-            StandaloneAPI.InsertCoint(1);
+            StandaloneAPI.InsertCoint(7);
         }
         }
 
 
         StandaloneAPI.DoGameTimeCountDown();
         StandaloneAPI.DoGameTimeCountDown();

+ 51 - 9
Assets/BowArrow/Scripts/Standalone/StandaloneAPI.cs

@@ -13,9 +13,15 @@ public class StandaloneAPI
 
 
     public static Texture2D GetQR()
     public static Texture2D GetQR()
     {
     {
+        if (UserSettings.ins.PerRoundCoin <= 0)
+        {
+            Debug.LogWarning("PerRoundCoin 小于等于 0,不生成二维码。");
+            return null;
+        }
         return ShowQRCode(url, 256, 256);
         return ShowQRCode(url, 256, 256);
     }
     }
 
 
+
     /// <summary>
     /// <summary>
     /// 根据二维码图片信息绘制制定字符串信息的二维码到指定区域
     /// 根据二维码图片信息绘制制定字符串信息的二维码到指定区域
     /// </summary>
     /// </summary>
@@ -143,7 +149,8 @@ public class StandaloneAPI
     {
     {
         if (_TimeCounterInited) return;
         if (_TimeCounterInited) return;
         _TimeCounterInited = true;
         _TimeCounterInited = true;
-        SceneManager.sceneLoaded += (scene, mode) => {
+        SceneManager.sceneLoaded += (scene, mode) =>
+        {
             string sceneName = scene.name;
             string sceneName = scene.name;
             if (IsGameScene(sceneName))
             if (IsGameScene(sceneName))
             {
             {
@@ -167,30 +174,65 @@ public class StandaloneAPI
     /// <summary>
     /// <summary>
     /// 投币加时
     /// 投币加时
     /// </summary>
     /// </summary>
+    //public static void InsertCoinForAddTime1()
+    //{
+    //    //如果符合设置数量。增加时间
+    //    if (CoinCount >= UserSettings.ins.PerRoundCoin)
+    //    {
+    //        //打开激光
+    //        var port = SerialPortHelper.ins.GetPort();
+    //        port?.CancelDelayCloseLight();
+    //        if (!UserSettings.ins.lightState)
+    //            port?.RequestLightState(true, true);
+
+    //        CoinCount -= UserSettings.ins.PerRoundCoin;
+    //        AddGameTimeCountDown(UserSettings.ins.PerRoundSeconds);
+    //        Debug.Log("UserSettings.ins.PerRoundCoin:" + UserSettings.ins.PerRoundCoin);
+    //        Debug.Log("UserSettings.ins.PerRoundSeconds:" + UserSettings.ins.PerRoundSeconds);
+    //    }
+    //}
+    /// <summary>
+    /// 投币循环加时
+    /// </summary>
     public static void InsertCoinForAddTime()
     public static void InsertCoinForAddTime()
     {
     {
-        //如果符合设置数量。增加时间
-        if (CoinCount >= UserSettings.ins.PerRoundCoin)
+        int perRoundCoin = UserSettings.ins.PerRoundCoin;
+        int perRoundSeconds = UserSettings.ins.PerRoundSeconds;
+
+        if (perRoundCoin <= 0)
         {
         {
-            //打开激光
+            Debug.LogWarning("PerRoundCoin 设置小于0,不用投币!");
+            return;
+        }
+
+        // 如果符合设置数量。增加时间
+        if (CoinCount >= perRoundCoin)
+        {
+            // 打开激光
             var port = SerialPortHelper.ins.GetPort();
             var port = SerialPortHelper.ins.GetPort();
             port?.CancelDelayCloseLight();
             port?.CancelDelayCloseLight();
             if (!UserSettings.ins.lightState)
             if (!UserSettings.ins.lightState)
                 port?.RequestLightState(true, true);
                 port?.RequestLightState(true, true);
 
 
-            CoinCount -= UserSettings.ins.PerRoundCoin;
-            AddGameTimeCountDown(UserSettings.ins.PerRoundSeconds);
-            Debug.Log("UserSettings.ins.PerRoundCoin:" + UserSettings.ins.PerRoundCoin);
-            Debug.Log("UserSettings.ins.PerRoundSeconds:" + UserSettings.ins.PerRoundSeconds);
+            while (CoinCount >= perRoundCoin)
+            {
+                CoinCount -= perRoundCoin;
+                AddGameTimeCountDown(perRoundSeconds);
+            }
+
+            Debug.Log("剩余CoinCount:" + CoinCount);
+            Debug.Log("每轮消耗:" + perRoundCoin);
+            Debug.Log("每轮增加时间:" + perRoundSeconds);
         }
         }
     }
     }
 
 
+
     public static void InsertCoint(byte num)
     public static void InsertCoint(byte num)
     {
     {
         Debug.Log("确认投币数量:" + num);
         Debug.Log("确认投币数量:" + num);
         CoinCount += num;
         CoinCount += num;
         StandaloneAPI.InsertCoinForAddTime();
         StandaloneAPI.InsertCoinForAddTime();
-     
+
         //for (int i = 0; i < num; i++)
         //for (int i = 0; i < num; i++)
         //{
         //{
         //    StandaloneAPI.InsertCoinForAddTime();
         //    StandaloneAPI.InsertCoinForAddTime();

+ 36 - 0
Assets/BowArrow/Scripts/View/BScript/DoubleClickButton.cs

@@ -0,0 +1,36 @@
+using UnityEngine;
+using UnityEngine.UI;
+using UnityEngine.Events;
+using UnityEngine.EventSystems;
+
+public class DoubleClickButton : Button
+{
+    private float _lastTapTime;
+    private int _tapCount;
+
+    [Header("点击次数要求")]
+    [SerializeField] private int requiredTapCount = 2;
+
+    [Header("重置时间(秒)")]
+    [SerializeField] private float resetTime = 0.5f;
+
+    [Header("达到点击次数时触发的事件")]
+    [SerializeField] private UnityEvent onMultiTap;
+
+    public override void OnPointerClick(PointerEventData eventData)
+    {
+        if (Time.unscaledTime - _lastTapTime > resetTime)
+        {
+            _tapCount = 0;
+        }
+
+        _lastTapTime = Time.unscaledTime;
+        _tapCount++;
+
+        if (_tapCount == requiredTapCount)
+        {
+            onMultiTap?.Invoke();
+            _tapCount = 0;
+        }
+    }
+}

+ 11 - 0
Assets/BowArrow/Scripts/View/BScript/DoubleClickButton.cs.meta

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

+ 8 - 0
Assets/BowArrow/Scripts/View/BScript/Editor.meta

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

+ 24 - 0
Assets/BowArrow/Scripts/View/BScript/Editor/DoubleClickButtonEditor.cs

@@ -0,0 +1,24 @@
+using UnityEngine;
+using UnityEditor;
+using UnityEditor.UI;
+
+[CustomEditor(typeof(DoubleClickButton))]
+public class DoubleClickButtonEditor : ButtonEditor
+{
+    public override void OnInspectorGUI()
+    {
+        base.OnInspectorGUI(); // 显示 Button 原本的 Inspector UI
+
+        DoubleClickButton button = (DoubleClickButton)target;
+        serializedObject.Update();
+
+        EditorGUILayout.Space();
+        EditorGUILayout.LabelField("多次点击设置", EditorStyles.boldLabel);
+
+        EditorGUILayout.PropertyField(serializedObject.FindProperty("requiredTapCount"), new GUIContent("点击次数"));
+        EditorGUILayout.PropertyField(serializedObject.FindProperty("resetTime"), new GUIContent("重置时间(秒)"));
+        EditorGUILayout.PropertyField(serializedObject.FindProperty("onMultiTap"), new GUIContent("点击次数到达是触发"));
+
+        serializedObject.ApplyModifiedProperties();
+    }
+}

+ 11 - 0
Assets/BowArrow/Scripts/View/BScript/Editor/DoubleClickButtonEditor.cs.meta

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

+ 1 - 1
Assets/Insertcoin/Resources/StandbyVideoManager.prefab

@@ -176,7 +176,7 @@ VideoPlayer:
   m_TargetAudioSources:
   m_TargetAudioSources:
   - {fileID: 0}
   - {fileID: 0}
   m_DirectAudioVolumes:
   m_DirectAudioVolumes:
-  - 1
+  - 0.2
   m_Url: 
   m_Url: 
   m_EnabledAudioTracks: 01
   m_EnabledAudioTracks: 01
   m_DirectAudioMutes: 00
   m_DirectAudioMutes: 00

+ 519 - 1
Assets/Resources/SerialPortTest.prefab

@@ -323,6 +323,263 @@ MonoBehaviour:
   m_hasFontAssetChanged: 0
   m_hasFontAssetChanged: 0
   m_baseMaterial: {fileID: 0}
   m_baseMaterial: {fileID: 0}
   m_maskOffset: {x: 0, y: 0, z: 0, w: 0}
   m_maskOffset: {x: 0, y: 0, z: 0, w: 0}
+--- !u!1 &3120751746358902652
+GameObject:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  serializedVersion: 6
+  m_Component:
+  - component: {fileID: 5364938193203161323}
+  - component: {fileID: 9027712244094070206}
+  - component: {fileID: 7603142566850133898}
+  - component: {fileID: 1995622977234479187}
+  m_Layer: 5
+  m_Name: MagazinesOff
+  m_TagString: Untagged
+  m_Icon: {fileID: 0}
+  m_NavMeshLayer: 0
+  m_StaticEditorFlags: 0
+  m_IsActive: 1
+--- !u!224 &5364938193203161323
+RectTransform:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_GameObject: {fileID: 3120751746358902652}
+  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:
+  - {fileID: 156446376821819008}
+  m_Father: {fileID: 7928921207822231941}
+  m_RootOrder: 5
+  m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
+  m_AnchorMin: {x: 0, y: 0}
+  m_AnchorMax: {x: 0, y: 0}
+  m_AnchoredPosition: {x: 1557.0001, y: -0.0010986328}
+  m_SizeDelta: {x: 160, y: 60.6246}
+  m_Pivot: {x: 0, y: 0}
+--- !u!222 &9027712244094070206
+CanvasRenderer:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_GameObject: {fileID: 3120751746358902652}
+  m_CullTransparentMesh: 1
+--- !u!114 &7603142566850133898
+MonoBehaviour:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_GameObject: {fileID: 3120751746358902652}
+  m_Enabled: 1
+  m_EditorHideFlags: 0
+  m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, 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_Sprite: {fileID: 10905, guid: 0000000000000000f000000000000000, type: 0}
+  m_Type: 1
+  m_PreserveAspect: 0
+  m_FillCenter: 1
+  m_FillMethod: 4
+  m_FillAmount: 1
+  m_FillClockwise: 1
+  m_FillOrigin: 0
+  m_UseSpriteMesh: 0
+  m_PixelsPerUnitMultiplier: 1
+--- !u!114 &1995622977234479187
+MonoBehaviour:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_GameObject: {fileID: 3120751746358902652}
+  m_Enabled: 1
+  m_EditorHideFlags: 0
+  m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3}
+  m_Name: 
+  m_EditorClassIdentifier: 
+  m_Navigation:
+    m_Mode: 3
+    m_WrapAround: 0
+    m_SelectOnUp: {fileID: 0}
+    m_SelectOnDown: {fileID: 0}
+    m_SelectOnLeft: {fileID: 0}
+    m_SelectOnRight: {fileID: 0}
+  m_Transition: 1
+  m_Colors:
+    m_NormalColor: {r: 1, g: 1, b: 1, a: 1}
+    m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
+    m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1}
+    m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
+    m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608}
+    m_ColorMultiplier: 1
+    m_FadeDuration: 0.1
+  m_SpriteState:
+    m_HighlightedSprite: {fileID: 0}
+    m_PressedSprite: {fileID: 0}
+    m_SelectedSprite: {fileID: 0}
+    m_DisabledSprite: {fileID: 0}
+  m_AnimationTriggers:
+    m_NormalTrigger: Normal
+    m_HighlightedTrigger: Highlighted
+    m_PressedTrigger: Pressed
+    m_SelectedTrigger: Selected
+    m_DisabledTrigger: Disabled
+  m_Interactable: 1
+  m_TargetGraphic: {fileID: 7603142566850133898}
+  m_OnClick:
+    m_PersistentCalls:
+      m_Calls: []
+--- !u!1 &3463318169522452641
+GameObject:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  serializedVersion: 6
+  m_Component:
+  - component: {fileID: 156446376821819008}
+  - component: {fileID: 3247645640907099699}
+  - component: {fileID: 3608436879726466685}
+  m_Layer: 5
+  m_Name: Text (TMP)
+  m_TagString: Untagged
+  m_Icon: {fileID: 0}
+  m_NavMeshLayer: 0
+  m_StaticEditorFlags: 0
+  m_IsActive: 1
+--- !u!224 &156446376821819008
+RectTransform:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_GameObject: {fileID: 3463318169522452641}
+  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: 5364938193203161323}
+  m_RootOrder: 0
+  m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
+  m_AnchorMin: {x: 0, y: 0}
+  m_AnchorMax: {x: 1, y: 1}
+  m_AnchoredPosition: {x: 0, y: 0}
+  m_SizeDelta: {x: 0, y: 0}
+  m_Pivot: {x: 0.5, y: 0.5}
+--- !u!222 &3247645640907099699
+CanvasRenderer:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_GameObject: {fileID: 3463318169522452641}
+  m_CullTransparentMesh: 1
+--- !u!114 &3608436879726466685
+MonoBehaviour:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_GameObject: {fileID: 3463318169522452641}
+  m_Enabled: 1
+  m_EditorHideFlags: 0
+  m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, 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_text: MagazinesOff
+  m_isRightToLeft: 0
+  m_fontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
+  m_sharedMaterial: {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
+  m_fontSharedMaterials: []
+  m_fontMaterial: {fileID: 0}
+  m_fontMaterials: []
+  m_fontColor32:
+    serializedVersion: 2
+    rgba: 4281479730
+  m_fontColor: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1}
+  m_enableVertexGradient: 0
+  m_colorMode: 3
+  m_fontColorGradient:
+    topLeft: {r: 1, g: 1, b: 1, a: 1}
+    topRight: {r: 1, g: 1, b: 1, a: 1}
+    bottomLeft: {r: 1, g: 1, b: 1, a: 1}
+    bottomRight: {r: 1, g: 1, b: 1, a: 1}
+  m_fontColorGradientPreset: {fileID: 0}
+  m_spriteAsset: {fileID: 0}
+  m_tintAllSprites: 0
+  m_StyleSheet: {fileID: 0}
+  m_TextStyleHashCode: -1183493901
+  m_overrideHtmlColors: 0
+  m_faceColor:
+    serializedVersion: 2
+    rgba: 4294967295
+  m_fontSize: 24
+  m_fontSizeBase: 24
+  m_fontWeight: 400
+  m_enableAutoSizing: 0
+  m_fontSizeMin: 18
+  m_fontSizeMax: 72
+  m_fontStyle: 0
+  m_HorizontalAlignment: 2
+  m_VerticalAlignment: 512
+  m_textAlignment: 65535
+  m_characterSpacing: 0
+  m_wordSpacing: 0
+  m_lineSpacing: 0
+  m_lineSpacingMax: 0
+  m_paragraphSpacing: 0
+  m_charWidthMaxAdj: 0
+  m_enableWordWrapping: 1
+  m_wordWrappingRatios: 0.4
+  m_overflowMode: 0
+  m_linkedTextComponent: {fileID: 0}
+  parentLinkedComponent: {fileID: 0}
+  m_enableKerning: 1
+  m_enableExtraPadding: 0
+  checkPaddingRequired: 0
+  m_isRichText: 1
+  m_parseCtrlCharacters: 1
+  m_isOrthographic: 1
+  m_isCullingEnabled: 0
+  m_horizontalMapping: 0
+  m_verticalMapping: 0
+  m_uvLineOffset: 0
+  m_geometrySortingOrder: 0
+  m_IsTextObjectScaleStatic: 0
+  m_VertexBufferAutoSizeReduction: 0
+  m_useMaxVisibleDescender: 1
+  m_pageToDisplay: 1
+  m_margin: {x: 0, y: 0, z: 0, w: 0}
+  m_isUsingLegacyAnimationComponent: 0
+  m_isVolumetricText: 0
+  m_hasFontAssetChanged: 0
+  m_baseMaterial: {fileID: 0}
+  m_maskOffset: {x: 0, y: 0, z: 0, w: 0}
 --- !u!1 &3608585292927288092
 --- !u!1 &3608585292927288092
 GameObject:
 GameObject:
   m_ObjectHideFlags: 0
   m_ObjectHideFlags: 0
@@ -479,6 +736,128 @@ MonoBehaviour:
   m_FlexibleWidth: -1
   m_FlexibleWidth: -1
   m_FlexibleHeight: -1
   m_FlexibleHeight: -1
   m_LayoutPriority: 1
   m_LayoutPriority: 1
+--- !u!1 &3652127079341844347
+GameObject:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  serializedVersion: 6
+  m_Component:
+  - component: {fileID: 6398437473306496552}
+  - component: {fileID: 874118388686137931}
+  - component: {fileID: 1660821730539989591}
+  - component: {fileID: 235046964951477161}
+  m_Layer: 5
+  m_Name: MagazinesOn
+  m_TagString: Untagged
+  m_Icon: {fileID: 0}
+  m_NavMeshLayer: 0
+  m_StaticEditorFlags: 0
+  m_IsActive: 1
+--- !u!224 &6398437473306496552
+RectTransform:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_GameObject: {fileID: 3652127079341844347}
+  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:
+  - {fileID: 7435472564220206986}
+  m_Father: {fileID: 7928921207822231941}
+  m_RootOrder: 4
+  m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
+  m_AnchorMin: {x: 0, y: 0}
+  m_AnchorMax: {x: 0, y: 0}
+  m_AnchoredPosition: {x: 1384, y: -0.0010986328}
+  m_SizeDelta: {x: 160, y: 60.6246}
+  m_Pivot: {x: 0, y: 0}
+--- !u!222 &874118388686137931
+CanvasRenderer:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_GameObject: {fileID: 3652127079341844347}
+  m_CullTransparentMesh: 1
+--- !u!114 &1660821730539989591
+MonoBehaviour:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_GameObject: {fileID: 3652127079341844347}
+  m_Enabled: 1
+  m_EditorHideFlags: 0
+  m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, 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_Sprite: {fileID: 10905, guid: 0000000000000000f000000000000000, type: 0}
+  m_Type: 1
+  m_PreserveAspect: 0
+  m_FillCenter: 1
+  m_FillMethod: 4
+  m_FillAmount: 1
+  m_FillClockwise: 1
+  m_FillOrigin: 0
+  m_UseSpriteMesh: 0
+  m_PixelsPerUnitMultiplier: 1
+--- !u!114 &235046964951477161
+MonoBehaviour:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_GameObject: {fileID: 3652127079341844347}
+  m_Enabled: 1
+  m_EditorHideFlags: 0
+  m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3}
+  m_Name: 
+  m_EditorClassIdentifier: 
+  m_Navigation:
+    m_Mode: 3
+    m_WrapAround: 0
+    m_SelectOnUp: {fileID: 0}
+    m_SelectOnDown: {fileID: 0}
+    m_SelectOnLeft: {fileID: 0}
+    m_SelectOnRight: {fileID: 0}
+  m_Transition: 1
+  m_Colors:
+    m_NormalColor: {r: 1, g: 1, b: 1, a: 1}
+    m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
+    m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1}
+    m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
+    m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608}
+    m_ColorMultiplier: 1
+    m_FadeDuration: 0.1
+  m_SpriteState:
+    m_HighlightedSprite: {fileID: 0}
+    m_PressedSprite: {fileID: 0}
+    m_SelectedSprite: {fileID: 0}
+    m_DisabledSprite: {fileID: 0}
+  m_AnimationTriggers:
+    m_NormalTrigger: Normal
+    m_HighlightedTrigger: Highlighted
+    m_PressedTrigger: Pressed
+    m_SelectedTrigger: Selected
+    m_DisabledTrigger: Disabled
+  m_Interactable: 1
+  m_TargetGraphic: {fileID: 1660821730539989591}
+  m_OnClick:
+    m_PersistentCalls:
+      m_Calls: []
 --- !u!1 &3676458267039557492
 --- !u!1 &3676458267039557492
 GameObject:
 GameObject:
   m_ObjectHideFlags: 0
   m_ObjectHideFlags: 0
@@ -516,7 +895,7 @@ RectTransform:
   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}
   m_AnchorMax: {x: 0, y: 0}
   m_AnchorMax: {x: 0, y: 0}
-  m_AnchoredPosition: {x: 1384, y: -0.0010986328}
+  m_AnchoredPosition: {x: 1384, y: 80}
   m_SizeDelta: {x: 160, y: 60.6246}
   m_SizeDelta: {x: 160, y: 60.6246}
   m_Pivot: {x: 0, y: 0}
   m_Pivot: {x: 0, y: 0}
 --- !u!222 &3003600555014420428
 --- !u!222 &3003600555014420428
@@ -928,6 +1307,8 @@ RectTransform:
   - {fileID: 7217073299663235196}
   - {fileID: 7217073299663235196}
   - {fileID: 6904239112059849585}
   - {fileID: 6904239112059849585}
   - {fileID: 6150301050236121180}
   - {fileID: 6150301050236121180}
+  - {fileID: 6398437473306496552}
+  - {fileID: 5364938193203161323}
   m_Father: {fileID: 0}
   m_Father: {fileID: 0}
   m_RootOrder: 0
   m_RootOrder: 0
   m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
   m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
@@ -1012,9 +1393,146 @@ MonoBehaviour:
   m_EditorClassIdentifier: 
   m_EditorClassIdentifier: 
   SendButton: {fileID: 4843553104443839269}
   SendButton: {fileID: 4843553104443839269}
   ArrowButton: {fileID: 2410864553599499772}
   ArrowButton: {fileID: 2410864553599499772}
+  MagazinesOnButton: {fileID: 235046964951477161}
+  MagazinesOffButton: {fileID: 1995622977234479187}
   InputField: {fileID: 6915645915798116970}
   InputField: {fileID: 6915645915798116970}
   PortInputField: {fileID: 4033450757502539702}
   PortInputField: {fileID: 4033450757502539702}
   SerialPortExampleGroup: []
   SerialPortExampleGroup: []
+--- !u!1 &6299387694280078419
+GameObject:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  serializedVersion: 6
+  m_Component:
+  - component: {fileID: 7435472564220206986}
+  - component: {fileID: 8627777526101103162}
+  - component: {fileID: 6006123488694973139}
+  m_Layer: 5
+  m_Name: Text (TMP)
+  m_TagString: Untagged
+  m_Icon: {fileID: 0}
+  m_NavMeshLayer: 0
+  m_StaticEditorFlags: 0
+  m_IsActive: 1
+--- !u!224 &7435472564220206986
+RectTransform:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_GameObject: {fileID: 6299387694280078419}
+  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: 6398437473306496552}
+  m_RootOrder: 0
+  m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
+  m_AnchorMin: {x: 0, y: 0}
+  m_AnchorMax: {x: 1, y: 1}
+  m_AnchoredPosition: {x: 0, y: 0}
+  m_SizeDelta: {x: 0, y: 0}
+  m_Pivot: {x: 0.5, y: 0.5}
+--- !u!222 &8627777526101103162
+CanvasRenderer:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_GameObject: {fileID: 6299387694280078419}
+  m_CullTransparentMesh: 1
+--- !u!114 &6006123488694973139
+MonoBehaviour:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_GameObject: {fileID: 6299387694280078419}
+  m_Enabled: 1
+  m_EditorHideFlags: 0
+  m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, 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_text: MagazinesOn
+  m_isRightToLeft: 0
+  m_fontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
+  m_sharedMaterial: {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
+  m_fontSharedMaterials: []
+  m_fontMaterial: {fileID: 0}
+  m_fontMaterials: []
+  m_fontColor32:
+    serializedVersion: 2
+    rgba: 4281479730
+  m_fontColor: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1}
+  m_enableVertexGradient: 0
+  m_colorMode: 3
+  m_fontColorGradient:
+    topLeft: {r: 1, g: 1, b: 1, a: 1}
+    topRight: {r: 1, g: 1, b: 1, a: 1}
+    bottomLeft: {r: 1, g: 1, b: 1, a: 1}
+    bottomRight: {r: 1, g: 1, b: 1, a: 1}
+  m_fontColorGradientPreset: {fileID: 0}
+  m_spriteAsset: {fileID: 0}
+  m_tintAllSprites: 0
+  m_StyleSheet: {fileID: 0}
+  m_TextStyleHashCode: -1183493901
+  m_overrideHtmlColors: 0
+  m_faceColor:
+    serializedVersion: 2
+    rgba: 4294967295
+  m_fontSize: 24
+  m_fontSizeBase: 24
+  m_fontWeight: 400
+  m_enableAutoSizing: 0
+  m_fontSizeMin: 18
+  m_fontSizeMax: 72
+  m_fontStyle: 0
+  m_HorizontalAlignment: 2
+  m_VerticalAlignment: 512
+  m_textAlignment: 65535
+  m_characterSpacing: 0
+  m_wordSpacing: 0
+  m_lineSpacing: 0
+  m_lineSpacingMax: 0
+  m_paragraphSpacing: 0
+  m_charWidthMaxAdj: 0
+  m_enableWordWrapping: 1
+  m_wordWrappingRatios: 0.4
+  m_overflowMode: 0
+  m_linkedTextComponent: {fileID: 0}
+  parentLinkedComponent: {fileID: 0}
+  m_enableKerning: 1
+  m_enableExtraPadding: 0
+  checkPaddingRequired: 0
+  m_isRichText: 1
+  m_parseCtrlCharacters: 1
+  m_isOrthographic: 1
+  m_isCullingEnabled: 0
+  m_horizontalMapping: 0
+  m_verticalMapping: 0
+  m_uvLineOffset: 0
+  m_geometrySortingOrder: 0
+  m_IsTextObjectScaleStatic: 0
+  m_VertexBufferAutoSizeReduction: 0
+  m_useMaxVisibleDescender: 1
+  m_pageToDisplay: 1
+  m_margin: {x: 0, y: 0, z: 0, w: 0}
+  m_isUsingLegacyAnimationComponent: 0
+  m_isVolumetricText: 0
+  m_hasFontAssetChanged: 0
+  m_baseMaterial: {fileID: 0}
+  m_maskOffset: {x: 0, y: 0, z: 0, w: 0}
 --- !u!1 &7310788629971779615
 --- !u!1 &7310788629971779615
 GameObject:
 GameObject:
   m_ObjectHideFlags: 0
   m_ObjectHideFlags: 0

+ 11 - 5
Assets/SmartBow/Scripts/Views/SettingsViewParts/BoxBackStageManagement.cs

@@ -1,4 +1,4 @@
-using System.Collections;
+using System.Collections;
 using System.Collections.Generic;
 using System.Collections.Generic;
 using UnityEngine;
 using UnityEngine;
 using UnityEngine.Events;
 using UnityEngine.Events;
@@ -10,8 +10,8 @@ public class BoxBackStageManagement : MonoBehaviour
     [SerializeField] Text inputSecondsText;
     [SerializeField] Text inputSecondsText;
     [SerializeField] InputField inputCoin;
     [SerializeField] InputField inputCoin;
     [SerializeField] InputField inputSeconds;
     [SerializeField] InputField inputSeconds;
-    int CoinMaxLimit = 10;// ¸ö
-    int SecondsMaxLimit = 1200;// Ãë
+    int CoinMaxLimit = 10;// 个
+    int SecondsMaxLimit = 1200;// ç§’
     // Start is called before the first frame update
     // Start is called before the first frame update
     void Start()
     void Start()
     {
     {
@@ -38,13 +38,18 @@ public class BoxBackStageManagement : MonoBehaviour
             float v = (float)System.Math.Round(double.Parse(str), 2);
             float v = (float)System.Math.Round(double.Parse(str), 2);
             if (v < 0 || v > CoinMaxLimit)
             if (v < 0 || v > CoinMaxLimit)
             {
             {
-                PopupMgr.ins.ShowTip(TextAutoLanguage2.GetTextByCNKey("ÊäÈëÖµ²»ÔÚ³£¹æ·¶Î§ÄÚ"));
+                PopupMgr.ins.ShowTip(TextAutoLanguage2.GetTextByCNKey("输入值�在常规范围内"));
                 return;
                 return;
             }
             }
             SetCoin(v);
             SetCoin(v);
             //save
             //save
             UserSettings.ins.PerRoundCoin =(int)(v);
             UserSettings.ins.PerRoundCoin =(int)(v);
             UserSettings.ins.Save();
             UserSettings.ins.Save();
+
+            //刷新二维�
+            HomeView.ins?.FlushUrlQR();
+            //刷新一次时间
+            StandaloneAPI.InsertCoinForAddTime();
         };
         };
         inputCoin.onEndEdit.AddListener(onEndEdit_inputSize);
         inputCoin.onEndEdit.AddListener(onEndEdit_inputSize);
     }
     }
@@ -63,13 +68,14 @@ public class BoxBackStageManagement : MonoBehaviour
             float v = (float)System.Math.Round(double.Parse(str), 2);
             float v = (float)System.Math.Round(double.Parse(str), 2);
             if (v < 1 || v > SecondsMaxLimit)
             if (v < 1 || v > SecondsMaxLimit)
             {
             {
-                PopupMgr.ins.ShowTip(TextAutoLanguage2.GetTextByCNKey("ÊäÈëÖµ²»ÔÚ³£¹æ·¶Î§ÄÚ"));
+                PopupMgr.ins.ShowTip(TextAutoLanguage2.GetTextByCNKey("输入值�在常规范围内"));
                 return;
                 return;
             }
             }
             SetSeconds(v);
             SetSeconds(v);
             //save
             //save
             UserSettings.ins.PerRoundSeconds = (int)v;
             UserSettings.ins.PerRoundSeconds = (int)v;
             UserSettings.ins.Save();
             UserSettings.ins.Save();
+
         };
         };
 
 
         inputSeconds.onEndEdit.AddListener(onEndEdit_inputSize);
         inputSeconds.onEndEdit.AddListener(onEndEdit_inputSize);

+ 1 - 1
Packages/manifest.json

@@ -3,7 +3,7 @@
     "com.unity.2d.sprite": "1.0.0",
     "com.unity.2d.sprite": "1.0.0",
     "com.unity.collab-proxy": "2.0.1",
     "com.unity.collab-proxy": "2.0.1",
     "com.unity.ide.rider": "3.0.18",
     "com.unity.ide.rider": "3.0.18",
-    "com.unity.ide.visualstudio": "2.0.17",
+    "com.unity.ide.visualstudio": "2.0.23",
     "com.unity.ide.vscode": "1.2.5",
     "com.unity.ide.vscode": "1.2.5",
     "com.unity.test-framework": "1.1.31",
     "com.unity.test-framework": "1.1.31",
     "com.unity.textmeshpro": "3.0.6",
     "com.unity.textmeshpro": "3.0.6",

+ 1 - 1
Packages/packages-lock.json

@@ -30,7 +30,7 @@
       "url": "https://packages.unity.com"
       "url": "https://packages.unity.com"
     },
     },
     "com.unity.ide.visualstudio": {
     "com.unity.ide.visualstudio": {
-      "version": "2.0.17",
+      "version": "2.0.23",
       "depth": 0,
       "depth": 0,
       "source": "registry",
       "source": "registry",
       "dependencies": {
       "dependencies": {