Kaynağa Gözat

1.修复ui主流程。新算法等

slambb 1 yıl önce
ebeveyn
işleme
4a284b40fe
26 değiştirilmiş dosya ile 208 ekleme ve 81 silme
  1. 2 0
      Assets/BowArrow/Modules/InfraredGuider/InfraredGuider.cs
  2. 23 23
      Assets/BowArrow/Modules/InfraredGuider/InfraredGuider.prefab
  3. 1 1
      Assets/BowArrow/Modules/InfraredGuider/InfraredLightGuider.prefab
  4. 1 1
      Assets/BowArrow/Modules/InfraredGuider/InfraredLightGuider2.prefab
  5. 2 1
      Assets/BowArrow/Modules/InfraredGuider/InfraredResolution.prefab
  6. 3 0
      Assets/BowArrow/Resources/Prefabs/Views/Home/DeviceView.prefab
  7. 16 16
      Assets/BowArrow/Resources/Prefabs/Views/Home/DeviceViewInfrared.prefab
  8. 2 1
      Assets/BowArrow/Resources/Prefabs/Views/Home/SmartGunView.prefab
  9. 7 2
      Assets/BowArrow/Scripts/CommonConfig.cs
  10. 1 1
      Assets/BowArrow/Scripts/Components/TextAutoLanguage2/Resources/TextAutoLanguage2/cn.json
  11. 1 1
      Assets/BowArrow/Scripts/Components/TextAutoLanguage2/Resources/TextAutoLanguage2/en.json
  12. 40 7
      Assets/BowArrow/Scripts/View/Home/DeviceViewInfrared.cs
  13. 27 1
      Assets/BowArrow/Scripts/View/Home/DeviceView_ItemShow.cs
  14. 1 1
      Assets/InfraredProject/InfraredCamera/Scripts/UVCInterface.cs
  15. 4 0
      Assets/InfraredProject/WebCamera/Script/ZIM/ScreenLocate.cs
  16. 1 0
      Assets/SmartBow/Resources/Common/BulletManager_Fruit.prefab
  17. 4 4
      Assets/SmartBow/Resources/Common/TipBulletNumber.prefab
  18. 8 8
      Assets/SmartBow/Resources/SmartBow/Prefabs/Views/Home/ConnectGuidanceView.prefab
  19. 1 1
      Assets/SmartBow/Resources/SmartBow/Prefabs/Views/Home/InfraredView.prefab
  20. 1 0
      Assets/SmartBow/Resources/SmartBow/Prefabs/Views/Home/SettingsView.prefab
  21. 21 5
      Assets/SmartBow/Scripts/Common/BulletManager.cs
  22. 2 0
      Assets/SmartBow/Scripts/Common/TipBulletNumber.cs
  23. 10 1
      Assets/SmartBow/Scripts/Views/GameResultView.cs
  24. 13 1
      Assets/SmartBow/Scripts/Views/SettingsView.cs
  25. 14 3
      Assets/SmartBow/Scripts/Views/SettingsViewParts/BoxLevel.cs
  26. 2 2
      ProjectSettings/ProjectSettings.asset

+ 2 - 0
Assets/BowArrow/Modules/InfraredGuider/InfraredGuider.cs

@@ -124,10 +124,12 @@ public class InfraredGuider : MonoBehaviour
     /// </summary>
     public void OnStep2ShootTest()
     {
+        Debug.Log("OnStep2ShootTest hui 1:" + Step1.activeSelf + " = " + bRemove);
         if (Step1.activeSelf && !bRemove)
         {
             bRemove = true;
             StartCoroutine(delaySet());
+            Debug.Log("OnStep2ShootTest delaySet:" + Step1.activeSelf + " = " + bRemove);
         }
         Step1.SetActive(false);
         Step2.SetActive(true);

+ 23 - 23
Assets/BowArrow/Modules/InfraredGuider/InfraredGuider.prefab

@@ -1158,7 +1158,7 @@ RectTransform:
   m_AnchorMin: {x: 0, y: 1}
   m_AnchorMax: {x: 0, y: 1}
   m_AnchoredPosition: {x: 0, y: 0}
-  m_SizeDelta: {x: 150, y: 150}
+  m_SizeDelta: {x: 160.2233, y: 152.8114}
   m_Pivot: {x: 0, y: 1}
 --- !u!222 &2122011261346094177
 CanvasRenderer:
@@ -1493,7 +1493,7 @@ RectTransform:
   m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
   m_AnchorMin: {x: 0, y: 1}
   m_AnchorMax: {x: 0, y: 1}
-  m_AnchoredPosition: {x: 1266, y: -585}
+  m_AnchoredPosition: {x: 1176, y: -543.41235}
   m_SizeDelta: {x: 686, y: 836.4}
   m_Pivot: {x: 0.5, y: 0.5}
 --- !u!1 &2374074340420753458
@@ -1882,7 +1882,7 @@ RectTransform:
   m_AnchorMin: {x: 1, y: 0}
   m_AnchorMax: {x: 1, y: 0}
   m_AnchoredPosition: {x: 0, y: 0}
-  m_SizeDelta: {x: 150, y: 150}
+  m_SizeDelta: {x: 159.5117, y: 150}
   m_Pivot: {x: 1, y: 0}
 --- !u!222 &1720318678179709952
 CanvasRenderer:
@@ -2165,7 +2165,7 @@ RectTransform:
   m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
   m_AnchorMin: {x: 0, y: 1}
   m_AnchorMax: {x: 0, y: 1}
-  m_AnchoredPosition: {x: 518, y: -585}
+  m_AnchoredPosition: {x: 428, y: -543.41235}
   m_SizeDelta: {x: 686, y: 836.4}
   m_Pivot: {x: 0.5, y: 0.5}
 --- !u!1 &3174348989958766970
@@ -2204,7 +2204,7 @@ RectTransform:
   m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
   m_AnchorMin: {x: 0, y: 1}
   m_AnchorMax: {x: 0, y: 1}
-  m_AnchoredPosition: {x: 2014, y: -585}
+  m_AnchoredPosition: {x: 1924, y: -543.41235}
   m_SizeDelta: {x: 686, y: 836.4}
   m_Pivot: {x: 0.5, y: 0.5}
 --- !u!1 &3316149295125559177
@@ -2342,7 +2342,7 @@ RectTransform:
   m_AnchorMin: {x: 0, y: 0}
   m_AnchorMax: {x: 0, y: 0}
   m_AnchoredPosition: {x: 0, y: 0}
-  m_SizeDelta: {x: 150, y: 150}
+  m_SizeDelta: {x: 157.8061, y: 150}
   m_Pivot: {x: 0, y: 0}
 --- !u!222 &8254577196348101078
 CanvasRenderer:
@@ -2518,7 +2518,7 @@ RectTransform:
   - {fileID: 3015140667646910307}
   - {fileID: 3801162268416401765}
   m_Father: {fileID: 3835120308163295950}
-  m_RootOrder: 0
+  m_RootOrder: 2
   m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
   m_AnchorMin: {x: 0, y: 0}
   m_AnchorMax: {x: 1, y: 1}
@@ -2595,9 +2595,9 @@ RectTransform:
   m_LocalScale: {x: 0, y: 0, z: 0}
   m_ConstrainProportionsScale: 0
   m_Children:
-  - {fileID: 5906477474335540777}
   - {fileID: 2071558874393515744}
   - {fileID: 6127039631511882572}
+  - {fileID: 5906477474335540777}
   m_Father: {fileID: 0}
   m_RootOrder: 0
   m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
@@ -2626,7 +2626,7 @@ Canvas:
   m_VertexColorAlwaysGammaSpace: 0
   m_AdditionalShaderChannelsFlag: 25
   m_SortingLayerID: 0
-  m_SortingOrder: 1
+  m_SortingOrder: 99
   m_TargetDisplay: 0
 --- !u!114 &3835120308163295944
 MonoBehaviour:
@@ -2644,7 +2644,7 @@ MonoBehaviour:
   m_ReferencePixelsPerUnit: 100
   m_ScaleFactor: 1
   m_ReferenceResolution: {x: 2352, y: 1170}
-  m_ScreenMatchMode: 1
+  m_ScreenMatchMode: 0
   m_MatchWidthOrHeight: 0
   m_PhysicalUnit: 3
   m_FallbackScreenDPI: 96
@@ -2942,7 +2942,7 @@ RectTransform:
   m_AnchorMin: {x: 1, y: 1}
   m_AnchorMax: {x: 1, y: 1}
   m_AnchoredPosition: {x: 0, y: 0}
-  m_SizeDelta: {x: 150, y: 150}
+  m_SizeDelta: {x: 156.3896, y: 153.067}
   m_Pivot: {x: 1, y: 1}
 --- !u!222 &7759970380160194938
 CanvasRenderer:
@@ -3241,7 +3241,7 @@ RectTransform:
   m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
   m_AnchorMin: {x: 1, y: 1}
   m_AnchorMax: {x: 1, y: 1}
-  m_AnchoredPosition: {x: -267.40002, y: -111.52}
+  m_AnchoredPosition: {x: -267.4004, y: -111.52002}
   m_SizeDelta: {x: 340, y: 94.599976}
   m_Pivot: {x: 0.5, y: 0.5}
 --- !u!222 &7578251400600954079
@@ -3706,7 +3706,7 @@ RectTransform:
   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_AnchoredPosition: {x: 30, y: 30}
   m_SizeDelta: {x: 600, y: 537.8}
   m_Pivot: {x: 0, y: 0}
 --- !u!222 &6857310724735565920
@@ -3731,7 +3731,7 @@ MonoBehaviour:
   m_EditorClassIdentifier: 
   m_Material: {fileID: 0}
   m_Color: {r: 1, g: 1, b: 1, a: 1}
-  m_RaycastTarget: 1
+  m_RaycastTarget: 0
   m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
   m_Maskable: 1
   m_OnCullStateChanged:
@@ -3785,7 +3785,7 @@ RectTransform:
   - {fileID: 5017439069372811040}
   - {fileID: 8771328988020950145}
   m_Father: {fileID: 3835120308163295950}
-  m_RootOrder: 1
+  m_RootOrder: 0
   m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
   m_AnchorMin: {x: 0, y: 0}
   m_AnchorMax: {x: 1, y: 1}
@@ -3866,7 +3866,7 @@ RectTransform:
   m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
   m_AnchorMin: {x: 1, y: 1}
   m_AnchorMax: {x: 1, y: 1}
-  m_AnchoredPosition: {x: -27.099854, y: -40}
+  m_AnchoredPosition: {x: -27.09961, y: -40}
   m_SizeDelta: {x: 442, y: 100}
   m_Pivot: {x: 1, y: 1}
 --- !u!114 &8074554273402571161
@@ -4459,7 +4459,7 @@ RectTransform:
   - {fileID: 8500492082680452106}
   - {fileID: 1636476797831084910}
   m_Father: {fileID: 3835120308163295950}
-  m_RootOrder: 2
+  m_RootOrder: 1
   m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
   m_AnchorMin: {x: 0, y: 0}
   m_AnchorMax: {x: 1, y: 1}
@@ -4696,7 +4696,7 @@ RectTransform:
   m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
   m_AnchorMin: {x: 1, y: 1}
   m_AnchorMax: {x: 1, y: 1}
-  m_AnchoredPosition: {x: 0, y: 0}
+  m_AnchoredPosition: {x: -30, y: -30}
   m_SizeDelta: {x: 600, y: 537.8}
   m_Pivot: {x: 1, y: 1}
 --- !u!222 &5850573815406504796
@@ -4721,7 +4721,7 @@ MonoBehaviour:
   m_EditorClassIdentifier: 
   m_Material: {fileID: 0}
   m_Color: {r: 1, g: 1, b: 1, a: 1}
-  m_RaycastTarget: 1
+  m_RaycastTarget: 0
   m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
   m_Maskable: 1
   m_OnCullStateChanged:
@@ -5049,7 +5049,7 @@ RectTransform:
   m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
   m_AnchorMin: {x: 0, y: 1}
   m_AnchorMax: {x: 0, y: 1}
-  m_AnchoredPosition: {x: 0, y: 0}
+  m_AnchoredPosition: {x: 30, y: -30}
   m_SizeDelta: {x: 600, y: 537.8}
   m_Pivot: {x: 0, y: 1}
 --- !u!222 &6847988453694243444
@@ -5074,7 +5074,7 @@ MonoBehaviour:
   m_EditorClassIdentifier: 
   m_Material: {fileID: 0}
   m_Color: {r: 1, g: 1, b: 1, a: 1}
-  m_RaycastTarget: 1
+  m_RaycastTarget: 0
   m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
   m_Maskable: 1
   m_OnCullStateChanged:
@@ -5679,7 +5679,7 @@ RectTransform:
   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_AnchoredPosition: {x: -30, y: 30}
   m_SizeDelta: {x: 600, y: 537.8}
   m_Pivot: {x: 1, y: 0}
 --- !u!222 &8836273476887711977
@@ -5704,7 +5704,7 @@ MonoBehaviour:
   m_EditorClassIdentifier: 
   m_Material: {fileID: 0}
   m_Color: {r: 1, g: 1, b: 1, a: 1}
-  m_RaycastTarget: 1
+  m_RaycastTarget: 0
   m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
   m_Maskable: 1
   m_OnCullStateChanged:

+ 1 - 1
Assets/BowArrow/Modules/InfraredGuider/InfraredLightGuider.prefab

@@ -814,7 +814,7 @@ Canvas:
   m_VertexColorAlwaysGammaSpace: 0
   m_AdditionalShaderChannelsFlag: 0
   m_SortingLayerID: 0
-  m_SortingOrder: 1
+  m_SortingOrder: 100
   m_TargetDisplay: 0
 --- !u!114 &3835120308163295944
 MonoBehaviour:

+ 1 - 1
Assets/BowArrow/Modules/InfraredGuider/InfraredLightGuider2.prefab

@@ -901,7 +901,7 @@ Canvas:
   m_VertexColorAlwaysGammaSpace: 0
   m_AdditionalShaderChannelsFlag: 0
   m_SortingLayerID: 0
-  m_SortingOrder: 1
+  m_SortingOrder: 101
   m_TargetDisplay: 0
 --- !u!114 &3835120308163295944
 MonoBehaviour:

+ 2 - 1
Assets/BowArrow/Modules/InfraredGuider/InfraredResolution.prefab

@@ -829,9 +829,10 @@ Canvas:
   m_OverrideSorting: 0
   m_OverridePixelPerfect: 0
   m_SortingBucketNormalizedSize: 0
+  m_VertexColorAlwaysGammaSpace: 0
   m_AdditionalShaderChannelsFlag: 0
   m_SortingLayerID: 0
-  m_SortingOrder: 1
+  m_SortingOrder: 102
   m_TargetDisplay: 0
 --- !u!114 &3835120308163295944
 MonoBehaviour:

+ 3 - 0
Assets/BowArrow/Resources/Prefabs/Views/Home/DeviceView.prefab

@@ -635,6 +635,7 @@ MonoBehaviour:
   - {fileID: 21300000, guid: 325a9596a2f8fef4aadb1bb4d87f10e0, type: 3}
   process: {fileID: 6129637075560161983}
   connected: {fileID: 4403249574185589017}
+  unConnected: {fileID: 0}
   titleText: {fileID: 2987289437974676634}
   statusText: {fileID: 4257527137690726779}
   initStatus: {fileID: 5147671407072463914}
@@ -1452,6 +1453,7 @@ MonoBehaviour:
   - {fileID: 21300000, guid: 325a9596a2f8fef4aadb1bb4d87f10e0, type: 3}
   process: {fileID: 479991670806837720}
   connected: {fileID: 6655771888343105735}
+  unConnected: {fileID: 0}
   titleText: {fileID: 2982113521795620369}
   statusText: {fileID: 6365139638093466434}
   initStatus: {fileID: 3283325883709285787}
@@ -6456,6 +6458,7 @@ Canvas:
   m_OverrideSorting: 0
   m_OverridePixelPerfect: 0
   m_SortingBucketNormalizedSize: 0
+  m_VertexColorAlwaysGammaSpace: 0
   m_AdditionalShaderChannelsFlag: 0
   m_SortingLayerID: 0
   m_SortingOrder: 1

+ 16 - 16
Assets/BowArrow/Resources/Prefabs/Views/Home/DeviceViewInfrared.prefab

@@ -362,7 +362,7 @@ RectTransform:
   m_AnchorMin: {x: 0, y: 1}
   m_AnchorMax: {x: 0, y: 1}
   m_AnchoredPosition: {x: 310, y: -653.5}
-  m_SizeDelta: {x: 570, y: 32}
+  m_SizeDelta: {x: 570, y: 80}
   m_Pivot: {x: 0.5, y: 0.5}
 --- !u!222 &475354049885480237
 CanvasRenderer:
@@ -394,7 +394,7 @@ MonoBehaviour:
       m_Calls: []
   m_FontData:
     m_Font: {fileID: 12800000, guid: 6b6cc7ab59ef00947950b61fdca2d042, type: 3}
-    m_FontSize: 40
+    m_FontSize: 50
     m_FontStyle: 1
     m_BestFit: 0
     m_MinSize: 1
@@ -402,7 +402,7 @@ MonoBehaviour:
     m_Alignment: 4
     m_AlignByGeometry: 0
     m_RichText: 1
-    m_HorizontalOverflow: 0
+    m_HorizontalOverflow: 1
     m_VerticalOverflow: 1
     m_LineSpacing: 1
   m_Text: "\u672A\u8FDE\u63A5"
@@ -886,7 +886,7 @@ RectTransform:
   m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
   m_AnchorMin: {x: 0, y: 1}
   m_AnchorMax: {x: 0, y: 1}
-  m_AnchoredPosition: {x: 251.5, y: -75}
+  m_AnchoredPosition: {x: 251.5, y: -82}
   m_SizeDelta: {x: 478, y: 124}
   m_Pivot: {x: 0.5, y: 0.5}
 --- !u!222 &6624224826832416875
@@ -1619,12 +1619,12 @@ MonoBehaviour:
   m_Padding:
     m_Left: 0
     m_Right: 0
-    m_Top: 0
+    m_Top: 20
     m_Bottom: 0
-  m_ChildAlignment: 4
-  m_Spacing: 0
+  m_ChildAlignment: 1
+  m_Spacing: 20
   m_ChildForceExpandWidth: 1
-  m_ChildForceExpandHeight: 1
+  m_ChildForceExpandHeight: 0
   m_ChildControlWidth: 0
   m_ChildControlHeight: 0
   m_ChildScaleWidth: 0
@@ -2567,7 +2567,7 @@ MonoBehaviour:
     m_HorizontalOverflow: 0
     m_VerticalOverflow: 0
     m_LineSpacing: 1
-  m_Text: "\u667A\u80FD\u624B\u67AA"
+  m_Text: "\u667A\u80FD\u5F13\u7BAD"
 --- !u!1 &3090702339649029404
 GameObject:
   m_ObjectHideFlags: 0
@@ -3454,7 +3454,7 @@ RectTransform:
   m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
   m_AnchorMin: {x: 0, y: 1}
   m_AnchorMax: {x: 0, y: 1}
-  m_AnchoredPosition: {x: 251.5, y: -525}
+  m_AnchoredPosition: {x: 251.5, y: -514}
   m_SizeDelta: {x: 478, y: 124}
   m_Pivot: {x: 0.5, y: 0.5}
 --- !u!222 &6963083598422296838
@@ -4131,7 +4131,7 @@ RectTransform:
   m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
   m_AnchorMin: {x: 0, y: 1}
   m_AnchorMax: {x: 0, y: 1}
-  m_AnchoredPosition: {x: 251.5, y: -375}
+  m_AnchoredPosition: {x: 251.5, y: -370}
   m_SizeDelta: {x: 478, y: 124}
   m_Pivot: {x: 0.5, y: 0.5}
 --- !u!222 &9013912856389766974
@@ -4756,7 +4756,7 @@ RectTransform:
   m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
   m_AnchorMin: {x: 0, y: 1}
   m_AnchorMax: {x: 0, y: 1}
-  m_AnchoredPosition: {x: 251.5, y: -225}
+  m_AnchoredPosition: {x: 251.5, y: -226}
   m_SizeDelta: {x: 478, y: 124}
   m_Pivot: {x: 0.5, y: 0.5}
 --- !u!222 &1197806343873953191
@@ -5924,7 +5924,7 @@ MonoBehaviour:
     m_HorizontalOverflow: 0
     m_VerticalOverflow: 0
     m_LineSpacing: 1
-  m_Text: "\u667A\u80FD\u5F13\u7BAD"
+  m_Text: "\u667A\u80FD\u624B\u67AA"
 --- !u!1 &8311486230390535680
 GameObject:
   m_ObjectHideFlags: 0
@@ -7613,7 +7613,7 @@ RectTransform:
   m_AnchorMin: {x: 0, y: 1}
   m_AnchorMax: {x: 0, y: 1}
   m_AnchoredPosition: {x: 310, y: -653.5}
-  m_SizeDelta: {x: 570, y: 32}
+  m_SizeDelta: {x: 570, y: 80}
   m_Pivot: {x: 0.5, y: 0.5}
 --- !u!222 &5218443512998239074
 CanvasRenderer:
@@ -7645,7 +7645,7 @@ MonoBehaviour:
       m_Calls: []
   m_FontData:
     m_Font: {fileID: 12800000, guid: 6b6cc7ab59ef00947950b61fdca2d042, type: 3}
-    m_FontSize: 40
+    m_FontSize: 50
     m_FontStyle: 1
     m_BestFit: 0
     m_MinSize: 1
@@ -7653,7 +7653,7 @@ MonoBehaviour:
     m_Alignment: 4
     m_AlignByGeometry: 0
     m_RichText: 1
-    m_HorizontalOverflow: 0
+    m_HorizontalOverflow: 1
     m_VerticalOverflow: 1
     m_LineSpacing: 1
   m_Text: "\u672A\u8FDE\u63A5"

+ 2 - 1
Assets/BowArrow/Resources/Prefabs/Views/Home/SmartGunView.prefab

@@ -683,7 +683,7 @@ MonoBehaviour:
     m_HorizontalOverflow: 0
     m_VerticalOverflow: 0
     m_LineSpacing: 1
-  m_Text: Pistol
+  m_Text: Pistol M9
 --- !u!1 &8677266361160975224
 GameObject:
   m_ObjectHideFlags: 0
@@ -1052,6 +1052,7 @@ Canvas:
   m_OverrideSorting: 0
   m_OverridePixelPerfect: 0
   m_SortingBucketNormalizedSize: 0
+  m_VertexColorAlwaysGammaSpace: 0
   m_AdditionalShaderChannelsFlag: 0
   m_SortingLayerID: 0
   m_SortingOrder: 1

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

@@ -6,8 +6,8 @@ using UnityEngine;
 /**通用配置(2021/12/18新增) */
 public class CommonConfig
 {
-    //青凤鸾 WONDERFITTER
-    public static readonly string[] AppNames = { "WONDER FITTER 运动", "WONDER FITTER" };
+    //青凤鸾 WONDERFITTER ,WONDER FITTER Pro ,WONDER FITTER 运动
+    public static readonly string[] AppNames = { "WONDER FITTER Pro", "WONDER FITTER" };
     //App地区(0:国内版;1:海外版;)
     public static int AppArea
     {
@@ -109,4 +109,9 @@ public class CommonConfig
 #else
     public static bool EnableDecryption = false;
 #endif
+
+    /// <summary>
+    /// 是否打包红外软件App,这里主要和九轴有区别
+    /// </summary>
+    public static bool bInfraredApp { get; } = true;
 }

+ 1 - 1
Assets/BowArrow/Scripts/Components/TextAutoLanguage2/Resources/TextAutoLanguage2/cn.json

@@ -513,7 +513,7 @@
   **/
   "Infrared-title": "屏幕定位说明",
   "Infrared-ScreenPositioning": "进入屏幕定位",
-  "Infrared-Step1": "先进行投屏,并将激光定位器放置于电视前方的0.5~2米处,使摄像头上仰朝向屏幕。",
+  "Infrared-Step1": "先进行投屏,并将激光定位器放置于电视前方,使摄像头上仰朝向屏幕。",
   "Infrared-Step2_title": "屏幕定位说明",
   "Infrared-Step2": "调整激光定位器位置和角度,使其可以清晰地拍摄到屏幕的四角。\n\n先点击自动按键进行屏幕识别,屏幕上会出现黑屏和白屏的图像,并通过软件识别屏幕的显示区域。\n\n如自动识别不准确,可以通过调整激光定位器位置或对图像对比度进行调节后,再次自动识别。如多次自动识别不合格,可点击手动功能,并通过手指点击拖动定位区域四个角进行调整。",
 

+ 1 - 1
Assets/BowArrow/Scripts/Components/TextAutoLanguage2/Resources/TextAutoLanguage2/en.json

@@ -562,7 +562,7 @@
   **/
   "Infrared-title": "Screen Positioning Instructions",
   "Infrared-ScreenPositioning": "Enter Screen Positioning",
-  "Infrared-Step1": "First, perform screen mirroring and place the laser locator 0.5 to 2 meters in front of the TV, with the camera tilted upward towards the screen.",
+  "Infrared-Step1": "First, cast the screen and place the laser locator in front of the TV, with the camera facing upwards towards the screen.",
   "Infrared-Step2_title": "Screen Positioning Instructions",
   "Infrared-Step2": "Adjust the position and angle of the laser locator so that it can clearly capture the four corners of the screen.\n\nFirst, click the auto button to perform screen recognition. The screen will display black and white images, and the software will identify the display area of the screen.\n\nIf automatic recognition is inaccurate, you can adjust the position of the laser locator or the image contrast, then try automatic recognition again. If multiple attempts at automatic recognition fail, you can click the manual function and use your finger to click and drag the four corners of the positioning area to adjust.",
 

+ 40 - 7
Assets/BowArrow/Scripts/View/Home/DeviceViewInfrared.cs

@@ -57,7 +57,11 @@ public class DeviceViewInfrared : JCUnityLib.ViewBase, MenuBackInterface
         AimHandler.ins.onCreateAimDeviceInfoById();
 
         //默认选择第一个设备
-        deviceViewItems[0].setPanelStatus(true);
+        deviceViewItems[0].OnSelectEvent();
+        //选择中的自动连接选择的对象
+        if (selectDeviceViewItem.getCurrentItemVisible() && ! selectDeviceViewItem.getBLEConnectState()) {
+            selectDeviceViewItem.OnConnectedEvent();
+        }
 
         //先隐藏一个设备。如果连接之后,再显示2p,如果已经连接到蓝牙,直接显示
         if (deviceViewItems[1].getBLEConnectState())
@@ -124,6 +128,17 @@ public class DeviceViewInfrared : JCUnityLib.ViewBase, MenuBackInterface
                 if (!Connect1Parent.activeSelf) Connect1Parent.SetActive(true);
                 if (Connect2Parent.activeSelf) Connect2Parent.SetActive(false);
             }
+            //2p 按钮 ,两个同时蓝牙连接后。隐藏
+            if (deviceViewItems[0].getBLEConnectState() && deviceViewItems[1].getBLEConnectState())
+            {
+                if(smartConnect2Buttons[3].gameObject.activeSelf)
+                    smartConnect2Buttons[3].gameObject.SetActive(false);
+            }
+            else if(!smartConnect2Buttons[3].gameObject.activeSelf)
+            {
+                smartConnect2Buttons[3].gameObject.SetActive(true);
+            }
+          
         }
     }
 
@@ -131,10 +146,13 @@ public class DeviceViewInfrared : JCUnityLib.ViewBase, MenuBackInterface
 
         if (bShow)
         {
+      
             if (!deviceViewItems[1].gameObject.activeSelf)
             {
                 deviceViewItems[1].gameObject.SetActive(true);
                 horizontalLayoutGroup.spacing = 40;
+                //显示2p时候。默认选择中
+                deviceViewItems[1].OnSelectEvent();
             }
         }
         else
@@ -143,6 +161,8 @@ public class DeviceViewInfrared : JCUnityLib.ViewBase, MenuBackInterface
             {
                 deviceViewItems[1].gameObject.SetActive(false);
                 horizontalLayoutGroup.spacing = 76;
+
+                deviceViewItems[0].OnSelectEvent();
             }
 
         }
@@ -267,21 +287,29 @@ public class DeviceViewInfrared : JCUnityLib.ViewBase, MenuBackInterface
                     //连接设备
                     if (getEnabelPanelStatus())//是否处于选中状态
                     {
+                        if (selectDeviceViewItem)
+                        {
+                            //有信息的情况下直接连接
+                            selectDeviceViewItem.OnConnectedEvent();
+                        }
+                        else {
+                            //取消正在连接的连接
+                            BluetoothAim.ins.onCancelAllConnecting(BluetoothStatusEnum.Connect);
 
-                        //取消正在连接的连接
-                        BluetoothAim.ins.onCancelAllConnecting(BluetoothStatusEnum.Connect);
+                            //进入弓箭选择页面
+                            ViewMgr.Instance.ShowView<SmartArcheryView>();
 
-                        //进入弓箭选择页面
-                        ViewMgr.Instance.ShowView<SmartArcheryView>();
+                            AimHandler.ins.onCreateTempAimDeviceInfo();
 
-                        AimHandler.ins.onCreateTempAimDeviceInfo();
+                        }
+                    
                     }
                     break;
                 case 2:
                     //断开连接设备
                     if (selectDeviceViewItem)
                     {
-                        selectDeviceViewItem.OnConnectedEvent();
+                        selectDeviceViewItem.OnDisConnectedEvent();
                     }
                     break;
                 case 3:
@@ -293,6 +321,11 @@ public class DeviceViewInfrared : JCUnityLib.ViewBase, MenuBackInterface
                     }
                     break;
                 case 4:
+                    //切换设备前先断开蓝牙连接
+                    if (selectDeviceViewItem)
+                    {
+                        selectDeviceViewItem.OnDisConnectedEvent();
+                    }
                     bSwitchDevice = true;
                     break;
 

+ 27 - 1
Assets/BowArrow/Scripts/View/Home/DeviceView_ItemShow.cs

@@ -311,7 +311,7 @@ public class DeviceView_ItemShow : MonoBehaviour
                 break;
 
             case AimDeviceType.Gun:
-                titleText.text = "Pistol";
+                titleText.text = "Pistol M9";
                 bowBg.sprite = gunBgs[0];
                 break;
 
@@ -433,6 +433,32 @@ public class DeviceView_ItemShow : MonoBehaviour
         }
     }
     /// <summary>
+    /// 断开蓝牙连接
+    /// </summary>
+    public void OnDisConnectedEvent()
+    {
+        //要选中情况下,才能进行下一步操作
+        if (!getPanelStatus()) return;
+
+        AimHandler.ins.SetAimDeviceSelectIndex(deviceIndex);
+        AimHandler.ins.onCreateAimDeviceInfoById();
+
+        Debug.Log("OnDisConnectedEvent bluetoothPlayer:" + bluetoothPlayer);
+
+        if (BluetoothAim.ins && BluetoothAim.ins.status == BluetoothStatusEnum.ConnectSuccess)
+        {
+            //断开连接
+            if (bluetoothPlayer == BluetoothPlayer.FIRST_PLAYER)
+            {
+                BluetoothAim.ins.DoConnect();
+            }
+            else
+            {
+                BluetoothAim.ins.DoConnect2P();
+            }
+        }
+    }
+    /// <summary>
     /// 选择事件
     /// </summary>
     public void OnSelectEvent() {

+ 1 - 1
Assets/InfraredProject/InfraredCamera/Scripts/UVCInterface.cs

@@ -336,7 +336,7 @@ namespace SLAMUVC
 
 			if (Permission.HasUserAuthorizedPermission(Permission.Camera))
 			{
-				Debug.LogError("HasUserAuthorizedPermission£¡");
+				//Debug.LogError("HasUserAuthorizedPermission£¡");
 				systemCameraPermissionHandle?.Invoke();
 				return;
 			}

+ 4 - 0
Assets/InfraredProject/WebCamera/Script/ZIM/ScreenLocate.cs

@@ -765,6 +765,10 @@ public partial class ScreenLocate : MonoBehaviour
         if (DebugOnZIMDemo)
             screenIdentification.LocateScreen();
 
+#if  UNITY_EDITOR
+        UVCUpdate(false);
+#endif
+
         //CreateUVCTexture2DIfNeeded();
         // log1 = true;
         // log2 = true;

+ 1 - 0
Assets/SmartBow/Resources/Common/BulletManager_Fruit.prefab

@@ -1179,6 +1179,7 @@ MonoBehaviour:
   emptyBulletSprite: {fileID: 21300000, guid: 434fe1c3dda4d2b4eb8da12815e1622d, type: 3}
   defaultBulletCount: 15
   parent: {fileID: 0}
+  bCenter: 1
 --- !u!1 &4303088161959514138
 GameObject:
   m_ObjectHideFlags: 0

+ 4 - 4
Assets/SmartBow/Resources/Common/TipBulletNumber.prefab

@@ -38,7 +38,7 @@ RectTransform:
   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: 300, y: 100}
+  m_SizeDelta: {x: 348.18, y: 100}
   m_Pivot: {x: 0.5, y: 0.5}
 --- !u!222 &9181745763393146026
 CanvasRenderer:
@@ -70,11 +70,11 @@ MonoBehaviour:
       m_Calls: []
   m_FontData:
     m_Font: {fileID: 12800000, guid: 1ad2cf6c2f09744489d8c60b3fe3bab2, type: 3}
-    m_FontSize: 32
+    m_FontSize: 48
     m_FontStyle: 0
     m_BestFit: 0
-    m_MinSize: 1
-    m_MaxSize: 40
+    m_MinSize: 0
+    m_MaxSize: 48
     m_Alignment: 4
     m_AlignByGeometry: 0
     m_RichText: 1

+ 8 - 8
Assets/SmartBow/Resources/SmartBow/Prefabs/Views/Home/ConnectGuidanceView.prefab

@@ -2290,7 +2290,7 @@ RectTransform:
   m_AnchorMin: {x: 0, y: 0}
   m_AnchorMax: {x: 0, y: 0}
   m_AnchoredPosition: {x: 0, y: 0}
-  m_SizeDelta: {x: 248.1033, y: 50}
+  m_SizeDelta: {x: 250, y: 50}
   m_Pivot: {x: 0.5, y: 0.5}
 --- !u!222 &1254516243193209573
 CanvasRenderer:
@@ -2838,7 +2838,7 @@ MonoBehaviour:
     m_Top: 0
     m_Bottom: 0
   m_ChildAlignment: 4
-  m_Spacing: 0
+  m_Spacing: 5
   m_ChildForceExpandWidth: 0
   m_ChildForceExpandHeight: 0
   m_ChildControlWidth: 0
@@ -2915,16 +2915,16 @@ MonoBehaviour:
   m_FontData:
     m_Font: {fileID: 12800000, guid: 6b6cc7ab59ef00947950b61fdca2d042, type: 3}
     m_FontSize: 32
-    m_FontStyle: 0
+    m_FontStyle: 1
     m_BestFit: 0
-    m_MinSize: 2
-    m_MaxSize: 48
+    m_MinSize: 0
+    m_MaxSize: 55
     m_Alignment: 3
     m_AlignByGeometry: 0
     m_RichText: 1
-    m_HorizontalOverflow: 0
-    m_VerticalOverflow: 0
-    m_LineSpacing: 1
+    m_HorizontalOverflow: 1
+    m_VerticalOverflow: 1
+    m_LineSpacing: 0
   m_Text: 
 --- !u!1 &3514122994558878501
 GameObject:

+ 1 - 1
Assets/SmartBow/Resources/SmartBow/Prefabs/Views/Home/InfraredView.prefab

@@ -1931,7 +1931,7 @@ MonoBehaviour:
     m_HorizontalOverflow: 0
     m_VerticalOverflow: 0
     m_LineSpacing: 1.3
-  m_Text: "\u5148\u8FDB\u884C\u6295\u5C4F\uFF0C\u5E76\u5C06\u6FC0\u5149\u5B9A\u4F4D\u5668\u653E\u7F6E\u4E8E\u7535\u89C6\u524D\u65B9\u76840.5~2\u7C73\u5904\uFF0C\u4F7F\u6444\u50CF\u5934\u4E0A\u4EF0\u671D\u5411\u5C4F\u5E55\u3002"
+  m_Text: "\u5148\u8FDB\u884C\u6295\u5C4F\uFF0C\u5E76\u5C06\u6FC0\u5149\u5B9A\u4F4D\u5668\u653E\u7F6E\u4E8E\u7535\u89C6\u524D\u65B9\uFF0C\u4F7F\u6444\u50CF\u5934\u4E0A\u4EF0\u671D\u5411\u5C4F\u5E55\u3002"
 --- !u!114 &8170560892596963829
 MonoBehaviour:
   m_ObjectHideFlags: 0

+ 1 - 0
Assets/SmartBow/Resources/SmartBow/Prefabs/Views/Home/SettingsView.prefab

@@ -5845,6 +5845,7 @@ Canvas:
   m_OverrideSorting: 0
   m_OverridePixelPerfect: 0
   m_SortingBucketNormalizedSize: 0
+  m_VertexColorAlwaysGammaSpace: 0
   m_AdditionalShaderChannelsFlag: 0
   m_SortingLayerID: 0
   m_SortingOrder: 1

+ 21 - 5
Assets/SmartBow/Scripts/Common/BulletManager.cs

@@ -12,6 +12,10 @@ public class BulletManager : MonoBehaviour
     private int bulletCount;
 
     public GameObject parent ;
+
+    [SerializeField]
+    [Tooltip("生成子弹不足提示的位置是否在是正中心")]
+    bool bCenter = false;
     //射击数
     private int numberOfShotsFired = 0;
     public int getBulletCount { 
@@ -49,7 +53,7 @@ public class BulletManager : MonoBehaviour
 
     public bool bulletZero() {
         if (getBulletCount == 0) {
-            Create(parent.transform);
+            Create(parent.transform,bCenter);
             //暂时自动刷新,接入协议后修改效果
             //ResetBullets();
             return true;
@@ -74,7 +78,7 @@ public class BulletManager : MonoBehaviour
 
 
     static List<GameObject> bulletNumber = new();
-    public static void Create(Transform parentTran)
+    public static void Create(Transform parentTran,bool centerPos)
     {
         //清空对象
         for (int i = bulletNumber.Count - 1; i >= 0; i--)
@@ -90,9 +94,21 @@ public class BulletManager : MonoBehaviour
         RectTransform rectTransform = o.GetComponent<RectTransform>();
 
         // 设置相对于锚点的偏移位置
-        rectTransform.anchoredPosition = new Vector2(0, 120);
-        rectTransform.localRotation = Quaternion.identity;
-        rectTransform.localScale = Vector3.one;
+        if (centerPos)
+        {
+            rectTransform.anchorMin = new Vector2(0.5f, 0.5f);
+            rectTransform.anchorMax = new Vector2(0.5f, 0.5f);
+            //rectTransform.anchoredPosition = new Vector2(0, rectTransform.rect.height / 2);
+            rectTransform.anchoredPosition = new Vector2(0, 0);
+            rectTransform.localRotation = Quaternion.identity;
+            rectTransform.localScale = Vector3.one;
+        }
+        else {
+            rectTransform.anchoredPosition = new Vector2(0, 120);
+            rectTransform.localRotation = Quaternion.identity;
+            rectTransform.localScale = Vector3.one;
+        }
+  
         //o.GetComponentInChildren<Text>().text = number.ToString($"f{CommonConfig.ringsPrecision}");
         bulletNumber.Add(o);
     }

+ 2 - 0
Assets/SmartBow/Scripts/Common/TipBulletNumber.cs

@@ -1,9 +1,11 @@
 using System.Collections;
 using System.Collections.Generic;
 using UnityEngine;
+using UnityEngine.UI;
 
 public class TipBulletNumber : MonoBehaviour
 {
+    [SerializeField] Text outText;
     // Start is called before the first frame update
     IEnumerator Start()
     {

+ 10 - 1
Assets/SmartBow/Scripts/Views/GameResultView.cs

@@ -41,7 +41,16 @@ public class GameResultView : MonoBehaviour
 
 
         this.shootCount.text = shootCount.ToString();
-        this.calories.text = (shootCount * 0.444f).ToString();
+
+        // 0.444/2.22=0.2 ǹ=0.444*0.2 = 0.0888£»
+        if (GlobalData.MyDeviceMode == DeviceMode.Gun)
+        {
+            this.calories.text = (shootCount * 0.0888f).ToString();
+        }
+        else {
+            this.calories.text = (shootCount * 0.444f).ToString();
+        }
+       
     }
 
     public void OnClick_Back()

+ 13 - 1
Assets/SmartBow/Scripts/Views/SettingsView.cs

@@ -15,6 +15,18 @@ namespace SmartBow
         {
             PersistenHandler.ins?.menuBackCtr.views.Add(this);
             //ShowBoxSound(true);
+
+            if (CommonConfig.bInfraredApp) {
+
+                //隐藏弓到屏幕的距离
+                foreach (Transform item in panelLeftContent)
+                {
+                    if (item.name == "BtnScreenDistance") {
+                        item.gameObject.SetActive(false);
+                    }
+                }
+                ShowBoxScreenDistance(false);
+            }
         }
 
         void OnDestroy()
@@ -65,7 +77,7 @@ namespace SmartBow
             ShowBoxSound(itemName == "BtnSound");
             ShowBoxLevel(itemName == "BtnLevel");
             ShowBoxNewUser(itemName == "BtnNewUser");
-            ShowBoxScreenDistance(itemName == "BtnScreenDistance");
+            if (!CommonConfig.bInfraredApp)ShowBoxScreenDistance(itemName == "BtnScreenDistance");
             ShowBoxLanguage(itemName == "BtnLanguage");
             ShowBoxUserAgreement(itemName == "BtnUserAgreement");
             ShowBoxPrivacyPolicy(itemName == "BtnPrivacyPolicy");

+ 14 - 3
Assets/SmartBow/Scripts/Views/SettingsViewParts/BoxLevel.cs

@@ -35,9 +35,20 @@ public class BoxLevel : MonoBehaviour
         //准心
         bool openCrossHair = UserSettings.ins.openCrossHair;
         RenderButtos(openCrossHair ? 0 : 1, boxLevelCrossHairSelects);
-        //固定背景
-        bool bowCameraFixed = UserSettings.ins.bowCameraFixed;
-        RenderButtos(bowCameraFixed ? 0 : 1, boxLevelBowCameraFixed);
+
+        //红外版本
+        if (CommonConfig.bInfraredApp)
+        {
+            //固定背景隐藏
+            boxLevelBowCameraFixed.parent.gameObject.SetActive(false);
+        }
+        else {
+            //固定背景
+            bool bowCameraFixed = UserSettings.ins.bowCameraFixed;
+            RenderButtos(bowCameraFixed ? 0 : 1, boxLevelBowCameraFixed);
+        }
+
+       
         //训练模式
         bool trainMode = UserSettings.ins.trainMode;
         RenderButtos(trainMode ? 0 : 1, boxLevelTrainMode);

+ 2 - 2
ProjectSettings/ProjectSettings.asset

@@ -13,7 +13,7 @@ PlayerSettings:
   useOnDemandResources: 0
   accelerometerFrequency: 60
   companyName: JssF
-  productName: "WONDER FITTER \u8FD0\u52A8"
+  productName: WONDER FITTER Pro
   defaultCursor: {fileID: 0}
   cursorHotspot: {x: 0, y: 0}
   m_SplashScreenBackgroundColor: {r: 0.13725491, g: 0.12156863, b: 0.1254902, a: 1}
@@ -137,7 +137,7 @@ PlayerSettings:
     16:10: 1
     16:9: 1
     Others: 1
-  bundleVersion: 1.3.5
+  bundleVersion: 1.3.6
   preloadedAssets: []
   metroInputSource: 0
   wsaTransparentSwapchain: 0