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}
|
CloneParent: {fileID: 1932584259}
|
||||||
Backbt: {fileID: 770405383}
|
Backbt: {fileID: 770405383}
|
||||||
Tips: {fileID: 257355421}
|
Tips: {fileID: 257355421}
|
||||||
|
LeftHome: {fileID: 2082583473}
|
||||||
|
GoHome: {fileID: 316855989}
|
||||||
--- !u!114 &631763064
|
--- !u!114 &631763064
|
||||||
MonoBehaviour:
|
MonoBehaviour:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
|
@ -22542,7 +22544,7 @@ GameObject:
|
||||||
m_Icon: {fileID: 0}
|
m_Icon: {fileID: 0}
|
||||||
m_NavMeshLayer: 0
|
m_NavMeshLayer: 0
|
||||||
m_StaticEditorFlags: 0
|
m_StaticEditorFlags: 0
|
||||||
m_IsActive: 0
|
m_IsActive: 1
|
||||||
--- !u!224 &1329231552
|
--- !u!224 &1329231552
|
||||||
RectTransform:
|
RectTransform:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
|
|
|
@ -69,6 +69,10 @@ public class ClickModelType : MonoBehaviour
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public GameObject LinkPanel;
|
public GameObject LinkPanel;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
/// 一键模式面板
|
||||||
|
/// </summary>
|
||||||
|
public GameObject Oneclickmode;
|
||||||
|
/// <summary>
|
||||||
/// 当前区域类型
|
/// 当前区域类型
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public Transform regionType;
|
public Transform regionType;
|
||||||
|
@ -109,6 +113,7 @@ public class ClickModelType : MonoBehaviour
|
||||||
AirPanel.SetActive(false);
|
AirPanel.SetActive(false);
|
||||||
TvPanel.SetActive(false);
|
TvPanel.SetActive(false);
|
||||||
LinkPanel.SetActive(false);
|
LinkPanel.SetActive(false);
|
||||||
|
Oneclickmode.SetActive(false);
|
||||||
Control_Light.Instance.LightsModel = new List<Transform>();
|
Control_Light.Instance.LightsModel = new List<Transform>();
|
||||||
List<ClickModelType> clickModelTypes = FindObjectsOfType<ClickModelType>().ToList();
|
List<ClickModelType> clickModelTypes = FindObjectsOfType<ClickModelType>().ToList();
|
||||||
for (int i = 0; i < clickModelTypes.Count; i++)
|
for (int i = 0; i < clickModelTypes.Count; i++)
|
||||||
|
@ -128,6 +133,7 @@ public class ClickModelType : MonoBehaviour
|
||||||
TvPanel.SetActive(false);
|
TvPanel.SetActive(false);
|
||||||
CameraPanel.SetActive(false);
|
CameraPanel.SetActive(false);
|
||||||
LinkPanel.SetActive(false);
|
LinkPanel.SetActive(false);
|
||||||
|
Oneclickmode.SetActive(false);
|
||||||
Control_Curtain.Instance.curtain = transform;
|
Control_Curtain.Instance.curtain = transform;
|
||||||
}
|
}
|
||||||
else if (SelectModel.Instance.region == region && typeoffurniture == Typeoffurniture.窗户)
|
else if (SelectModel.Instance.region == region && typeoffurniture == Typeoffurniture.窗户)
|
||||||
|
@ -140,6 +146,7 @@ public class ClickModelType : MonoBehaviour
|
||||||
TvPanel.SetActive(false);
|
TvPanel.SetActive(false);
|
||||||
CameraPanel.SetActive(false);
|
CameraPanel.SetActive(false);
|
||||||
LinkPanel.SetActive(false);
|
LinkPanel.SetActive(false);
|
||||||
|
Oneclickmode.SetActive(false);
|
||||||
}
|
}
|
||||||
else if (SelectModel.Instance.region == region && typeoffurniture == Typeoffurniture.空调)
|
else if (SelectModel.Instance.region == region && typeoffurniture == Typeoffurniture.空调)
|
||||||
{
|
{
|
||||||
|
@ -150,6 +157,7 @@ public class ClickModelType : MonoBehaviour
|
||||||
TvPanel.SetActive(false);
|
TvPanel.SetActive(false);
|
||||||
CameraPanel.SetActive(false);
|
CameraPanel.SetActive(false);
|
||||||
LinkPanel.SetActive(false);
|
LinkPanel.SetActive(false);
|
||||||
|
Oneclickmode.SetActive(false);
|
||||||
Control_Air.Instance.airobject = transform;
|
Control_Air.Instance.airobject = transform;
|
||||||
}
|
}
|
||||||
else if (SelectModel.Instance.region == region && typeoffurniture == Typeoffurniture.电视)
|
else if (SelectModel.Instance.region == region && typeoffurniture == Typeoffurniture.电视)
|
||||||
|
@ -161,6 +169,7 @@ public class ClickModelType : MonoBehaviour
|
||||||
TvPanel.SetActive(true);
|
TvPanel.SetActive(true);
|
||||||
CameraPanel.SetActive(false);
|
CameraPanel.SetActive(false);
|
||||||
LinkPanel.SetActive(false);
|
LinkPanel.SetActive(false);
|
||||||
|
Oneclickmode.SetActive(false);
|
||||||
Control_Tv.Instance.Tv = transform;
|
Control_Tv.Instance.Tv = transform;
|
||||||
}
|
}
|
||||||
else if (SelectModel.Instance.region == region && typeoffurniture == Typeoffurniture.摄像头)
|
else if (SelectModel.Instance.region == region && typeoffurniture == Typeoffurniture.摄像头)
|
||||||
|
@ -172,6 +181,7 @@ public class ClickModelType : MonoBehaviour
|
||||||
TvPanel.SetActive(false);
|
TvPanel.SetActive(false);
|
||||||
CameraPanel.SetActive(true);
|
CameraPanel.SetActive(true);
|
||||||
LinkPanel.SetActive(false);
|
LinkPanel.SetActive(false);
|
||||||
|
Oneclickmode.SetActive(false);
|
||||||
//Control_Camera.Instance.Tv = transform;
|
//Control_Camera.Instance.Tv = transform;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,7 +4,7 @@ using TMPro;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
using UnityEngine.UI;
|
using UnityEngine.UI;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 设置联动
|
/// 设置联动/设置一键模式
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class Control_Linkage : MonoBehaviour
|
public class Control_Linkage : MonoBehaviour
|
||||||
{
|
{
|
||||||
|
@ -64,8 +64,34 @@ public class Control_Linkage : MonoBehaviour
|
||||||
/// 创建数量上限提示
|
/// 创建数量上限提示
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public GameObject Tips;
|
public GameObject Tips;
|
||||||
|
/// <summary>
|
||||||
|
/// 离家
|
||||||
|
/// </summary>
|
||||||
|
public Button LeftHome;
|
||||||
|
/// <summary>
|
||||||
|
/// 回家
|
||||||
|
/// </summary>
|
||||||
|
public Button GoHome;
|
||||||
void Start()
|
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;
|
InputName.characterLimit = 6;
|
||||||
Chooseoutcome.AddOptions(OpenAir);
|
Chooseoutcome.AddOptions(OpenAir);
|
||||||
Choosecondition.onValueChanged.AddListener((value) =>
|
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()
|
public void EnterChoose()
|
||||||
{
|
{
|
||||||
bool issame = false;
|
bool issame = false;
|
||||||
|
|
Loading…
Reference in New Issue