Compare commits
No commits in common. "9796e7e417d551ab3069aa56c22431472fe68b46" and "09d29f1446602112c6371a2c6451dc5215d405b0" have entirely different histories.
9796e7e417
...
09d29f1446
|
|
@ -38,7 +38,7 @@ RenderSettings:
|
|||
m_ReflectionIntensity: 1
|
||||
m_CustomReflection: {fileID: 0}
|
||||
m_Sun: {fileID: 1113159741}
|
||||
m_IndirectSpecularColor: {r: 0.1623277, g: 0.30598003, b: 0.66832066, a: 1}
|
||||
m_IndirectSpecularColor: {r: 0.1623216, g: 0.30607828, b: 0.6689026, a: 1}
|
||||
m_UseRadianceAmbientProbe: 0
|
||||
--- !u!157 &3
|
||||
LightmapSettings:
|
||||
|
|
@ -48711,7 +48711,7 @@ RectTransform:
|
|||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 1, y: 1}
|
||||
m_AnchoredPosition: {x: 0, y: -0.000030517578}
|
||||
m_SizeDelta: {x: 0, y: 50}
|
||||
m_SizeDelta: {x: 0, y: 0}
|
||||
m_Pivot: {x: 0.5, y: 1}
|
||||
--- !u!114 &996536657
|
||||
MonoBehaviour:
|
||||
|
|
@ -68550,7 +68550,7 @@ GameObject:
|
|||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &1719983406
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
|
|
@ -68634,7 +68634,7 @@ RectTransform:
|
|||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 1, y: 1}
|
||||
m_AnchoredPosition: {x: 0, y: -0.000030517578}
|
||||
m_SizeDelta: {x: 0, y: 50}
|
||||
m_SizeDelta: {x: 0, y: 0}
|
||||
m_Pivot: {x: 0.5, y: 1}
|
||||
--- !u!114 &1720385562
|
||||
MonoBehaviour:
|
||||
|
|
@ -70680,7 +70680,7 @@ MonoBehaviour:
|
|||
m_PreInfinity: 2
|
||||
m_PostInfinity: 2
|
||||
m_RotationOrder: 4
|
||||
randSeed: 102493484
|
||||
randSeed: 667614828
|
||||
isDoingTransition: 0
|
||||
minimumHeight: 0
|
||||
--- !u!114 &1820978574
|
||||
|
|
@ -72702,11 +72702,6 @@ PrefabInstance:
|
|||
propertyPath: m_AnchoredPosition.x
|
||||
value: 450
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 5855821740938569037, guid: fbbb5cf357f688c4e8fb400e3c92f0e1,
|
||||
type: 3}
|
||||
propertyPath: m_IsActive
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 5855821741208403615, guid: fbbb5cf357f688c4e8fb400e3c92f0e1,
|
||||
type: 3}
|
||||
propertyPath: m_IsActive
|
||||
|
|
@ -72722,11 +72717,6 @@ PrefabInstance:
|
|||
propertyPath: m_Name
|
||||
value: finish
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 5855821741593404592, guid: fbbb5cf357f688c4e8fb400e3c92f0e1,
|
||||
type: 3}
|
||||
propertyPath: m_IsActive
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 5855821741614971530, guid: fbbb5cf357f688c4e8fb400e3c92f0e1,
|
||||
type: 3}
|
||||
propertyPath: m_Sprite
|
||||
|
|
@ -72744,11 +72734,6 @@ PrefabInstance:
|
|||
value:
|
||||
objectReference: {fileID: 21300000, guid: 47390e15134f347458cdb6364e799ffc,
|
||||
type: 3}
|
||||
- target: {fileID: 5855821741614971575, guid: fbbb5cf357f688c4e8fb400e3c92f0e1,
|
||||
type: 3}
|
||||
propertyPath: m_IsActive
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 5855821741811488938, guid: fbbb5cf357f688c4e8fb400e3c92f0e1,
|
||||
type: 3}
|
||||
propertyPath: m_Name
|
||||
|
|
@ -72875,11 +72860,6 @@ PrefabInstance:
|
|||
value:
|
||||
objectReference: {fileID: 21300000, guid: 47390e15134f347458cdb6364e799ffc,
|
||||
type: 3}
|
||||
- target: {fileID: 5855821741819214778, guid: fbbb5cf357f688c4e8fb400e3c92f0e1,
|
||||
type: 3}
|
||||
propertyPath: m_IsActive
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 5855821741890996493, guid: fbbb5cf357f688c4e8fb400e3c92f0e1,
|
||||
type: 3}
|
||||
propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.size
|
||||
|
|
@ -72980,21 +72960,11 @@ PrefabInstance:
|
|||
propertyPath: initiate_botn
|
||||
value:
|
||||
objectReference: {fileID: 78139659}
|
||||
- target: {fileID: 5855821742187232578, guid: fbbb5cf357f688c4e8fb400e3c92f0e1,
|
||||
type: 3}
|
||||
propertyPath: m_IsActive
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 5855821742305114459, guid: fbbb5cf357f688c4e8fb400e3c92f0e1,
|
||||
type: 3}
|
||||
propertyPath: m_Text
|
||||
value:
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 5855821742456550830, guid: fbbb5cf357f688c4e8fb400e3c92f0e1,
|
||||
type: 3}
|
||||
propertyPath: m_IsActive
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 5855821742633352631, guid: fbbb5cf357f688c4e8fb400e3c92f0e1,
|
||||
type: 3}
|
||||
propertyPath: m_IsActive
|
||||
|
|
@ -98990,7 +98960,7 @@ RectTransform:
|
|||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 1, y: 1}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: -948, y: 10}
|
||||
m_SizeDelta: {x: 0, y: 0}
|
||||
m_Pivot: {x: 0, y: 1}
|
||||
--- !u!114 &6368481658076565719
|
||||
MonoBehaviour:
|
||||
|
|
@ -100546,7 +100516,7 @@ RectTransform:
|
|||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 1, y: 1}
|
||||
m_AnchorMax: {x: 0, y: 0}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 20, y: 20}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
|
|
@ -100604,8 +100574,8 @@ RectTransform:
|
|||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 1, y: 1}
|
||||
m_AnchoredPosition: {x: -71, y: -28.6}
|
||||
m_SizeDelta: {x: 167.36975, y: -41.188477}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 15.067139, y: -130.77124}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!1 &6368481659655708051
|
||||
GameObject:
|
||||
|
|
@ -100855,9 +100825,9 @@ RectTransform:
|
|||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 1, y: 1}
|
||||
m_AnchorMax: {x: 0, y: 0}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: -7, y: 0}
|
||||
m_SizeDelta: {x: 0, y: 0}
|
||||
m_Pivot: {x: 0, y: 1}
|
||||
--- !u!114 &6368481659665436127
|
||||
MonoBehaviour:
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@
|
|||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using UnityEngine;
|
||||
using UnityEngine.EventSystems;
|
||||
using UnityEngine.UI;
|
||||
|
||||
public class PostureController : MonoBehaviour
|
||||
|
|
@ -32,13 +33,14 @@ public class PostureController : MonoBehaviour
|
|||
{
|
||||
deviceManager = DeviceManager.Instance;
|
||||
droneViewDisplay = DroneViewDisplay.Instance;
|
||||
upBtn.onClick.AddListener(OnUp);
|
||||
downBtn.onClick.AddListener(OnDown);
|
||||
upBtn.onClick.AddListener(OnDown);
|
||||
downBtn.onClick.AddListener(OnUp);
|
||||
}
|
||||
|
||||
// Update is called once per frame
|
||||
void Update()
|
||||
{
|
||||
//if (EventSystem.current.IsPointerOverGameObject()) return;
|
||||
if (Input.GetMouseButton(0))
|
||||
{
|
||||
float mouseX = Input.GetAxis("Mouse X") * 10f * Time.deltaTime;
|
||||
|
|
@ -50,38 +52,40 @@ public class PostureController : MonoBehaviour
|
|||
|
||||
private void OnUp()
|
||||
{
|
||||
//if (currentCoroutine != null) return;
|
||||
//if (isScale) return;
|
||||
distance = satelliteImagery.orthographicSize;
|
||||
distance += 100;
|
||||
if (distance >= 1120)
|
||||
{
|
||||
distance = 1120;
|
||||
currentCoroutine = null;
|
||||
return;
|
||||
}
|
||||
|
||||
if (currentCoroutine == null)
|
||||
{
|
||||
isScale = true;
|
||||
currentCoroutine = StartCoroutine(Merge(distance));
|
||||
}
|
||||
satelliteImagery.orthographicSize = distance;
|
||||
//if (currentCoroutine == null)
|
||||
//{
|
||||
// isScale = true;
|
||||
// currentCoroutine = StartCoroutine(Merge(distance));
|
||||
//}
|
||||
}
|
||||
|
||||
private void OnDown()
|
||||
{
|
||||
//if (currentCoroutine != null) return;
|
||||
//if (isScale) return;
|
||||
distance = satelliteImagery.orthographicSize;
|
||||
distance -= 100;
|
||||
if (distance <= 200f)
|
||||
{
|
||||
distance = 200f;
|
||||
currentCoroutine = null;
|
||||
return;
|
||||
}
|
||||
|
||||
if (currentCoroutine == null)
|
||||
{
|
||||
isScale = true;
|
||||
currentCoroutine = StartCoroutine(Merge(distance));
|
||||
}
|
||||
satelliteImagery.orthographicSize = distance;
|
||||
//if (currentCoroutine == null)
|
||||
//{
|
||||
// isScale = true;
|
||||
// currentCoroutine = StartCoroutine(Merge(distance));
|
||||
//}
|
||||
}
|
||||
|
||||
private IEnumerator Merge(float targetPoint)
|
||||
|
|
@ -90,8 +94,9 @@ public class PostureController : MonoBehaviour
|
|||
{
|
||||
Debug.Log("update");
|
||||
satelliteImagery.orthographicSize = Mathf.Lerp(satelliteImagery.orthographicSize, targetPoint, Time.deltaTime * 20f);
|
||||
if (Mathf.Abs(targetPoint - satelliteImagery.orthographicSize) < 0.1)
|
||||
if (Mathf.Abs(targetPoint - satelliteImagery.orthographicSize) < 0.15)
|
||||
{
|
||||
satelliteImagery.orthographicSize = targetPoint;
|
||||
isScale = false;
|
||||
currentCoroutine = null;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -10,6 +10,7 @@ using Tenkoku.Core;
|
|||
using UnityEngine;
|
||||
using UnityEngine.EventSystems;
|
||||
using UnityEngine.UI;
|
||||
using UnityTemplateProjects;
|
||||
using static InterfaceManager;
|
||||
|
||||
public class GameManager : MonoSingleton<GameManager>
|
||||
|
|
@ -66,11 +67,13 @@ public class GameManager : MonoSingleton<GameManager>
|
|||
satelliteImagery.SetActive(false);
|
||||
postureBtn.onClick.AddListener(() =>
|
||||
{
|
||||
currentSpt.GetComponent<SimpleCameraController>().enabled = true;
|
||||
satelliteImagery.SetActive(false);
|
||||
ChangeView(0);
|
||||
});
|
||||
teacherBtn.onClick.AddListener(() =>
|
||||
{
|
||||
currentSpt.GetComponent<SimpleCameraController>().enabled = false;
|
||||
satelliteImagery.SetActive(true);
|
||||
ChangeView(2);
|
||||
});
|
||||
|
|
@ -469,12 +472,6 @@ 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>");
|
||||
device.GetComponent<EquipmentCommon>().FillInTheData(data.list_para, data);
|
||||
device.GetComponent<EquipmentCommon>().deviceID = data.id;
|
||||
|
|
@ -482,7 +479,11 @@ public class GameManager : MonoSingleton<GameManager>
|
|||
{
|
||||
device.GetComponent<EquipmentCommon>().isPlayer = true;
|
||||
}
|
||||
|
||||
if (uavm)
|
||||
{
|
||||
uavm.SetTipsColor();
|
||||
DroneViewDisplay.Instance.CreateUI(uavm, false);
|
||||
}
|
||||
FormationManager.Instance.WhenSpawn();
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue