Browse Source

路线样式修改

DGJ 1 year ago
parent
commit
abe7e43d54

+ 1 - 1
Assets/Prefab/Route/Materials/LineMat_1_High.mat

@@ -46,7 +46,7 @@ Material:
     - _MainTex:
         m_Texture: {fileID: 2800000, guid: 0f32cd85f823fe84abe068e17c59e180, type: 3}
         m_Scale: {x: 1, y: 3}
-        m_Offset: {x: 0, y: -6.000005}
+        m_Offset: {x: 0, y: -40.749664}
     - _MetallicGlossMap:
         m_Texture: {fileID: 0}
         m_Scale: {x: 1, y: 1}

+ 3 - 3
Assets/Resources/Route.prefab

@@ -112,9 +112,9 @@ MonoBehaviour:
   m_Name: 
   m_EditorClassIdentifier: 
   ListLineMat:
-  - {fileID: 2100000, guid: 0f8ae0187a5a6c04eb7606fe00b5e5d2, type: 2}
-  - {fileID: 2100000, guid: 3a5a2e1c7de626148bc11b260327baca, type: 2}
-  - {fileID: 2100000, guid: c48bcd49845c6eb4fb04b33c70ff5e41, type: 2}
+  - {fileID: 2100000, guid: 9c61c4cb267f6c14a978c54512e7ecae, type: 2}
+  - {fileID: 2100000, guid: 9c61c4cb267f6c14a978c54512e7ecae, type: 2}
+  - {fileID: 2100000, guid: 9c61c4cb267f6c14a978c54512e7ecae, type: 2}
   Point: {fileID: 0}
   EndPos: {x: 0, y: 0, z: 0}
   StartPos: {x: 0, y: 0, z: 0}

+ 0 - 20
Assets/Scenes/LangChaoDemo2.unity

@@ -29954,34 +29954,14 @@ PrefabInstance:
   m_Modification:
     m_TransformParent: {fileID: 0}
     m_Modifications:
-    - target: {fileID: 2671986348543453396, guid: b8f06988b095a5b47b02ae16f8140d34, type: 3}
-      propertyPath: m_Materials.Array.data[0]
-      value: 
-      objectReference: {fileID: 2100000, guid: 9c61c4cb267f6c14a978c54512e7ecae, type: 2}
     - target: {fileID: 8955719703749531882, guid: b8f06988b095a5b47b02ae16f8140d34, type: 3}
       propertyPath: m_Name
       value: Route
       objectReference: {fileID: 0}
-    - target: {fileID: 8955719703749531882, guid: b8f06988b095a5b47b02ae16f8140d34, type: 3}
-      propertyPath: m_IsActive
-      value: 0
-      objectReference: {fileID: 0}
     - target: {fileID: 8955719703749531883, guid: b8f06988b095a5b47b02ae16f8140d34, type: 3}
       propertyPath: m_RootOrder
       value: 24
       objectReference: {fileID: 0}
-    - target: {fileID: 8955719703749531883, guid: b8f06988b095a5b47b02ae16f8140d34, type: 3}
-      propertyPath: m_LocalScale.x
-      value: 0.5
-      objectReference: {fileID: 0}
-    - target: {fileID: 8955719703749531883, guid: b8f06988b095a5b47b02ae16f8140d34, type: 3}
-      propertyPath: m_LocalScale.y
-      value: 0.5
-      objectReference: {fileID: 0}
-    - target: {fileID: 8955719703749531883, guid: b8f06988b095a5b47b02ae16f8140d34, type: 3}
-      propertyPath: m_LocalScale.z
-      value: 0.5
-      objectReference: {fileID: 0}
     - target: {fileID: 8955719703749531883, guid: b8f06988b095a5b47b02ae16f8140d34, type: 3}
       propertyPath: m_LocalPosition.x
       value: 0

+ 7 - 7
Assets/Scripts/Managers/WayFindingManager.cs

@@ -335,15 +335,15 @@ public class WayFindingManager : MonoSingleton<WayFindingManager>
                 route = listRoot[0];
                 for (int i = 1; i < listRoot.Count; i++)
                 {
- 
-                    if (Mathf.Abs(Vector3.Distance(player.transform.position, listRoot[i].transform.position)) < Mathf.Abs(Vector3.Distance(player.transform.position, route.transform.position)))
-                    {
+                    listRoot[i].setHighLight(true);
+                    //if (Mathf.Abs(Vector3.Distance(player.transform.position, listRoot[i].transform.position)) < Mathf.Abs(Vector3.Distance(player.transform.position, route.transform.position)))
+                    //{
                        
-                        route.setHighLight(false);
-                        route = listRoot[i];
-                    }
+                    //    route.setHighLight(false);
+                    //    route = listRoot[i];
+                    //}
                 }
-                route.setHighLight(true);
+              //  route.setHighLight(true);
             }
         }
     } 

+ 3 - 1
Assets/Scripts/Route.cs

@@ -90,8 +90,10 @@ public class Route : MonoBehaviour
         transform.localScale += new Vector3(0, 0, Mathf.Abs(Vector3.Distance(EndPos, StartPos)) / 12 - (transform.localScale.x * 2));
         material.SetTextureScale("_MainTex", new Vector2(1, Mathf.Abs(Vector3.Distance(EndPos, StartPos)) * 1.5f));
         transform.position = (StartPos + EndPos) / 2.0f;
-  
+
         //transform.LookAt(point);
+
+       
     }
 
     /// <summary>