This commit is contained in:
commit
e2b76a9a6c
|
@ -38,7 +38,7 @@ RenderSettings:
|
||||||
m_ReflectionIntensity: 1
|
m_ReflectionIntensity: 1
|
||||||
m_CustomReflection: {fileID: 0}
|
m_CustomReflection: {fileID: 0}
|
||||||
m_Sun: {fileID: 1113159741}
|
m_Sun: {fileID: 1113159741}
|
||||||
m_IndirectSpecularColor: {r: 0.16233939, g: 0.30609006, b: 0.66884065, a: 1}
|
m_IndirectSpecularColor: {r: 0.1623277, g: 0.30598003, b: 0.66832066, a: 1}
|
||||||
m_UseRadianceAmbientProbe: 0
|
m_UseRadianceAmbientProbe: 0
|
||||||
--- !u!157 &3
|
--- !u!157 &3
|
||||||
LightmapSettings:
|
LightmapSettings:
|
||||||
|
@ -68599,7 +68599,6 @@ MonoBehaviour:
|
||||||
distance: 0
|
distance: 0
|
||||||
isScale: 0
|
isScale: 0
|
||||||
satelliteImagery: {fileID: 1378295488}
|
satelliteImagery: {fileID: 1378295488}
|
||||||
rect: {fileID: 6368481659655708048}
|
|
||||||
--- !u!1 &1720385560
|
--- !u!1 &1720385560
|
||||||
GameObject:
|
GameObject:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
|
@ -70681,7 +70680,7 @@ MonoBehaviour:
|
||||||
m_PreInfinity: 2
|
m_PreInfinity: 2
|
||||||
m_PostInfinity: 2
|
m_PostInfinity: 2
|
||||||
m_RotationOrder: 4
|
m_RotationOrder: 4
|
||||||
randSeed: 683595140
|
randSeed: 102493484
|
||||||
isDoingTransition: 0
|
isDoingTransition: 0
|
||||||
minimumHeight: 0
|
minimumHeight: 0
|
||||||
--- !u!114 &1820978574
|
--- !u!114 &1820978574
|
||||||
|
@ -72703,6 +72702,11 @@ PrefabInstance:
|
||||||
propertyPath: m_AnchoredPosition.x
|
propertyPath: m_AnchoredPosition.x
|
||||||
value: 450
|
value: 450
|
||||||
objectReference: {fileID: 0}
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 5855821740938569037, guid: fbbb5cf357f688c4e8fb400e3c92f0e1,
|
||||||
|
type: 3}
|
||||||
|
propertyPath: m_IsActive
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
- target: {fileID: 5855821741208403615, guid: fbbb5cf357f688c4e8fb400e3c92f0e1,
|
- target: {fileID: 5855821741208403615, guid: fbbb5cf357f688c4e8fb400e3c92f0e1,
|
||||||
type: 3}
|
type: 3}
|
||||||
propertyPath: m_IsActive
|
propertyPath: m_IsActive
|
||||||
|
@ -72718,6 +72722,11 @@ PrefabInstance:
|
||||||
propertyPath: m_Name
|
propertyPath: m_Name
|
||||||
value: finish
|
value: finish
|
||||||
objectReference: {fileID: 0}
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 5855821741593404592, guid: fbbb5cf357f688c4e8fb400e3c92f0e1,
|
||||||
|
type: 3}
|
||||||
|
propertyPath: m_IsActive
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
- target: {fileID: 5855821741614971530, guid: fbbb5cf357f688c4e8fb400e3c92f0e1,
|
- target: {fileID: 5855821741614971530, guid: fbbb5cf357f688c4e8fb400e3c92f0e1,
|
||||||
type: 3}
|
type: 3}
|
||||||
propertyPath: m_Sprite
|
propertyPath: m_Sprite
|
||||||
|
@ -72735,6 +72744,11 @@ PrefabInstance:
|
||||||
value:
|
value:
|
||||||
objectReference: {fileID: 21300000, guid: 47390e15134f347458cdb6364e799ffc,
|
objectReference: {fileID: 21300000, guid: 47390e15134f347458cdb6364e799ffc,
|
||||||
type: 3}
|
type: 3}
|
||||||
|
- target: {fileID: 5855821741614971575, guid: fbbb5cf357f688c4e8fb400e3c92f0e1,
|
||||||
|
type: 3}
|
||||||
|
propertyPath: m_IsActive
|
||||||
|
value: 1
|
||||||
|
objectReference: {fileID: 0}
|
||||||
- target: {fileID: 5855821741811488938, guid: fbbb5cf357f688c4e8fb400e3c92f0e1,
|
- target: {fileID: 5855821741811488938, guid: fbbb5cf357f688c4e8fb400e3c92f0e1,
|
||||||
type: 3}
|
type: 3}
|
||||||
propertyPath: m_Name
|
propertyPath: m_Name
|
||||||
|
@ -72861,6 +72875,11 @@ PrefabInstance:
|
||||||
value:
|
value:
|
||||||
objectReference: {fileID: 21300000, guid: 47390e15134f347458cdb6364e799ffc,
|
objectReference: {fileID: 21300000, guid: 47390e15134f347458cdb6364e799ffc,
|
||||||
type: 3}
|
type: 3}
|
||||||
|
- target: {fileID: 5855821741819214778, guid: fbbb5cf357f688c4e8fb400e3c92f0e1,
|
||||||
|
type: 3}
|
||||||
|
propertyPath: m_IsActive
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
- target: {fileID: 5855821741890996493, guid: fbbb5cf357f688c4e8fb400e3c92f0e1,
|
- target: {fileID: 5855821741890996493, guid: fbbb5cf357f688c4e8fb400e3c92f0e1,
|
||||||
type: 3}
|
type: 3}
|
||||||
propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.size
|
propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.size
|
||||||
|
@ -72961,11 +72980,21 @@ PrefabInstance:
|
||||||
propertyPath: initiate_botn
|
propertyPath: initiate_botn
|
||||||
value:
|
value:
|
||||||
objectReference: {fileID: 78139659}
|
objectReference: {fileID: 78139659}
|
||||||
|
- target: {fileID: 5855821742187232578, guid: fbbb5cf357f688c4e8fb400e3c92f0e1,
|
||||||
|
type: 3}
|
||||||
|
propertyPath: m_IsActive
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
- target: {fileID: 5855821742305114459, guid: fbbb5cf357f688c4e8fb400e3c92f0e1,
|
- target: {fileID: 5855821742305114459, guid: fbbb5cf357f688c4e8fb400e3c92f0e1,
|
||||||
type: 3}
|
type: 3}
|
||||||
propertyPath: m_Text
|
propertyPath: m_Text
|
||||||
value:
|
value:
|
||||||
objectReference: {fileID: 0}
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 5855821742456550830, guid: fbbb5cf357f688c4e8fb400e3c92f0e1,
|
||||||
|
type: 3}
|
||||||
|
propertyPath: m_IsActive
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
- target: {fileID: 5855821742633352631, guid: fbbb5cf357f688c4e8fb400e3c92f0e1,
|
- target: {fileID: 5855821742633352631, guid: fbbb5cf357f688c4e8fb400e3c92f0e1,
|
||||||
type: 3}
|
type: 3}
|
||||||
propertyPath: m_IsActive
|
propertyPath: m_IsActive
|
||||||
|
@ -100575,8 +100604,8 @@ RectTransform:
|
||||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
m_AnchorMin: {x: 0, y: 0}
|
m_AnchorMin: {x: 0, y: 0}
|
||||||
m_AnchorMax: {x: 1, y: 1}
|
m_AnchorMax: {x: 1, y: 1}
|
||||||
m_AnchoredPosition: {x: 0, y: 0}
|
m_AnchoredPosition: {x: -71, y: -28.6}
|
||||||
m_SizeDelta: {x: 15.067139, y: -130.77124}
|
m_SizeDelta: {x: 167.36975, y: -41.188477}
|
||||||
m_Pivot: {x: 0.5, y: 0.5}
|
m_Pivot: {x: 0.5, y: 0.5}
|
||||||
--- !u!1 &6368481659655708051
|
--- !u!1 &6368481659655708051
|
||||||
GameObject:
|
GameObject:
|
||||||
|
|
Binary file not shown.
|
@ -2,7 +2,6 @@
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
using UnityEngine.EventSystems;
|
|
||||||
using UnityEngine.UI;
|
using UnityEngine.UI;
|
||||||
|
|
||||||
public class PostureController : MonoBehaviour
|
public class PostureController : MonoBehaviour
|
||||||
|
@ -34,14 +33,13 @@ public class PostureController : MonoBehaviour
|
||||||
{
|
{
|
||||||
deviceManager = DeviceManager.Instance;
|
deviceManager = DeviceManager.Instance;
|
||||||
droneViewDisplay = DroneViewDisplay.Instance;
|
droneViewDisplay = DroneViewDisplay.Instance;
|
||||||
upBtn.onClick.AddListener(OnDown);
|
upBtn.onClick.AddListener(OnUp);
|
||||||
downBtn.onClick.AddListener(OnUp);
|
downBtn.onClick.AddListener(OnDown);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Update is called once per frame
|
// Update is called once per frame
|
||||||
void Update()
|
void Update()
|
||||||
{
|
{
|
||||||
//if (EventSystem.current.IsPointerOverGameObject()) return;
|
|
||||||
if (Input.GetMouseButton(0))
|
if (Input.GetMouseButton(0))
|
||||||
{
|
{
|
||||||
if (RectTransformUtility.RectangleContainsScreenPoint(rect, Input.mousePosition))
|
if (RectTransformUtility.RectangleContainsScreenPoint(rect, Input.mousePosition))
|
||||||
|
@ -56,40 +54,38 @@ public class PostureController : MonoBehaviour
|
||||||
|
|
||||||
private void OnUp()
|
private void OnUp()
|
||||||
{
|
{
|
||||||
//if (currentCoroutine != null) return;
|
|
||||||
//if (isScale) return;
|
|
||||||
distance = satelliteImagery.orthographicSize;
|
distance = satelliteImagery.orthographicSize;
|
||||||
distance += 100;
|
distance += 100;
|
||||||
if (distance >= 1120)
|
if (distance >= 1120)
|
||||||
{
|
{
|
||||||
distance = 1120;
|
distance = 1120;
|
||||||
|
currentCoroutine = null;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
satelliteImagery.orthographicSize = distance;
|
|
||||||
//if (currentCoroutine == null)
|
if (currentCoroutine == null)
|
||||||
//{
|
{
|
||||||
// isScale = true;
|
isScale = true;
|
||||||
// currentCoroutine = StartCoroutine(Merge(distance));
|
currentCoroutine = StartCoroutine(Merge(distance));
|
||||||
//}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void OnDown()
|
private void OnDown()
|
||||||
{
|
{
|
||||||
//if (currentCoroutine != null) return;
|
|
||||||
//if (isScale) return;
|
|
||||||
distance = satelliteImagery.orthographicSize;
|
distance = satelliteImagery.orthographicSize;
|
||||||
distance -= 100;
|
distance -= 100;
|
||||||
if (distance <= 200f)
|
if (distance <= 200f)
|
||||||
{
|
{
|
||||||
distance = 200f;
|
distance = 200f;
|
||||||
|
currentCoroutine = null;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
satelliteImagery.orthographicSize = distance;
|
|
||||||
//if (currentCoroutine == null)
|
if (currentCoroutine == null)
|
||||||
//{
|
{
|
||||||
// isScale = true;
|
isScale = true;
|
||||||
// currentCoroutine = StartCoroutine(Merge(distance));
|
currentCoroutine = StartCoroutine(Merge(distance));
|
||||||
//}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private IEnumerator Merge(float targetPoint)
|
private IEnumerator Merge(float targetPoint)
|
||||||
|
@ -98,9 +94,8 @@ public class PostureController : MonoBehaviour
|
||||||
{
|
{
|
||||||
Debug.Log("update");
|
Debug.Log("update");
|
||||||
satelliteImagery.orthographicSize = Mathf.Lerp(satelliteImagery.orthographicSize, targetPoint, Time.deltaTime * 20f);
|
satelliteImagery.orthographicSize = Mathf.Lerp(satelliteImagery.orthographicSize, targetPoint, Time.deltaTime * 20f);
|
||||||
if (Mathf.Abs(targetPoint - satelliteImagery.orthographicSize) < 0.15)
|
if (Mathf.Abs(targetPoint - satelliteImagery.orthographicSize) < 0.1)
|
||||||
{
|
{
|
||||||
satelliteImagery.orthographicSize = targetPoint;
|
|
||||||
isScale = false;
|
isScale = false;
|
||||||
currentCoroutine = null;
|
currentCoroutine = null;
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,7 +10,6 @@ using Tenkoku.Core;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
using UnityEngine.EventSystems;
|
using UnityEngine.EventSystems;
|
||||||
using UnityEngine.UI;
|
using UnityEngine.UI;
|
||||||
using UnityTemplateProjects;
|
|
||||||
using static InterfaceManager;
|
using static InterfaceManager;
|
||||||
|
|
||||||
public class GameManager : MonoSingleton<GameManager>
|
public class GameManager : MonoSingleton<GameManager>
|
||||||
|
@ -67,13 +66,11 @@ public class GameManager : MonoSingleton<GameManager>
|
||||||
satelliteImagery.SetActive(false);
|
satelliteImagery.SetActive(false);
|
||||||
postureBtn.onClick.AddListener(() =>
|
postureBtn.onClick.AddListener(() =>
|
||||||
{
|
{
|
||||||
currentSpt.GetComponent<SimpleCameraController>().enabled = true;
|
|
||||||
satelliteImagery.SetActive(false);
|
satelliteImagery.SetActive(false);
|
||||||
ChangeView(0);
|
ChangeView(0);
|
||||||
});
|
});
|
||||||
teacherBtn.onClick.AddListener(() =>
|
teacherBtn.onClick.AddListener(() =>
|
||||||
{
|
{
|
||||||
currentSpt.GetComponent<SimpleCameraController>().enabled = false;
|
|
||||||
satelliteImagery.SetActive(true);
|
satelliteImagery.SetActive(true);
|
||||||
ChangeView(2);
|
ChangeView(2);
|
||||||
});
|
});
|
||||||
|
@ -472,6 +469,12 @@ public class GameManager : MonoSingleton<GameManager>
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (uavm)
|
||||||
|
{
|
||||||
|
uavm.SetTipsColor();
|
||||||
|
DroneViewDisplay.Instance.CreateUI(uavm, false);
|
||||||
|
}
|
||||||
|
|
||||||
Debug.Log($"<color=yellow>是否是player{data.r3 == GlobalFlag.currentUser.user_id}</color>");
|
Debug.Log($"<color=yellow>是否是player{data.r3 == GlobalFlag.currentUser.user_id}</color>");
|
||||||
device.GetComponent<EquipmentCommon>().FillInTheData(data.list_para, data);
|
device.GetComponent<EquipmentCommon>().FillInTheData(data.list_para, data);
|
||||||
device.GetComponent<EquipmentCommon>().deviceID = data.id;
|
device.GetComponent<EquipmentCommon>().deviceID = data.id;
|
||||||
|
@ -479,11 +482,7 @@ public class GameManager : MonoSingleton<GameManager>
|
||||||
{
|
{
|
||||||
device.GetComponent<EquipmentCommon>().isPlayer = true;
|
device.GetComponent<EquipmentCommon>().isPlayer = true;
|
||||||
}
|
}
|
||||||
if (uavm)
|
|
||||||
{
|
|
||||||
uavm.SetTipsColor();
|
|
||||||
DroneViewDisplay.Instance.CreateUI(uavm, false);
|
|
||||||
}
|
|
||||||
FormationManager.Instance.WhenSpawn();
|
FormationManager.Instance.WhenSpawn();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue