This commit is contained in:
parent
06de964f1c
commit
2aa6aa3e63
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -11557,6 +11557,8 @@ MonoBehaviour:
|
|||
CloneParent: {fileID: 1932584259}
|
||||
Backbt: {fileID: 770405383}
|
||||
Tips: {fileID: 257355421}
|
||||
LeftHome: {fileID: 2082583473}
|
||||
GoHome: {fileID: 316855989}
|
||||
--- !u!114 &631763064
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
|
@ -22542,7 +22544,7 @@ GameObject:
|
|||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &1329231552
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
|
|
|
@ -69,6 +69,10 @@ public class ClickModelType : MonoBehaviour
|
|||
/// </summary>
|
||||
public GameObject LinkPanel;
|
||||
/// <summary>
|
||||
/// 一键模式面板
|
||||
/// </summary>
|
||||
public GameObject Oneclickmode;
|
||||
/// <summary>
|
||||
/// 当前区域类型
|
||||
/// </summary>
|
||||
public Transform regionType;
|
||||
|
@ -109,6 +113,7 @@ public class ClickModelType : MonoBehaviour
|
|||
AirPanel.SetActive(false);
|
||||
TvPanel.SetActive(false);
|
||||
LinkPanel.SetActive(false);
|
||||
Oneclickmode.SetActive(false);
|
||||
Control_Light.Instance.LightsModel = new List<Transform>();
|
||||
List<ClickModelType> clickModelTypes = FindObjectsOfType<ClickModelType>().ToList();
|
||||
for (int i = 0; i < clickModelTypes.Count; i++)
|
||||
|
@ -128,6 +133,7 @@ public class ClickModelType : MonoBehaviour
|
|||
TvPanel.SetActive(false);
|
||||
CameraPanel.SetActive(false);
|
||||
LinkPanel.SetActive(false);
|
||||
Oneclickmode.SetActive(false);
|
||||
Control_Curtain.Instance.curtain = transform;
|
||||
}
|
||||
else if (SelectModel.Instance.region == region && typeoffurniture == Typeoffurniture.窗户)
|
||||
|
@ -140,6 +146,7 @@ public class ClickModelType : MonoBehaviour
|
|||
TvPanel.SetActive(false);
|
||||
CameraPanel.SetActive(false);
|
||||
LinkPanel.SetActive(false);
|
||||
Oneclickmode.SetActive(false);
|
||||
}
|
||||
else if (SelectModel.Instance.region == region && typeoffurniture == Typeoffurniture.空调)
|
||||
{
|
||||
|
@ -150,6 +157,7 @@ public class ClickModelType : MonoBehaviour
|
|||
TvPanel.SetActive(false);
|
||||
CameraPanel.SetActive(false);
|
||||
LinkPanel.SetActive(false);
|
||||
Oneclickmode.SetActive(false);
|
||||
Control_Air.Instance.airobject = transform;
|
||||
}
|
||||
else if (SelectModel.Instance.region == region && typeoffurniture == Typeoffurniture.电视)
|
||||
|
@ -161,6 +169,7 @@ public class ClickModelType : MonoBehaviour
|
|||
TvPanel.SetActive(true);
|
||||
CameraPanel.SetActive(false);
|
||||
LinkPanel.SetActive(false);
|
||||
Oneclickmode.SetActive(false);
|
||||
Control_Tv.Instance.Tv = transform;
|
||||
}
|
||||
else if (SelectModel.Instance.region == region && typeoffurniture == Typeoffurniture.摄像头)
|
||||
|
@ -172,6 +181,7 @@ public class ClickModelType : MonoBehaviour
|
|||
TvPanel.SetActive(false);
|
||||
CameraPanel.SetActive(true);
|
||||
LinkPanel.SetActive(false);
|
||||
Oneclickmode.SetActive(false);
|
||||
//Control_Camera.Instance.Tv = transform;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4,7 +4,7 @@ using TMPro;
|
|||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
/// <summary>
|
||||
/// 设置联动
|
||||
/// 设置联动/设置一键模式
|
||||
/// </summary>
|
||||
public class Control_Linkage : MonoBehaviour
|
||||
{
|
||||
|
@ -64,8 +64,34 @@ public class Control_Linkage : MonoBehaviour
|
|||
/// 创建数量上限提示
|
||||
/// </summary>
|
||||
public GameObject Tips;
|
||||
/// <summary>
|
||||
/// 离家
|
||||
/// </summary>
|
||||
public Button LeftHome;
|
||||
/// <summary>
|
||||
/// 回家
|
||||
/// </summary>
|
||||
public Button GoHome;
|
||||
void Start()
|
||||
{
|
||||
LeftHome.onClick.AddListener(() =>
|
||||
{
|
||||
LeftHome.interactable = false;
|
||||
GoHome.interactable = false;
|
||||
Control_Air.Instance.AudiosTalk("关空调");
|
||||
Control_Windows.Instance.AudiosTalk("开窗户");
|
||||
Control_Curtain.Instance.AudiosTalk("关窗帘");
|
||||
StartCoroutine(WiatClick());
|
||||
});
|
||||
GoHome.onClick.AddListener(() =>
|
||||
{
|
||||
LeftHome.interactable = false;
|
||||
GoHome.interactable = false;
|
||||
Control_Air.Instance.AudiosTalk("开空调");
|
||||
Control_Windows.Instance.AudiosTalk("关窗户");
|
||||
Control_Curtain.Instance.AudiosTalk("开窗帘");
|
||||
StartCoroutine(WiatClick());
|
||||
});
|
||||
InputName.characterLimit = 6;
|
||||
Chooseoutcome.AddOptions(OpenAir);
|
||||
Choosecondition.onValueChanged.AddListener((value) =>
|
||||
|
@ -101,7 +127,12 @@ public class Control_Linkage : MonoBehaviour
|
|||
|
||||
});
|
||||
}
|
||||
|
||||
IEnumerator WiatClick()
|
||||
{
|
||||
yield return new WaitForSeconds(2.5f);
|
||||
LeftHome.interactable = true;
|
||||
GoHome.interactable = true;
|
||||
}
|
||||
public void EnterChoose()
|
||||
{
|
||||
bool issame = false;
|
||||
|
|
Loading…
Reference in New Issue