slambb 11 kuukautta sitten
vanhempi
sitoutus
6f557aa303

Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 92 - 11
Assets/BowArrow/Fonts/HarmonyOS_Sans_SC_Regular SDF.asset


+ 24 - 0
Assets/BowArrow/InfraredCamera/InfraredDemo.cs

@@ -1003,6 +1003,30 @@ public class InfraredDemo : JCUnityLib.ViewBase
          };
     }
 
+    public Vector2[] ConvertPointsToCoordinates(Vector2[] points, Vector2 texSize, Vector2 pivot)
+    {
+        if (points == null || points.Length < 1)
+        {
+            Debug.LogWarning("Invalid point data provided.");
+            return new Vector2[0]; // 返回空数组以避免异常
+        }
+
+        Vector2 offset = new Vector2(-0.5f, -0.5f); // 将坐标从中心对齐到左下角对齐
+
+        List<Vector2> transformedPoints = new List<Vector2>();
+
+        // 遍历所有传入的点进行转换
+        foreach (var point in points)
+        {
+            // 转换每个点,考虑 texSize 和 pivot 偏移
+            Vector2 transformedPoint = 2 * ((point / texSize) + offset + pivot);
+            transformedPoints.Add(transformedPoint);
+        }
+
+        return transformedPoints.ToArray();
+    }
+
+
     void initToggle()
     {
         // 监听 Toggle 值的变化

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

@@ -578,7 +578,7 @@
   "TipAutoEnd": "① 如无法识别出屏幕,需屏蔽环境干扰光源后,点击“自动”按键重新识别\n② 如白框与电视屏幕匹配,点击“确认”按键,跳过定位流程 \n③ 如白框与电视屏幕不匹配,点击“环境测光”按键,继续定位流程",
   "TipLightCtrl": "操作设备对准电视,将光点位于梯形框中电视屏幕,红色十字会在光点上,并随光点移动;如没有,需要找出干扰光源关闭它、调整激光定位器位置或调小亮度和对比度",
 
-  "ScreenPositioningSuccessful-title": "屏幕定位成功,请选择最佳方案",
+  "ScreenPositioningSuccessful-title": "请用手指点击选择最合适的屏幕区域结果。如未发现明显差异,请任选其一。如识别到的屏幕区域不合适,请点击返回重新识别。",
   "FirstResult": "结果一",
   "SecondResult": "结果二",
   "FirstLineTip": "AI智能识别屏幕区域的结果",

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

@@ -450,8 +450,8 @@
   "Connect_BLE_Break": "Break",
   "Connect_BLE_None": "None",
 
-  "Connect_Device_Archery": "Intelligent Archery",
-  "Connect_Device_Gun": "Intelligent Gun",
+  "Connect_Btn_Archery": "Intelligent Archery",
+  "Connect_Btn_Gun": "Intelligent Gun",
 
   "Connect_Btn_Screen": "Screen Positioning",
   "Connect_Btn": "Connect Device",
@@ -600,7 +600,7 @@
   /**
   手动识别部分
   **/
-  "TitleTip1": "Adjust the angle and position of the laser locator,so \nthat the entire TV screen fits completely within the trapezoidal frame.",
+  "TitleTip1": "Adjust the angle and position of the laser locator,so that the \nentire TV screen fits completely within the trapezoidal frame.",
   "TitleTipHasData": "If the white positioning frame matches the TV screen, you can click the 'Confirm' button to skip the positioning process; otherwise, adjust the angle and position of the laser locator so that the entire TV screen fits completely within the trapezoidal frame, then click the 'Auto' button.",
 
   "TitleTip2": "If the automatic recognition is not accurate, you can adjust the laser locator or adjust the \nimage contrast to make the screen edge clearer and then automatically recognize it again; \n If automatic recognition fails multiple times, click the manual function and drag the four \ncorners of the positioning area with your finger to adjust. Click OK to proceed to the next step. ",
@@ -628,7 +628,7 @@
   "TipAutoEnd": "① If the screen cannot be recognized, block the environmental light interference and click the 'Auto' button to re-recognize.\n② If the white frame matches the TV screen, click the 'Confirm' button to skip the positioning process.\n③ If the white frame does not match the TV screen, click the 'Environment Light Measurement' button to continue the positioning process.",
   "TipLightCtrl": "Position the device facing the TV, placing the light point within the trapezoidal frame on the TV screen. A red cross will appear at the light point and move with it. If not, identify and turn off the interfering light source, adjust the position of the laser locator, or reduce the brightness and contrast.",
 
-  "ScreenPositioningSuccessful-title": "Screen positioning successful, please choose the best solution",
+  "ScreenPositioningSuccessful-title": "Please tap with your finger to select the most suitable screen region result. If no obvious difference is found, choose any one. If the identified screen region is not suitable, click 'Back' to re-recognize.",
   "FirstResult": "First Result",
   "SecondResult": "Second Result",
   "FirstLineTip": "AI intelligently recognizes the results of screen regions",
@@ -639,7 +639,7 @@
    红外连接后游戏射击页面
   **/
   "TopTip_CrossHair": "Click the <sprite=0> button on the module to enter the center adjustment \n interface. Please click twice (with an interval of one second)",
-  "TopTip_CrossHairPro": "Click the button on the device. This toggles the crosshair adjustment interface on/off.\nPlease click twice (with an interval of one second).",
+  "TopTip_CrossHairPro": "Click the button on the device. This toggles the crosshair adjustment interface on/off.Please click twice (with an interval of one second).",
   "TopTip_CrossHairGunPro": "Remove the magazine module and click the button on it. This is the on/off button to enter the alignment adjustment interface. Please click twice (with an interval of one second)",
   "TopTip_ARTEMISPro": "Double-click the button on the device for reticle calibration. Then, use \nthe normal bow-drawing posture, aim the bow at the bullseye, and after {0} seconds, \nthe reticle will move to the bullseye, completing the calibration.",
   "TopTip_GunPro": "Remove the magazine module, double-click the button on it for reticle calibration. \nAfter quickly reattaching the magazine, use a three-point alignment shooting posture \nto aim at the bullseye. After {0} seconds, the reticle will move to the bullseye, completing the calibration.",

+ 239 - 260
Assets/SmartBow/Resources/SmartBow/Prefabs/Views/Home/InfraredScreenPositioningView.prefab

@@ -1488,8 +1488,8 @@ MonoBehaviour:
   m_Name: 
   m_EditorClassIdentifier: 
   m_Material: {fileID: 0}
-  m_Color: {r: 1, g: 0.009995077, b: 0, a: 1}
-  m_RaycastTarget: 1
+  m_Color: {r: 1, g: 1, b: 1, a: 1}
+  m_RaycastTarget: 0
   m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
   m_Maskable: 1
   m_OnCullStateChanged:
@@ -1689,11 +1689,11 @@ RectTransform:
   m_Father: {fileID: 2385600522496170982}
   m_RootOrder: 3
   m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
-  m_AnchorMin: {x: 1, y: 1}
-  m_AnchorMax: {x: 1, y: 1}
-  m_AnchoredPosition: {x: -68, y: -32}
+  m_AnchorMin: {x: 0.5, y: 0}
+  m_AnchorMax: {x: 0.5, y: 0}
+  m_AnchoredPosition: {x: 0, y: 200}
   m_SizeDelta: {x: 442, y: 100}
-  m_Pivot: {x: 1, y: 1}
+  m_Pivot: {x: 0.5, y: 1}
 --- !u!114 &3124998863955411776
 MonoBehaviour:
   m_ObjectHideFlags: 0
@@ -2200,7 +2200,7 @@ RectTransform:
   m_AnchorMin: {x: 0, y: 0.5}
   m_AnchorMax: {x: 0, y: 0.5}
   m_AnchoredPosition: {x: 100, y: 0}
-  m_SizeDelta: {x: 1797.501, y: 133}
+  m_SizeDelta: {x: 2343.0645, y: 133}
   m_Pivot: {x: 0, y: 0.5}
 --- !u!222 &8697683691752256665
 CanvasRenderer:
@@ -2240,10 +2240,10 @@ MonoBehaviour:
     m_Alignment: 3
     m_AlignByGeometry: 0
     m_RichText: 1
-    m_HorizontalOverflow: 1
+    m_HorizontalOverflow: 0
     m_VerticalOverflow: 1
     m_LineSpacing: 1.2
-  m_Text: "\u5C4F\u5E55\u5B9A\u4F4D\u6210\u529F\uFF0C\u8BF7\u9009\u62E9\u6700\u4F73\u65B9\u6848"
+  m_Text: "\u8BF7\u7528\u624B\u6307\u70B9\u51FB\u9009\u62E9\u6700\u5408\u9002\u7684\u5C4F\u5E55\u533A\u57DF\u7ED3\u679C\u3002\u5982\u672A\u53D1\u73B0\u660E\u663E\u5DEE\u5F02\uFF0C\u8BF7\u4EFB\u9009\u5176\u4E00\u3002\u5982\u8BC6\u522B\u5230\u7684\u5C4F\u5E55\u533A\u57DF\u4E0D\u5408\u9002\uFF0C\u8BF7\u70B9\u51FB\u8FD4\u56DE\u91CD\u65B0\u8BC6\u522B\u3002"
 --- !u!114 &5730498274663324036
 MonoBehaviour:
   m_ObjectHideFlags: 0
@@ -2258,7 +2258,10 @@ MonoBehaviour:
   m_EditorClassIdentifier: 
   textKey: ScreenPositioningSuccessful-title
   layoutRebuildObject: {fileID: 0}
-  languageFontSizes: []
+  languageFontSizes:
+  - language: 1
+    fontSize: 46
+    lineSpacing: 1.2
 --- !u!1 &1037425790819216157
 GameObject:
   m_ObjectHideFlags: 0
@@ -2461,6 +2464,7 @@ MonoBehaviour:
   maskLine: {fileID: 1015518310952224377}
   rawImage: {fileID: 4109810863229036433}
   crosshair: {fileID: 6013103678145184470}
+  crosshairRed: {fileID: 3292008087757723083}
   CurrentUILineGenerator: {fileID: 4635057478650351572}
   LayoutStart: {fileID: 3734790662980072308}
   StartTextTip1: {fileID: 7930777421911948444}
@@ -3934,8 +3938,8 @@ MonoBehaviour:
   m_Name: 
   m_EditorClassIdentifier: 
   m_Material: {fileID: 0}
-  m_Color: {r: 1, g: 0.009995077, b: 0, a: 1}
-  m_RaycastTarget: 1
+  m_Color: {r: 1, g: 1, b: 1, a: 1}
+  m_RaycastTarget: 0
   m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
   m_Maskable: 1
   m_OnCullStateChanged:
@@ -3982,9 +3986,9 @@ RectTransform:
   m_Children:
   - {fileID: 3668741397195680664}
   - {fileID: 6657211966884884387}
-  - {fileID: 6299879027972027070}
   - {fileID: 864528977367079723}
   - {fileID: 2103593680085800770}
+  - {fileID: 6299879027972027070}
   m_Father: {fileID: 518485857765021418}
   m_RootOrder: 8
   m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
@@ -4055,6 +4059,7 @@ MonoBehaviour:
   - {fileID: 3519767604281011237}
   - {fileID: 8494574047779997680}
   infraredScreenPositioningView: {fileID: 1598515592738749058}
+  line: {fileID: 7943264099810457511}
 --- !u!114 &7589735276093640272
 MonoBehaviour:
   m_ObjectHideFlags: 0
@@ -4502,7 +4507,7 @@ MonoBehaviour:
     m_BestFit: 0
     m_MinSize: 0
     m_MaxSize: 53
-    m_Alignment: 1
+    m_Alignment: 0
     m_AlignByGeometry: 0
     m_RichText: 1
     m_HorizontalOverflow: 0
@@ -4952,6 +4957,7 @@ MonoBehaviour:
   IsDashed: 0
   DashLength: 10
   GapLength: 5
+  DrawTwoPointsAtATime: 0
   _points: []
 --- !u!1 &2238504720722144021
 GameObject:
@@ -5424,6 +5430,75 @@ MonoBehaviour:
     m_VerticalOverflow: 1
     m_LineSpacing: 1
   m_Text: -------------------------------------------------
+--- !u!1 &2732233044648473471
+GameObject:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  serializedVersion: 6
+  m_Component:
+  - component: {fileID: 8144355702645921395}
+  - component: {fileID: 1657690362895783374}
+  - component: {fileID: 7943264099810457511}
+  m_Layer: 5
+  m_Name: Line
+  m_TagString: Untagged
+  m_Icon: {fileID: 0}
+  m_NavMeshLayer: 0
+  m_StaticEditorFlags: 0
+  m_IsActive: 1
+--- !u!224 &8144355702645921395
+RectTransform:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_GameObject: {fileID: 2732233044648473471}
+  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: 1
+  m_Children: []
+  m_Father: {fileID: 6299879027972027070}
+  m_RootOrder: 1
+  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 &1657690362895783374
+CanvasRenderer:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_GameObject: {fileID: 2732233044648473471}
+  m_CullTransparentMesh: 1
+--- !u!114 &7943264099810457511
+MonoBehaviour:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_GameObject: {fileID: 2732233044648473471}
+  m_Enabled: 1
+  m_EditorHideFlags: 0
+  m_Script: {fileID: 11500000, guid: 3bd83e7684ce1a542bbd5e6d3120fe62, type: 3}
+  m_Name: 
+  m_EditorClassIdentifier: 
+  m_Material: {fileID: 10306, guid: 0000000000000000f000000000000000, type: 0}
+  m_Color: {r: 1, g: 0, b: 0, a: 0.8235294}
+  m_RaycastTarget: 0
+  m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
+  LineThickness: 8
+  Loop: 1
+  IsDashed: 0
+  DashLength: 10
+  GapLength: 5
+  DrawTwoPointsAtATime: 1
+  _points: []
 --- !u!1 &2757443893517646438
 GameObject:
   m_ObjectHideFlags: 0
@@ -5764,11 +5839,9 @@ RectTransform:
   m_ConstrainProportionsScale: 0
   m_Children:
   - {fileID: 7732219374262333976}
-  - {fileID: 6192055273816928713}
-  - {fileID: 5327943849064717414}
-  - {fileID: 3027797837802485398}
+  - {fileID: 8144355702645921395}
   m_Father: {fileID: 4106188122891562425}
-  m_RootOrder: 2
+  m_RootOrder: 4
   m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
   m_AnchorMin: {x: 0, y: 0}
   m_AnchorMax: {x: 1, y: 1}
@@ -6073,79 +6146,6 @@ MonoBehaviour:
           m_StringArgument: 
           m_BoolArgument: 0
         m_CallState: 2
---- !u!1 &3030625872955718579
-GameObject:
-  m_ObjectHideFlags: 0
-  m_CorrespondingSourceObject: {fileID: 0}
-  m_PrefabInstance: {fileID: 0}
-  m_PrefabAsset: {fileID: 0}
-  serializedVersion: 6
-  m_Component:
-  - component: {fileID: 3027797837802485398}
-  - component: {fileID: 3471068691266366592}
-  - component: {fileID: 22543785660337390}
-  m_Layer: 5
-  m_Name: Point (3)
-  m_TagString: Untagged
-  m_Icon: {fileID: 0}
-  m_NavMeshLayer: 0
-  m_StaticEditorFlags: 0
-  m_IsActive: 0
---- !u!224 &3027797837802485398
-RectTransform:
-  m_ObjectHideFlags: 0
-  m_CorrespondingSourceObject: {fileID: 0}
-  m_PrefabInstance: {fileID: 0}
-  m_PrefabAsset: {fileID: 0}
-  m_GameObject: {fileID: 3030625872955718579}
-  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: 6299879027972027070}
-  m_RootOrder: 3
-  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: 50, y: 50}
-  m_Pivot: {x: 0.5, y: 0.5}
---- !u!222 &3471068691266366592
-CanvasRenderer:
-  m_ObjectHideFlags: 0
-  m_CorrespondingSourceObject: {fileID: 0}
-  m_PrefabInstance: {fileID: 0}
-  m_PrefabAsset: {fileID: 0}
-  m_GameObject: {fileID: 3030625872955718579}
-  m_CullTransparentMesh: 1
---- !u!114 &22543785660337390
-MonoBehaviour:
-  m_ObjectHideFlags: 0
-  m_CorrespondingSourceObject: {fileID: 0}
-  m_PrefabInstance: {fileID: 0}
-  m_PrefabAsset: {fileID: 0}
-  m_GameObject: {fileID: 3030625872955718579}
-  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: 0.009995077, b: 0, 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: 10912, guid: 0000000000000000f000000000000000, type: 0}
-  m_UVRect:
-    serializedVersion: 2
-    x: 0
-    y: 0
-    width: 1
-    height: 1
 --- !u!1 &3077528412754254169
 GameObject:
   m_ObjectHideFlags: 0
@@ -6212,7 +6212,7 @@ MonoBehaviour:
   m_OnCullStateChanged:
     m_PersistentCalls:
       m_Calls: []
-  m_Sprite: {fileID: 21300000, guid: f5a6caaab1f93ed45b7f58f27c61efe6, type: 3}
+  m_Sprite: {fileID: 21300000, guid: e49f5f7319cc1c14aa7b815786b5f70a, type: 3}
   m_Type: 0
   m_PreserveAspect: 0
   m_FillCenter: 1
@@ -6848,6 +6848,18 @@ MonoBehaviour:
   m_OnClick:
     m_PersistentCalls:
       m_Calls:
+      - m_Target: {fileID: 3538024524113724305}
+        m_TargetAssemblyTypeName: PointMarker, Assembly-CSharp
+        m_MethodName: UndoAllPoints
+        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
       - m_Target: {fileID: 1598515592738749058}
         m_TargetAssemblyTypeName: InfraredScreenPositioningView, Assembly-CSharp
         m_MethodName: OnClick_EnterMarker
@@ -6956,6 +6968,43 @@ MonoBehaviour:
   textKey: Contrast
   layoutRebuildObject: {fileID: 0}
   languageFontSizes: []
+--- !u!1 &3465547412657623470
+GameObject:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  serializedVersion: 6
+  m_Component:
+  - component: {fileID: 2014542356491717365}
+  m_Layer: 5
+  m_Name: CrossHairs
+  m_TagString: Untagged
+  m_Icon: {fileID: 0}
+  m_NavMeshLayer: 0
+  m_StaticEditorFlags: 0
+  m_IsActive: 1
+--- !u!224 &2014542356491717365
+RectTransform:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_GameObject: {fileID: 3465547412657623470}
+  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: 3292008087757723083}
+  m_Father: {fileID: 518485857765021418}
+  m_RootOrder: 1
+  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 &3514580845959136848
 GameObject:
   m_ObjectHideFlags: 0
@@ -7092,6 +7141,7 @@ MonoBehaviour:
   IsDashed: 0
   DashLength: 10
   GapLength: 5
+  DrawTwoPointsAtATime: 0
   _points: []
 --- !u!1 &3614563988931576643
 GameObject:
@@ -7719,7 +7769,7 @@ RectTransform:
   - {fileID: 2112691052271887221}
   - {fileID: 7825334985663743218}
   m_Father: {fileID: 518485857765021418}
-  m_RootOrder: 2
+  m_RootOrder: 3
   m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
   m_AnchorMin: {x: 0, y: 0}
   m_AnchorMax: {x: 1, y: 1}
@@ -7748,7 +7798,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:
@@ -8384,7 +8434,7 @@ MonoBehaviour:
   m_Name: 
   m_EditorClassIdentifier: 
   m_Material: {fileID: 0}
-  m_Color: {r: 0.8980392, g: 0.09019608, b: 0.4, a: 1}
+  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
@@ -8556,7 +8606,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}
   loop: 1
   thickness: 5
@@ -9339,79 +9389,6 @@ MonoBehaviour:
   maskColor: {r: 0.4117647, g: 0.4117647, b: 0.4117647, a: 1}
   bDrawQuad: 1
   bDrawMask: 0
---- !u!1 &5212972635161511204
-GameObject:
-  m_ObjectHideFlags: 0
-  m_CorrespondingSourceObject: {fileID: 0}
-  m_PrefabInstance: {fileID: 0}
-  m_PrefabAsset: {fileID: 0}
-  serializedVersion: 6
-  m_Component:
-  - component: {fileID: 5327943849064717414}
-  - component: {fileID: 3710084380712707640}
-  - component: {fileID: 1432892729512632238}
-  m_Layer: 5
-  m_Name: Point (2)
-  m_TagString: Untagged
-  m_Icon: {fileID: 0}
-  m_NavMeshLayer: 0
-  m_StaticEditorFlags: 0
-  m_IsActive: 0
---- !u!224 &5327943849064717414
-RectTransform:
-  m_ObjectHideFlags: 0
-  m_CorrespondingSourceObject: {fileID: 0}
-  m_PrefabInstance: {fileID: 0}
-  m_PrefabAsset: {fileID: 0}
-  m_GameObject: {fileID: 5212972635161511204}
-  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: 6299879027972027070}
-  m_RootOrder: 2
-  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: 50, y: 50}
-  m_Pivot: {x: 0.5, y: 0.5}
---- !u!222 &3710084380712707640
-CanvasRenderer:
-  m_ObjectHideFlags: 0
-  m_CorrespondingSourceObject: {fileID: 0}
-  m_PrefabInstance: {fileID: 0}
-  m_PrefabAsset: {fileID: 0}
-  m_GameObject: {fileID: 5212972635161511204}
-  m_CullTransparentMesh: 1
---- !u!114 &1432892729512632238
-MonoBehaviour:
-  m_ObjectHideFlags: 0
-  m_CorrespondingSourceObject: {fileID: 0}
-  m_PrefabInstance: {fileID: 0}
-  m_PrefabAsset: {fileID: 0}
-  m_GameObject: {fileID: 5212972635161511204}
-  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: 0.009995077, b: 0, 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: 10912, guid: 0000000000000000f000000000000000, type: 0}
-  m_UVRect:
-    serializedVersion: 2
-    x: 0
-    y: 0
-    width: 1
-    height: 1
 --- !u!1 &5236471070643478924
 GameObject:
   m_ObjectHideFlags: 0
@@ -9988,7 +9965,7 @@ RectTransform:
   - {fileID: 1091291821683212642}
   - {fileID: 7870703120936269460}
   m_Father: {fileID: 4106188122891562425}
-  m_RootOrder: 3
+  m_RootOrder: 2
   m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
   m_AnchorMin: {x: 0.5, y: 1}
   m_AnchorMax: {x: 0.5, y: 1}
@@ -10126,6 +10103,7 @@ MonoBehaviour:
   IsDashed: 0
   DashLength: 10
   GapLength: 5
+  DrawTwoPointsAtATime: 0
   _points: []
 --- !u!1 &5659708181636975764
 GameObject:
@@ -10269,79 +10247,6 @@ MonoBehaviour:
   m_FillOrigin: 0
   m_UseSpriteMesh: 0
   m_PixelsPerUnitMultiplier: 1
---- !u!1 &5802824411843148002
-GameObject:
-  m_ObjectHideFlags: 0
-  m_CorrespondingSourceObject: {fileID: 0}
-  m_PrefabInstance: {fileID: 0}
-  m_PrefabAsset: {fileID: 0}
-  serializedVersion: 6
-  m_Component:
-  - component: {fileID: 6192055273816928713}
-  - component: {fileID: 2245095403288470128}
-  - component: {fileID: 7988039750266956991}
-  m_Layer: 5
-  m_Name: Point (1)
-  m_TagString: Untagged
-  m_Icon: {fileID: 0}
-  m_NavMeshLayer: 0
-  m_StaticEditorFlags: 0
-  m_IsActive: 0
---- !u!224 &6192055273816928713
-RectTransform:
-  m_ObjectHideFlags: 0
-  m_CorrespondingSourceObject: {fileID: 0}
-  m_PrefabInstance: {fileID: 0}
-  m_PrefabAsset: {fileID: 0}
-  m_GameObject: {fileID: 5802824411843148002}
-  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: 6299879027972027070}
-  m_RootOrder: 1
-  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: 50, y: 50}
-  m_Pivot: {x: 0.5, y: 0.5}
---- !u!222 &2245095403288470128
-CanvasRenderer:
-  m_ObjectHideFlags: 0
-  m_CorrespondingSourceObject: {fileID: 0}
-  m_PrefabInstance: {fileID: 0}
-  m_PrefabAsset: {fileID: 0}
-  m_GameObject: {fileID: 5802824411843148002}
-  m_CullTransparentMesh: 1
---- !u!114 &7988039750266956991
-MonoBehaviour:
-  m_ObjectHideFlags: 0
-  m_CorrespondingSourceObject: {fileID: 0}
-  m_PrefabInstance: {fileID: 0}
-  m_PrefabAsset: {fileID: 0}
-  m_GameObject: {fileID: 5802824411843148002}
-  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: 0.009995077, b: 0, 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: 10912, guid: 0000000000000000f000000000000000, type: 0}
-  m_UVRect:
-    serializedVersion: 2
-    x: 0
-    y: 0
-    width: 1
-    height: 1
 --- !u!1 &5870798443516389723
 GameObject:
   m_ObjectHideFlags: 0
@@ -10615,7 +10520,7 @@ MonoBehaviour:
   m_OnCullStateChanged:
     m_PersistentCalls:
       m_Calls: []
-  m_Sprite: {fileID: 21300000, guid: f5a6caaab1f93ed45b7f58f27c61efe6, type: 3}
+  m_Sprite: {fileID: 21300000, guid: e49f5f7319cc1c14aa7b815786b5f70a, type: 3}
   m_Type: 0
   m_PreserveAspect: 0
   m_FillCenter: 1
@@ -10753,10 +10658,10 @@ RectTransform:
   m_ConstrainProportionsScale: 0
   m_Children:
   - {fileID: 5352980848473047839}
+  - {fileID: 2014542356491717365}
   - {fileID: 6970137624786410075}
   - {fileID: 7412197821328202880}
   - {fileID: 8041490324888586467}
-  - {fileID: 7371505907208373617}
   - {fileID: 6253229490191300730}
   - {fileID: 4423893524894772476}
   - {fileID: 2385600522496170982}
@@ -10764,6 +10669,7 @@ RectTransform:
   - {fileID: 9009683153855149380}
   - {fileID: 1721352479526113342}
   - {fileID: 2216801819544239570}
+  - {fileID: 7371505907208373617}
   m_Father: {fileID: 1063506209527944585}
   m_RootOrder: 0
   m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
@@ -11745,7 +11651,7 @@ GameObject:
   m_Icon: {fileID: 0}
   m_NavMeshLayer: 0
   m_StaticEditorFlags: 0
-  m_IsActive: 1
+  m_IsActive: 0
 --- !u!224 &8816989788969488603
 RectTransform:
   m_ObjectHideFlags: 0
@@ -12220,7 +12126,7 @@ RectTransform:
   m_ConstrainProportionsScale: 0
   m_Children: []
   m_Father: {fileID: 518485857765021418}
-  m_RootOrder: 1
+  m_RootOrder: 2
   m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
   m_AnchorMin: {x: 0, y: 0}
   m_AnchorMax: {x: 1, y: 1}
@@ -13060,7 +12966,7 @@ RectTransform:
   - {fileID: 325617635803051465}
   - {fileID: 303936853469835747}
   m_Father: {fileID: 4106188122891562425}
-  m_RootOrder: 4
+  m_RootOrder: 3
   m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
   m_AnchorMin: {x: 0.5, y: 0}
   m_AnchorMax: {x: 0.5, y: 0}
@@ -13209,7 +13115,7 @@ GameObject:
   m_Icon: {fileID: 0}
   m_NavMeshLayer: 0
   m_StaticEditorFlags: 0
-  m_IsActive: 0
+  m_IsActive: 1
 --- !u!224 &7371505907208373617
 RectTransform:
   m_ObjectHideFlags: 0
@@ -13230,7 +13136,7 @@ RectTransform:
   - {fileID: 4944701656153808412}
   - {fileID: 2371513326884009388}
   m_Father: {fileID: 518485857765021418}
-  m_RootOrder: 4
+  m_RootOrder: 12
   m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
   m_AnchorMin: {x: 0, y: 0}
   m_AnchorMax: {x: 1, y: 1}
@@ -13259,7 +13165,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:
@@ -13526,7 +13432,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: 50, y: 50}
+  m_SizeDelta: {x: 40, y: 40}
   m_Pivot: {x: 0.5, y: 0.5}
 --- !u!222 &1435437348035064446
 CanvasRenderer:
@@ -13550,7 +13456,7 @@ MonoBehaviour:
   m_EditorClassIdentifier: 
   m_Material: {fileID: 0}
   m_Color: {r: 1, g: 0.009995077, b: 0, a: 1}
-  m_RaycastTarget: 1
+  m_RaycastTarget: 0
   m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
   m_Maskable: 1
   m_OnCullStateChanged:
@@ -13622,8 +13528,8 @@ MonoBehaviour:
   m_Name: 
   m_EditorClassIdentifier: 
   m_Material: {fileID: 0}
-  m_Color: {r: 1, g: 0.009995077, b: 0, a: 1}
-  m_RaycastTarget: 1
+  m_Color: {r: 1, g: 1, b: 1, a: 1}
+  m_RaycastTarget: 0
   m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
   m_Maskable: 1
   m_OnCullStateChanged:
@@ -13964,7 +13870,7 @@ MonoBehaviour:
   m_Name: 
   m_EditorClassIdentifier: 
   m_Material: {fileID: 0}
-  m_Color: {r: 1, g: 1, b: 1, a: 1}
+  m_Color: {r: 0.14509805, g: 0.7490196, b: 0.7490196, a: 1}
   m_RaycastTarget: 1
   m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
   m_Maskable: 1
@@ -14253,8 +14159,8 @@ MonoBehaviour:
   m_Name: 
   m_EditorClassIdentifier: 
   m_Material: {fileID: 0}
-  m_Color: {r: 1, g: 0.009995077, b: 0, a: 1}
-  m_RaycastTarget: 1
+  m_Color: {r: 1, g: 1, b: 1, a: 1}
+  m_RaycastTarget: 0
   m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
   m_Maskable: 1
   m_OnCullStateChanged:
@@ -14394,7 +14300,7 @@ RectTransform:
   m_ConstrainProportionsScale: 0
   m_Children: []
   m_Father: {fileID: 518485857765021418}
-  m_RootOrder: 3
+  m_RootOrder: 4
   m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
   m_AnchorMin: {x: 0, y: 0}
   m_AnchorMax: {x: 1, y: 1}
@@ -14833,6 +14739,79 @@ MonoBehaviour:
     m_VerticalOverflow: 1
     m_LineSpacing: 1
   m_Text: "\u8BB0\u5F55\u7EA2\u5916\u70B9(1)"
+--- !u!1 &8577671788716427877
+GameObject:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  serializedVersion: 6
+  m_Component:
+  - component: {fileID: 3292008087757723083}
+  - component: {fileID: 6572514422546656298}
+  - component: {fileID: 4361585214507323826}
+  m_Layer: 5
+  m_Name: Red
+  m_TagString: Untagged
+  m_Icon: {fileID: 0}
+  m_NavMeshLayer: 0
+  m_StaticEditorFlags: 0
+  m_IsActive: 0
+--- !u!224 &3292008087757723083
+RectTransform:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_GameObject: {fileID: 8577671788716427877}
+  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: 2014542356491717365}
+  m_RootOrder: 0
+  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: 150, y: 150}
+  m_Pivot: {x: 0.5, y: 0.5}
+--- !u!222 &6572514422546656298
+CanvasRenderer:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_GameObject: {fileID: 8577671788716427877}
+  m_CullTransparentMesh: 1
+--- !u!114 &4361585214507323826
+MonoBehaviour:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_GameObject: {fileID: 8577671788716427877}
+  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: 0, b: 0, 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: 2800000, guid: 24d1e577dc42aaf4ba6e64be26be3845, type: 3}
+  m_UVRect:
+    serializedVersion: 2
+    x: 0
+    y: 0
+    width: 1
+    height: 1
 --- !u!1 &8588798271265893767
 GameObject:
   m_ObjectHideFlags: 0
@@ -14926,7 +14905,7 @@ MonoBehaviour:
   m_Script: {fileID: 11500000, guid: 0f4efe98aab6c6b41a7ee1f4c49df27b, type: 3}
   m_Name: 
   m_EditorClassIdentifier: 
-  textKey: TitleTip1
+  textKey: TitleTipHasData
   layoutRebuildObject: {fileID: 0}
   languageFontSizes: []
 --- !u!1 &8846757062284942991

+ 56 - 11
Assets/SmartBow/Resources/SmartBow/Prefabs/ZIM/LineGenerator.cs

@@ -18,6 +18,8 @@ namespace ZIM
         public float DashLength = 10f;
         [Tooltip("虚线每段的间隔")]
         public float GapLength = 5f;
+        [Tooltip("是否每次绘制两点之间的线段")]
+        public bool DrawTwoPointsAtATime = false;
 
         [SerializeField]
         private Vector2[] _points;
@@ -47,22 +49,65 @@ namespace ZIM
             float pivotX = rectTransform.pivot.x * rectTransform.rect.width - width;
             float pivotY = rectTransform.pivot.y * rectTransform.rect.height - height;
 
-            for (int i = Loop ? -1 : 0; i < Points.Length - 1; i++)
+            if (DrawTwoPointsAtATime)
             {
-                Vector2 start = Points[i < 0 ? i + Points.Length : i];
-                Vector2 end = Points[i + 1];
-
-                start = new Vector2(start.x * width - pivotX, start.y * height - pivotY);
-                end = new Vector2(end.x * width - pivotX, end.y * height - pivotY);
+                // 确保每两个点就绘制一次线段
+                for (int i = 0; i < Points.Length - 1; i++)
+                {
+                    Vector2 start = Points[i];
+                    Vector2 end = Points[i + 1];
+
+                    start = new Vector2(start.x * width - pivotX, start.y * height - pivotY);
+                    end = new Vector2(end.x * width - pivotX, end.y * height - pivotY);
+
+                    if (IsDashed)
+                    {
+                        DrawDashedLine(vh, start, end, LineThickness, DashLength, GapLength);
+                    }
+                    else
+                    {
+                        DrawLine(vh, start, end, LineThickness);
+                    }
+                }
 
-                // DrawLine(vh, start, end, LineThickness);
-                if (IsDashed)
+                // 如果 Loop 为 true, 添加闭环
+                if (Loop && Points.Length >= 4)
                 {
-                    DrawDashedLine(vh, start, end, LineThickness, DashLength, GapLength);
+                    Vector2 start = Points[Points.Length - 1];
+                    Vector2 end = Points[0];
+
+                    start = new Vector2(start.x * width - pivotX, start.y * height - pivotY);
+                    end = new Vector2(end.x * width - pivotX, end.y * height - pivotY);
+
+                    if (IsDashed)
+                    {
+                        DrawDashedLine(vh, start, end, LineThickness, DashLength, GapLength);
+                    }
+                    else
+                    {
+                        DrawLine(vh, start, end, LineThickness);
+                    }
                 }
-                else
+            }
+            else
+            {
+                for (int i = Loop ? -1 : 0; i < Points.Length - 1; i++)
                 {
-                    DrawLine(vh, start, end, LineThickness);
+                    Vector2 start = Points[i < 0 ? i + Points.Length : i];
+                    Vector2 end = Points[i + 1];
+
+                    start = new Vector2(start.x * width - pivotX, start.y * height - pivotY);
+                    end = new Vector2(end.x * width - pivotX, end.y * height - pivotY);
+
+                    // DrawLine(vh, start, end, LineThickness);
+                    if (IsDashed)
+                    {
+                        DrawDashedLine(vh, start, end, LineThickness, DashLength, GapLength);
+                    }
+                    else
+                    {
+                        DrawLine(vh, start, end, LineThickness);
+                    }
                 }
             }
         }

+ 76 - 59
Assets/SmartBow/Scripts/Views/InfraredViewParts/InfraredScreenPositioningView.cs

@@ -83,8 +83,11 @@ public class InfraredScreenPositioningView : JCUnityLib.ViewBase
     Line maskLine;
     [SerializeField]
     RawImage rawImage;
+    [Tooltip("Demo测试时候显示")]
     [SerializeField]
     RectTransform crosshair;
+    [SerializeField]
+    RectTransform crosshairRed;
     [Tooltip("存在校准数据时候显示")]
     [SerializeField] LineGenerator CurrentUILineGenerator;//开始显示屏幕线条
 
@@ -401,6 +404,23 @@ public class InfraredScreenPositioningView : JCUnityLib.ViewBase
                 crosshairSmall.gameObject.SetActive(false);
 
             //rawImage.material = InfraredDemo.infraredCameraHelper.GetCameraMaterial();
+
+            //可见光调节页面出现红十字光标
+            if (curStepView == ScreenPositioningStep.LightCtrl)
+            {
+                if (ScreenLocate.Main.infraredSpotBuffer[0].CameraLocation.HasValue)
+                {
+                    // 检测到光点
+                    var posInCanvas = ScreenLocate.Main.infraredSpotBuffer[0].CameraLocation.Value.pixelToLocalPosition_AnchorCenter(ScreenLocate.Main.CameraSize, rawImage.rectTransform.rect);
+                    crosshairRed.gameObject.SetActive(true);
+                    crosshairRed.anchoredPosition = posInCanvas;
+                }
+                else
+                    crosshairRed.gameObject.SetActive(false);
+            }
+            else if (crosshairRed.gameObject.activeSelf) {
+                crosshairRed.gameObject.SetActive(false);
+            }
         }
     }
 
@@ -416,29 +436,34 @@ public class InfraredScreenPositioningView : JCUnityLib.ViewBase
         switch (step)
         {
             case ScreenPositioningStep.Start:
-                mask.SetActive(true);
                 maskLine.SetDrawMask(true);
                 LayoutStart.SetActive(true);
                 UpdateStartUI();
                 break;
             case ScreenPositioningStep.AutoEnd:
-                mask.SetActive(true);
                 maskLine.SetDrawMask(true);
                 LayoutAutoEnd.SetActive(true);
+                pointsParent.gameObject.SetActive(false);
+                CurrentUILineGenerator.enabled = true;
                 break;
             case ScreenPositioningStep.Marker:
-                mask.SetActive(true);
                 maskLine.SetDrawMask(true);
                 LayoutMarker.SetActive(true);
+                CurrentUILineGenerator.enabled = false;
+                pointsParent.gameObject.SetActive(false);
+                setPointsLocation(ScreenLocate.quadUnityVectorList, pointsParent.gameObject, true);
                 break;
             case ScreenPositioningStep.LightCtrl:
-                mask.SetActive(true);
                 maskLine.SetDrawMask(false);
                 LayoutLightCtrl.SetActive(true);
+                CurrentUILineGenerator.enabled = false;
+                pointsParent.gameObject.SetActive(true);
+                setPointsLocation(ScreenLocate.quadUnityVectorList, pointsParent.gameObject, true);
                 break;
             case ScreenPositioningStep.Successful:
-                mask.SetActive(false);
                 LayoutSuccessful.SetActive(true);
+                pointsParent.gameObject.SetActive(false);
+                CurrentUILineGenerator.enabled = false;
                 break;
         }
     }
@@ -455,18 +480,20 @@ public class InfraredScreenPositioningView : JCUnityLib.ViewBase
     /// 开始页面时候ui
     /// </summary>
     void UpdateStartUI() {
+        pointsParent.gameObject.SetActive(false);
+        CurrentUILineGenerator.enabled = true;
         if (ScreenLocate.quadUnityVectorList.Count == 0)
         {
-            //存在数据,显示确认按钮,确认按钮直接跳转到游戏
             BottomConfirmBtn.SetActive(false);
-            StartTextTip1.SetActive(false);
-            StartTextTipHasData.SetActive(true);
+            StartTextTip1.SetActive(true);
+            StartTextTipHasData.SetActive(false);
         }
         else
         {
+            //存在数据,显示确认按钮,确认按钮直接跳转到游戏
             BottomConfirmBtn.SetActive(true);
-            StartTextTip1.SetActive(true);
-            StartTextTipHasData.SetActive(false);
+            StartTextTip1.SetActive(false);
+            StartTextTipHasData.SetActive(true);
         }
     }
 
@@ -572,43 +599,33 @@ public class InfraredScreenPositioningView : JCUnityLib.ViewBase
         if (curStepView == ScreenPositioningStep.Start || curStepView == ScreenPositioningStep.AutoEnd) {
             //如果是开始页面进行自动定位的
             if(curStepView != ScreenPositioningStep.AutoEnd) SetScreenPositioningStepState(ScreenPositioningStep.AutoEnd);
-
-            QuadrilateralInCamera screenAuto = ScreenLocate.Main.ScreenIdentification.QuadAuto;
-            if (screenAuto != null)
-            {
-                Debug.Log("[校准流程] AutoEnd 自动识别screenAuto信息  ------------ ");
-                CurrentUILineGenerator.Points = infraredDemo.ConvertQuadToPoints(screenAuto, texSize);
-            }
-            else
-            {
-                Debug.LogError("screenAuto 不存在!");
-            }
-
         }
         else if (curStepView == ScreenPositioningStep.Marker) {
             //显示最后结果
             SetScreenPositioningStepState(ScreenPositioningStep.Successful);
-            //设置两个线段
-            QuadrilateralInCamera screenAuto = ScreenLocate.Main.ScreenIdentification.QuadAuto;
-            QuadrilateralInCamera screenSemiAuto = ScreenLocate.Main.ScreenIdentification.QuadSemiAuto;
-            if (screenAuto != null)
-            {
-                Debug.Log("[校准流程]Successful自动识别screenAuto信息  ------------ ");
-                FirstUILineGenerator.Points = infraredDemo.ConvertQuadToPoints(screenAuto, texSize);
-            }
-            else
-            {
-                Debug.LogError("screenAuto 不存在!");
-            }
-            if (screenSemiAuto != null)
-            {
-                Debug.Log("[校准流程]Successful半自动识别screenSemiAuto信息 ------------ ");
-                SecondUILineGenerator.Points = infraredDemo.ConvertQuadToPoints(screenSemiAuto, texSize);
-            }
-            else
-            {
-                Debug.LogError("screenSemiAuto 不存在!");
-            }
+        }
+        //屏幕变化情况下。同步修改对应的line
+        //设置两个线段
+        QuadrilateralInCamera screenAuto = ScreenLocate.Main.ScreenIdentification.QuadAuto;
+        QuadrilateralInCamera screenSemiAuto = ScreenLocate.Main.ScreenIdentification.QuadSemiAuto;
+        if (screenAuto != null)
+        {
+            Debug.Log("[校准流程]Successful自动识别screenAuto信息  ------------ ");
+            CurrentUILineGenerator.Points = infraredDemo.ConvertQuadToPoints(screenAuto, texSize);
+            FirstUILineGenerator.Points = infraredDemo.ConvertQuadToPoints(screenAuto, texSize);
+        }
+        else
+        {
+            Debug.LogError("screenAuto 不存在!");
+        }
+        if (screenSemiAuto != null)
+        {
+            Debug.Log("[校准流程]Successful半自动识别screenSemiAuto信息 ------------ ");
+            SecondUILineGenerator.Points = infraredDemo.ConvertQuadToPoints(screenSemiAuto, texSize);
+        }
+        else
+        {
+            Debug.LogError("screenSemiAuto 不存在!");
         }
     }
 
@@ -1166,22 +1183,22 @@ public class InfraredScreenPositioningView : JCUnityLib.ViewBase
             return;
         }
         // 遍历所有图片
-
-        for (int i = 0; i < ResultImages.Length; i++)
-        {
-            // 如果是选中的 index,赋值为 ResultLines[0],否则赋值为 ResultLines[1]
-            if (i == selectedIndex)
-            {
-                selected = i;
-                ResultImages[i].sprite = ResultLines[0];
-                ResultButtons[i].interactable = true;
-            }
-            else
-            {
-                ResultImages[i].sprite = ResultLines[1];
-                ResultButtons[i].interactable = false;
-            }
-        }
+        selected = selectedIndex;
+        //for (int i = 0; i < ResultImages.Length; i++)
+        //{
+        //    // 如果是选中的 index,赋值为 ResultLines[0],否则赋值为 ResultLines[1]
+        //    if (i == selectedIndex)
+        //    {
+        //        selected = i;
+        //        ResultImages[i].sprite = ResultLines[0];
+        //        ResultButtons[i].interactable = true;
+        //    }
+        //    else
+        //    {
+        //        ResultImages[i].sprite = ResultLines[1];
+        //        ResultButtons[i].interactable = false;
+        //    }
+        //}
     }
 
     //选择全自动结果后进入游戏

+ 2 - 0
Assets/SmartBow/Scripts/Views/InfraredViewParts/Line.cs

@@ -56,10 +56,12 @@ namespace LineUI
 
         public void SetDrawQuad(bool value) {
             bDrawQuad = value;
+            SetVerticesDirty();
         }
         public void SetDrawMask(bool value)
         {
             bDrawMask = value;
+            SetVerticesDirty();
         }
         protected override void OnPopulateMesh(VertexHelper vh)
         {

+ 44 - 4
Assets/SmartBow/Scripts/Views/InfraredViewParts/PointMarker.cs

@@ -20,7 +20,8 @@ public class PointMarker : MonoBehaviour
 
     public Image[] hintImages; // 依次存放左上、右上、右下、左下四个提示图片
 
-    //private List<Vector2> markedPoints = new List<Vector2>();
+    Vector2 oldPoint = Vector2.zero;
+    private List<Vector2> markedPoints = new List<Vector2>();
     // { "左上", "右上", "右下", "左下" }
     private string[] directions = { "TipTopLeft", "TipTopRight", "TipBottomRight", "TipBottomLeft" };
     private int currentPointIndex = 0; // 当前需要标记的点的索引
@@ -28,6 +29,10 @@ public class PointMarker : MonoBehaviour
 
     [SerializeField] InfraredScreenPositioningView infraredScreenPositioningView;
 
+    [Tooltip("存在校准数据时候显示")]
+    [SerializeField] ZIM.LineGenerator line;//开始显示屏幕线条
+
+
     void Start()
     {
         if (AimHandler.ins) AimHandler.ins.OnCrossBtnEvent += OnRecordInfrared;
@@ -65,7 +70,7 @@ public class PointMarker : MonoBehaviour
 
                 Vector2 pos = new Vector2(u * ScreenLocate.Main.getUVCTexture.width, v * ScreenLocate.Main.getUVCTexture.height);
                 //markedPoints.Add(pos);
-
+                oldPoint = new Vector2(u, v);
                 // 设置标记的位置
                 MarkPoint(new Vector2(u, v).pixelToLocalPosition_AnchorCenter(new Vector2(1, 1), markerParent.GetComponent<RectTransform>().rect));
             }
@@ -99,6 +104,7 @@ public class PointMarker : MonoBehaviour
         var location = ScreenLocate.Main.infraredSpotBuffer.FirstOrDefault()?.CameraLocation;
         if (location != null)
         {
+            oldPoint = location.Value;
             Vector2 localPosition = location.Value.pixelToLocalPosition_AnchorCenter(ScreenLocate.Main.CameraSize, infraredScreenPositioningView.Bg.rectTransform.rect);
             //markedPoints.Add(localPosition);
             MarkPoint(localPosition);
@@ -116,6 +122,9 @@ public class PointMarker : MonoBehaviour
         marker.SetActive(true);
         marker.transform.localPosition = point;
         markerObjects.Add(marker);
+        //绘制连线
+        markedPoints.Add(point);
+        UpdateLine();
 
         // 隐藏当前的提示图片,显示下一个提示图片
         currentPointIndex++;
@@ -154,8 +163,8 @@ public class PointMarker : MonoBehaviour
         if (currentPointIndex > 0)
         {
             // 移除最后一个标记的点
-            //markedPoints.RemoveAt(markedPoints.Count - 1);
-
+            markedPoints.RemoveAt(markedPoints.Count - 1);
+            UpdateLine();
             // 删除最后一个标记的物体
             Destroy(markerObjects[markerObjects.Count - 1]);
             markerObjects.RemoveAt(markerObjects.Count - 1);
@@ -170,6 +179,37 @@ public class PointMarker : MonoBehaviour
         // 隐藏完成按钮
         bComplete = false;
     }
+    /// <summary>
+    /// 移除全部标记,选择自动和半自动数据界面返回时候调用
+    /// </summary>
+    public void UndoAllPoints()
+    {
+        // 移除所有标记物体
+        foreach (var marker in markerObjects)
+        {
+            Destroy(marker);
+        }
+        markerObjects.Clear();
+
+        markedPoints.Clear();
+        UpdateLine();
+        // 重置索引
+        currentPointIndex = 0;
+
+        // 更新提示图片和说明
+        ShowHintImage(currentPointIndex);
+        UpdateInstruction();
+
+        // 隐藏完成按钮
+        bComplete = false;
+    }
+
+    void UpdateLine() {
+        RectTransform rectTransform = markerParent as RectTransform;
+        Vector2 pivot = rectTransform.pivot; // 获取父物体的 pivot 值
+        Vector2 texSize = rectTransform.rect.size;
+        line.Points = InfraredDemo._ins.ConvertPointsToCoordinates(markedPoints.ToArray(), texSize, pivot);
+    }
 
     void UpdateInstruction()
     {

+ 5 - 16
Assets/SmartBow/Scripts/Views/SettingsView.cs

@@ -20,6 +20,7 @@ namespace SmartBow
             switch (CommonConfig.OP)
             {
                 case OperatingPlatform.A:
+                case OperatingPlatform.C:
                     if (CommonConfig.bInfraredApp)
                     {
                         //隐藏弓到屏幕的距离
@@ -31,7 +32,8 @@ namespace SmartBow
                             { "BtnLevel", null },
                             { "BtnUserAgreement", null },
                             { "BtnPrivacyPolicy", null },
-                            { "BtnAboutUs", null }
+                            { "BtnAboutUs", null },
+                            { "BtnSignOut",null}
                         };
                         SortChildObjects(actionMapInfrared);
                     }
@@ -45,7 +47,8 @@ namespace SmartBow
                             { "BtnLevel", null },
                             { "BtnUserAgreement", null },
                             { "BtnPrivacyPolicy", null },
-                            { "BtnAboutUs", null }
+                            { "BtnAboutUs", null },
+                            { "BtnSignOut",null}
                         };
 
                         SortChildObjects(actionMapA);
@@ -64,20 +67,6 @@ namespace SmartBow
                     };
                     SortChildObjects(actionMapB);
                     break;
-                case OperatingPlatform.C:
-                    //隐藏弓到屏幕的距离
-                    Dictionary<string, Transform> actionMapInfraredC = new Dictionary<string, Transform>
-                        {
-                            { "BtnSound", null },
-                            { "BtnLanguage", null },
-                            { "BtnNewUser", null },
-                            { "BtnLevel", null },
-                            { "BtnUserAgreement", null },
-                            { "BtnPrivacyPolicy", null },
-                            { "BtnAboutUs", null }
-                        };
-                    SortChildObjects(actionMapInfraredC);
-                    break;
             }
 
         }

Kaikkia tiedostoja ei voida näyttää, sillä liian monta tiedostoa muuttui tässä diffissä