Browse Source

出警界面配置

develop
杨栋梁 4 years ago
parent
commit
036873d996
  1. 6
      .vsconfig
  2. 17580
      Assets/Scenes/DongYouLiQing.unity
  3. 167
      Assets/Scripts/Common/Police/CarMoveManager.cs
  4. 8
      Assets/Scripts/Common/Police/Prefab.meta
  5. 115
      Assets/Scripts/Common/Police/Prefab/CarPoint.prefab
  6. 7
      Assets/Scripts/Common/Police/Prefab/CarPoint.prefab.meta
  7. 152
      Assets/Scripts/Common/Police/Prefab/EndPoint.prefab
  8. 7
      Assets/Scripts/Common/Police/Prefab/EndPoint.prefab.meta
  9. 74
      Assets/Scripts/Common/Police/Prefab/LineImage.prefab
  10. 7
      Assets/Scripts/Common/Police/Prefab/LineImage.prefab.meta
  11. 74
      Assets/Scripts/Common/Police/Prefab/LinePos.prefab
  12. 7
      Assets/Scripts/Common/Police/Prefab/LinePos.prefab.meta
  13. 20554
      Assets/Scripts/Common/Police/Prefab/Police.prefab
  14. 7
      Assets/Scripts/Common/Police/Prefab/Police.prefab.meta
  15. 152
      Assets/Scripts/Common/Police/Prefab/StartPoint.prefab
  16. 7
      Assets/Scripts/Common/Police/Prefab/StartPoint.prefab.meta
  17. BIN
      Assets/Scripts/Common/Police/Prefab/万达广场.jpg
  18. 88
      Assets/Scripts/Common/Police/Prefab/万达广场.jpg.meta
  19. 8
      Assets/StreamingAssets/Police.meta
  20. 8
      Assets/StreamingAssets/Police/PoliceTexture.meta
  21. BIN
      Assets/StreamingAssets/Police/PoliceTexture/万达广场.jpg
  22. 7
      Assets/StreamingAssets/Police/PoliceTexture/万达广场.jpg.meta
  23. BIN
      Assets/StreamingAssets/Police/PoliceTexture/行车路线.jpg
  24. 7
      Assets/StreamingAssets/Police/PoliceTexture/行车路线.jpg.meta
  25. 58
      Assets/StreamingAssets/Police/policeConfig.json
  26. 7
      Assets/StreamingAssets/Police/policeConfig.json.meta

6
.vsconfig

@ -0,0 +1,6 @@
{
"version": "1.0",
"components": [
"Microsoft.VisualStudio.Workload.ManagedGame"
]
}

17580
Assets/Scenes/DongYouLiQing.unity

File diff suppressed because it is too large Load Diff

167
Assets/Scripts/Common/Police/CarMoveManager.cs

@ -1,13 +1,33 @@
using System;
using System.Collections;
using System.Collections.Generic;
using System.IO;
using UnityEngine;
using UnityEngine.UI;
using Newtonsoft.Json;
[Serializable]
public class PoliceRoadConfig
{
public string SceneName;
public List<Vector2> AllRoadPos = new List<Vector2>();
public string ImagePath;
}
public class CarMoveManager : MonoBehaviour
{
public PowerMessage PowerMsg;
public GameObject[] RoadPoints;//移动拐点
public GameObject StartPos;
public GameObject EndPos;
public GameObject LineImageObj;
public Transform LineParent;
public Image BgImage;
public Transform LinePosParent;
public GameObject LinePosObj;
public List<Vector2> AllRoadPos = new List<Vector2>();
public List<GameObject> RoadPoints = new List<GameObject>();//移动拐点
public GameObject Car;
private float PathLength;
private bool CanMove;
@ -27,11 +47,17 @@ public class CarMoveManager : MonoBehaviour
void Awake()
{
LoadConfig();
//AllRoadPos.Clear();
//foreach (var item in RoadPoints)
//{
// AllRoadPos.Add(item.GetComponent<RectTransform>().localPosition);
//}
//读取路径长度作为总出警总距离
for (int i = 0; i < RoadPoints.Length - 1; i++)
for (int i = 0; i < RoadPoints.Count - 1; i++)
{
//PathLength += Vector2.Distance(RoadPoints[i].transform.position, RoadPoints[i + 1].transform.position);
PathLength += Vector2.Distance(RoadPoints[i].GetComponent<RectTransform>().anchoredPosition,
PathLength += Vector2.Distance(RoadPoints[i].GetComponent<RectTransform>().anchoredPosition,
RoadPoints[i + 1].GetComponent<RectTransform>().anchoredPosition);
}
}
@ -42,8 +68,8 @@ public class CarMoveManager : MonoBehaviour
// DateTime.Now.ToString("yyyy:MM:dd HH:mm:ss"));
float tempDis = 0;//当前段路径已移动多少距离
tempDis = Vector2.Distance(Car.GetComponent<RectTransform>().anchoredPosition ,
tempDis = Vector2.Distance(Car.GetComponent<RectTransform>().anchoredPosition,
RoadPoints[index - 1].GetComponent<RectTransform>().anchoredPosition);
float currentDis = movedDis + tempDis;
@ -72,7 +98,7 @@ public class CarMoveManager : MonoBehaviour
{
if (CanMove)
{
if (index < RoadPoints.Length)
if (index < RoadPoints.Count)
{
//Car.transform.Translate((RoadPoints[index].transform.position - Car.transform.position).normalized * Time.deltaTime * Speed);
@ -90,7 +116,7 @@ public class CarMoveManager : MonoBehaviour
startPos = RoadPoints[index - 1].GetComponent<RectTransform>().anchoredPosition;
time += Time.deltaTime;
if (RoadPoints[index].GetComponent<RectTransform>().anchoredPosition
if (RoadPoints[index].GetComponent<RectTransform>().anchoredPosition
!= Car.GetComponent<RectTransform>().anchoredPosition)
{
Car.GetComponent<RectTransform>().anchoredPosition = Vector2.Lerp(startPos,
@ -115,4 +141,131 @@ public class CarMoveManager : MonoBehaviour
}
}
}
public void CreateBGLine(List<Vector2> AllRoadPos)
{
foreach (Transform t in LineParent)
{
Destroy(t.gameObject);
}
Car.transform.localPosition = AllRoadPos[0];
for (int i = 0; i < AllRoadPos.Count; i++)
{
if (i < AllRoadPos.Count - 1)
CreatLine(AllRoadPos[i], AllRoadPos[i + 1]);
}
Debug.Log("CreateLine");
}
public void CreatLine(Vector2 startPos, Vector2 endPos)
{
float length = Vector2.Distance(startPos, endPos);
GameObject lineImage = Instantiate(LineImageObj, LineParent);
lineImage.transform.localPosition = endPos;
lineImage.GetComponent<RectTransform>().sizeDelta = new Vector2(5, length);
double angle = Math.Atan2(startPos.y - endPos.y, startPos.x - endPos.x) * 180 / Math.PI;
lineImage.transform.rotation = Quaternion.Euler(0, 0, (float)angle + 270);
}
public void LoadBG(string bgPath)
{
string _path = Path.Combine(Application.dataPath + "/StreamingAssets", bgPath);//获取地址
FileStream _fileStream = new FileStream(_path, FileMode.Open, FileAccess.Read);//使用流数据读取
byte[] _buffur = new byte[_fileStream.Length];
_fileStream.Read(_buffur, 0, _buffur.Length);//转换成字节流数据
Texture2D _texture2d = new Texture2D((int)BgImage.rectTransform.rect.width, (int)BgImage.rectTransform.rect.height);//设置宽高
_texture2d.LoadImage(_buffur);//将流数据转换成Texture2D
Sprite _sprite = Sprite.Create(_texture2d, new Rect(0, 0, _texture2d.width, _texture2d.height), Vector3.zero);//创建一个Sprite
BgImage.sprite = _sprite;//赋值
Debug.Log("加载成功!");
}
public void LoadConfig()
{
var config = LoadPoliceConfig();
if (config == null)
{
Debug.Log("Null");
return;
}
LoadBG(config.ImagePath);
foreach (Transform t in LinePosParent)
{
Destroy(t.gameObject);
}
RoadPoints.Clear();
AllRoadPos.Clear();
foreach (var item in config.AllRoadPos)
{
GameObject linePos = Instantiate(LinePosObj, LinePosParent);
linePos.transform.localPosition = item;
RoadPoints.Add(linePos);
AllRoadPos.Add(item);
}
GameObject start = Instantiate(StartPos, LinePosParent);
start.transform.localPosition = AllRoadPos[0];
GameObject end = Instantiate(EndPos, LinePosParent);
end.transform.localPosition = AllRoadPos[AllRoadPos.Count - 1];
CreateBGLine(AllRoadPos);
}
PoliceRoadConfig LoadPoliceConfig()
{
PoliceRoadConfig result = null;
string json = null;
string path = Path.Combine(Application.streamingAssetsPath, "police/policeConfig.json");
if (File.Exists(path))
{
json = File.ReadAllText(path);
}
var data = JsonConvert.DeserializeObject<List<PoliceRoadConfig>>(json);
if (data != null)
{
foreach (PoliceRoadConfig obj in data)
{
if (GameSettings.othersSettings.mapname == obj.SceneName)
{
result = obj;
return result;
}
}
}
return result;
}
//private void LateUpdate()
//{
// if (Input.GetKeyDown(KeyCode.T))
// {
// string jsonpath = Path.Combine(Application.streamingAssetsPath, "policeConfig.json");
// PoliceRoadConfig config = new PoliceRoadConfig();
// config.AllRoadPos = AllRoadPos;
// config.ImagePath = "Police/PoliceTexture/行车路线.jpg";
// config.SceneName = "场景名称";
// List<PoliceRoadConfig> configs = new List<PoliceRoadConfig>();
// configs.Add(config);
// SaveJson(jsonpath, configs);
// }
//}
////把上面初始化的数据进行保存
//public void SaveJson(string JsonPath, List<PoliceRoadConfig> policeConfig)
//{
// //如果本地没有对应的json 文件,重新创建
// if (!File.Exists(JsonPath))
// {
// File.Create(JsonPath);
// }
// string json = JsonConvert.SerializeObject(policeConfig);
// File.WriteAllText(JsonPath, json);
// Debug.Log("保存成功");
//}
}

8
Assets/Scripts/Common/Police/Prefab.meta

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

115
Assets/Scripts/Common/Police/Prefab/CarPoint.prefab

@ -0,0 +1,115 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &6471847221937162226
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 6471847221937162227}
- component: {fileID: 6471847221937162229}
- component: {fileID: 6471847221937162228}
- component: {fileID: 6471847221937162230}
m_Layer: 5
m_Name: CarPoint
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &6471847221937162227
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6471847221937162226}
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_Children: []
m_Father: {fileID: 0}
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: -298, y: -141.7}
m_SizeDelta: {x: 25, y: 25}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &6471847221937162229
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6471847221937162226}
m_CullTransparentMesh: 0
--- !u!114 &6471847221937162228
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6471847221937162226}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_Sprite: {fileID: 21300000, guid: e423f55d29d372a45bccd751e94e09f0, type: 3}
m_Type: 0
m_PreserveAspect: 0
m_FillCenter: 1
m_FillMethod: 4
m_FillAmount: 1
m_FillClockwise: 1
m_FillOrigin: 0
m_UseSpriteMesh: 0
--- !u!114 &6471847221937162230
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6471847221937162226}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 1392445389, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Navigation:
m_Mode: 3
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_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_DisabledSprite: {fileID: 0}
m_AnimationTriggers:
m_NormalTrigger: Normal
m_HighlightedTrigger: Highlighted
m_PressedTrigger: Pressed
m_DisabledTrigger: Disabled
m_Interactable: 1
m_TargetGraphic: {fileID: 6471847221937162228}
m_OnClick:
m_PersistentCalls:
m_Calls: []

7
Assets/Scripts/Common/Police/Prefab/CarPoint.prefab.meta

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 54b74d72d9c70114592507759aba9672
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

152
Assets/Scripts/Common/Police/Prefab/EndPoint.prefab

@ -0,0 +1,152 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &8774760039319386078
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 8774760039319386079}
- component: {fileID: 8774760039319386077}
- component: {fileID: 8774760039319386076}
m_Layer: 5
m_Name: Text
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &8774760039319386079
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8774760039319386078}
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_Children: []
m_Father: {fileID: 8774760039522883319}
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.000024438, y: 6.9}
m_SizeDelta: {x: 15.6, y: 17.7}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &8774760039319386077
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8774760039319386078}
m_CullTransparentMesh: 0
--- !u!114 &8774760039319386076
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8774760039319386078}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 708705254, guid: f70555f144d8491a825f0804e09c671c, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 0, g: 0, b: 0, a: 1}
m_RaycastTarget: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_FontData:
m_Font: {fileID: 12800000, guid: eb3d4c61201564c4a83060e3db7ad0cb, type: 3}
m_FontSize: 13
m_FontStyle: 0
m_BestFit: 0
m_MinSize: 1
m_MaxSize: 40
m_Alignment: 4
m_AlignByGeometry: 0
m_RichText: 1
m_HorizontalOverflow: 0
m_VerticalOverflow: 0
m_LineSpacing: 1
m_Text: "\u7EC8"
--- !u!1 &8774760039522883318
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 8774760039522883319}
- component: {fileID: 8774760039522883317}
- component: {fileID: 8774760039522883316}
m_Layer: 5
m_Name: EndPoint
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &8774760039522883319
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8774760039522883318}
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_Children:
- {fileID: 8774760039319386079}
m_Father: {fileID: 0}
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: 259, y: -43.4}
m_SizeDelta: {x: 35, y: 45}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &8774760039522883317
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8774760039522883318}
m_CullTransparentMesh: 0
--- !u!114 &8774760039522883316
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8774760039522883318}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_Sprite: {fileID: 21300000, guid: cddab3a1b1ac35c4a9d13a4a7c892dcb, type: 3}
m_Type: 0
m_PreserveAspect: 0
m_FillCenter: 1
m_FillMethod: 4
m_FillAmount: 1
m_FillClockwise: 1
m_FillOrigin: 0
m_UseSpriteMesh: 0

7
Assets/Scripts/Common/Police/Prefab/EndPoint.prefab.meta

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 62c27588a05c06443937da86a7e7a98f
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

74
Assets/Scripts/Common/Police/Prefab/LineImage.prefab

@ -0,0 +1,74 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &5778339470275892829
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 5778339470275892826}
- component: {fileID: 5778339470275892824}
- component: {fileID: 5778339470275892827}
m_Layer: 5
m_Name: Image
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &5778339470275892826
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5778339470275892829}
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_Children: []
m_Father: {fileID: 0}
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: -258.32, y: -87.07502}
m_SizeDelta: {x: 72.7, y: 5}
m_Pivot: {x: 0.5, y: 0}
--- !u!222 &5778339470275892824
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5778339470275892829}
m_CullTransparentMesh: 0
--- !u!114 &5778339470275892827
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5778339470275892829}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 0, g: 0.7794118, b: 0.29563898, a: 1}
m_RaycastTarget: 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

7
Assets/Scripts/Common/Police/Prefab/LineImage.prefab.meta

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: e7b95162f054b844b9f6543e598499d3
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

74
Assets/Scripts/Common/Police/Prefab/LinePos.prefab

@ -0,0 +1,74 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &7979880848896225074
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 7979880848896225075}
- component: {fileID: 7979880848896225073}
- component: {fileID: 7979880848896225072}
m_Layer: 5
m_Name: 1
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 0
--- !u!224 &7979880848896225075
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7979880848896225074}
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_Children: []
m_Father: {fileID: 0}
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: -228, y: -143}
m_SizeDelta: {x: 25, y: 25}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &7979880848896225073
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7979880848896225074}
m_CullTransparentMesh: 0
--- !u!114 &7979880848896225072
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7979880848896225074}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_Sprite: {fileID: 21300000, guid: e423f55d29d372a45bccd751e94e09f0, type: 3}
m_Type: 0
m_PreserveAspect: 0
m_FillCenter: 1
m_FillMethod: 4
m_FillAmount: 1
m_FillClockwise: 1
m_FillOrigin: 0
m_UseSpriteMesh: 0

7
Assets/Scripts/Common/Police/Prefab/LinePos.prefab.meta

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: e564531e6eddf3a4dbf8399b8e702cf2
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

20554
Assets/Scripts/Common/Police/Prefab/Police.prefab

File diff suppressed because it is too large Load Diff

7
Assets/Scripts/Common/Police/Prefab/Police.prefab.meta

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 7be83522b4a2a034a8562c78d5b6a1ac
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

152
Assets/Scripts/Common/Police/Prefab/StartPoint.prefab

@ -0,0 +1,152 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &1486422900866735205
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1486422900866735206}
- component: {fileID: 1486422900866735200}
- component: {fileID: 1486422900866735207}
m_Layer: 5
m_Name: Text
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &1486422900866735206
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1486422900866735205}
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_Children: []
m_Father: {fileID: 1486422901036558942}
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.000024438, y: 6.9}
m_SizeDelta: {x: 15.6, y: 17.7}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &1486422900866735200
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1486422900866735205}
m_CullTransparentMesh: 0
--- !u!114 &1486422900866735207
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1486422900866735205}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 708705254, guid: f70555f144d8491a825f0804e09c671c, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 0, g: 0, b: 0, a: 1}
m_RaycastTarget: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_FontData:
m_Font: {fileID: 12800000, guid: eb3d4c61201564c4a83060e3db7ad0cb, type: 3}
m_FontSize: 13
m_FontStyle: 0
m_BestFit: 0
m_MinSize: 1
m_MaxSize: 40
m_Alignment: 4
m_AlignByGeometry: 0
m_RichText: 1
m_HorizontalOverflow: 0
m_VerticalOverflow: 0
m_LineSpacing: 1
m_Text: "\u8D77"
--- !u!1 &1486422901036558941
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1486422901036558942}
- component: {fileID: 1486422901036558936}
- component: {fileID: 1486422901036558943}
m_Layer: 5
m_Name: StartPoint
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &1486422901036558942
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1486422901036558941}
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_Children:
- {fileID: 1486422900866735206}
m_Father: {fileID: 0}
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: -298, y: -121}
m_SizeDelta: {x: 35, y: 45}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &1486422901036558936
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1486422901036558941}
m_CullTransparentMesh: 0
--- !u!114 &1486422901036558943
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1486422901036558941}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_Sprite: {fileID: 21300000, guid: 7745e7d5aa17fa243be2a1ddde3c0199, type: 3}
m_Type: 0
m_PreserveAspect: 0
m_FillCenter: 1
m_FillMethod: 4
m_FillAmount: 1
m_FillClockwise: 1
m_FillOrigin: 0
m_UseSpriteMesh: 0

7
Assets/Scripts/Common/Police/Prefab/StartPoint.prefab.meta

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: ad712fd4102923948b106b37e6f2a1a8
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

BIN
Assets/Scripts/Common/Police/Prefab/万达广场.jpg

Binary file not shown.

After

Width:  |  Height:  |  Size: 63 KiB

88
Assets/Scripts/Common/Police/Prefab/万达广场.jpg.meta

@ -0,0 +1,88 @@
fileFormatVersion: 2
guid: 3d933c0626fd0cf41a7bb3afe718b884
TextureImporter:
fileIDToRecycleName: {}
externalObjects: {}
serializedVersion: 9
mipmaps:
mipMapMode: 0
enableMipMap: 0
sRGBTexture: 1
linearTexture: 0
fadeOut: 0
borderMipMap: 0
mipMapsPreserveCoverage: 0
alphaTestReferenceValue: 0.5
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
isReadable: 0
streamingMipmaps: 0
streamingMipmapsPriority: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: -1
aniso: -1
mipBias: -100
wrapU: 1
wrapV: 1
wrapW: -1
nPOTScale: 0
lightmap: 0
compressionQuality: 50
spriteMode: 1
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spritePixelsToUnits: 100
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spriteGenerateFallbackPhysicsShape: 1
alphaUsage: 1
alphaIsTransparency: 1
spriteTessellationDetail: -1
textureType: 8
textureShape: 1
singleChannelComponent: 0
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
platformSettings:
- serializedVersion: 2
buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
physicsShape: []
bones: []
spriteID: da932ab7d59d74d438f776f881b080b8
vertices: []
indices:
edges: []
weights: []
spritePackingTag:
pSDRemoveMatte: 0
pSDShowRemoveMatteOption: 0
userData:
assetBundleName:
assetBundleVariant:

8
Assets/StreamingAssets/Police.meta

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

8
Assets/StreamingAssets/Police/PoliceTexture.meta

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

BIN
Assets/StreamingAssets/Police/PoliceTexture/万达广场.jpg

Binary file not shown.

After

Width:  |  Height:  |  Size: 63 KiB

7
Assets/StreamingAssets/Police/PoliceTexture/万达广场.jpg.meta

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 27b24c7b15df97d4480dba51c6e9b571
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

BIN
Assets/StreamingAssets/Police/PoliceTexture/行车路线.jpg

Binary file not shown.

After

Width:  |  Height:  |  Size: 66 KiB

7
Assets/StreamingAssets/Police/PoliceTexture/行车路线.jpg.meta

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 99b77e1e80b87184d84efe9e127fa910
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

58
Assets/StreamingAssets/Police/policeConfig.json

@ -0,0 +1,58 @@
[
{
"SceneName": "万达广场",
"AllRoadPos": [
{
"x": -237,
"y": 7
},
{
"x": -240,
"y": -21
},
{
"x": 82,
"y": -34
},
{
"x": 81,
"y": 61
},
{
"x": 202,
"y": 59
},
{
"x": 203,
"y": 88
}
],
"ImagePath": "Police/PoliceTexture/万达广场.jpg"
},
{
"SceneName": "维多利亚酒店",
"AllRoadPos": [
{
"x": -331.1,
"y": 52.2
},
{
"x": -329.7,
"y": 19.7
},
{
"x": 231.0,
"y": 10.2
},
{
"x": 231.7,
"y": 55.9
},
{
"x": 254.7,
"y": 55.8
}
],
"ImagePath": "Police/PoliceTexture/行车路线.jpg"
}
]

7
Assets/StreamingAssets/Police/policeConfig.json.meta

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 5f285ba54e8870a49b51fe57ede1839b
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
Loading…
Cancel
Save