111
This commit is contained in:
parent
bc73e48aac
commit
f148ef5952
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -1,5 +1,5 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 234f4f63a2ab6bc4bbb42225f5bc84fd
|
||||
guid: fdbac8c0aafffe34ca25ecaf3e519c6a
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 11400000
|
||||
|
|
Binary file not shown.
After Width: | Height: | Size: 2.1 MiB |
|
@ -0,0 +1,123 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 49327c6129cce7443ac57e46c7ffcf2f
|
||||
TextureImporter:
|
||||
internalIDToNameTable: []
|
||||
externalObjects: {}
|
||||
serializedVersion: 12
|
||||
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
|
||||
vTOnly: 0
|
||||
ignoreMasterTextureLimit: 0
|
||||
grayScaleToAlpha: 0
|
||||
generateCubemap: 6
|
||||
cubemapConvolution: 0
|
||||
seamlessCubemap: 0
|
||||
textureFormat: 1
|
||||
maxTextureSize: 2048
|
||||
textureSettings:
|
||||
serializedVersion: 2
|
||||
filterMode: 1
|
||||
aniso: 1
|
||||
mipBias: 0
|
||||
wrapU: 1
|
||||
wrapV: 1
|
||||
wrapW: 0
|
||||
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
|
||||
flipbookRows: 1
|
||||
flipbookColumns: 1
|
||||
maxTextureSizeSet: 0
|
||||
compressionQualitySet: 0
|
||||
textureFormatSet: 0
|
||||
ignorePngGamma: 0
|
||||
applyGammaDecoding: 0
|
||||
cookieLightType: 0
|
||||
platformSettings:
|
||||
- serializedVersion: 3
|
||||
buildTarget: DefaultTexturePlatform
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 3
|
||||
buildTarget: Standalone
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 3
|
||||
buildTarget: Android
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
spriteSheet:
|
||||
serializedVersion: 2
|
||||
sprites: []
|
||||
outline: []
|
||||
physicsShape: []
|
||||
bones: []
|
||||
spriteID: 5e97eb03825dee720800000000000000
|
||||
internalID: 0
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
secondaryTextures: []
|
||||
nameFileIdTable: {}
|
||||
spritePackingTag:
|
||||
pSDRemoveMatte: 0
|
||||
pSDShowRemoveMatteOption: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
Binary file not shown.
After Width: | Height: | Size: 20 KiB |
|
@ -0,0 +1,123 @@
|
|||
fileFormatVersion: 2
|
||||
guid: a30ce5e233c905945b07c2bc72dc1867
|
||||
TextureImporter:
|
||||
internalIDToNameTable: []
|
||||
externalObjects: {}
|
||||
serializedVersion: 12
|
||||
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
|
||||
vTOnly: 0
|
||||
ignoreMasterTextureLimit: 0
|
||||
grayScaleToAlpha: 0
|
||||
generateCubemap: 6
|
||||
cubemapConvolution: 0
|
||||
seamlessCubemap: 0
|
||||
textureFormat: 1
|
||||
maxTextureSize: 2048
|
||||
textureSettings:
|
||||
serializedVersion: 2
|
||||
filterMode: 1
|
||||
aniso: 1
|
||||
mipBias: 0
|
||||
wrapU: 1
|
||||
wrapV: 1
|
||||
wrapW: 0
|
||||
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
|
||||
flipbookRows: 1
|
||||
flipbookColumns: 1
|
||||
maxTextureSizeSet: 0
|
||||
compressionQualitySet: 0
|
||||
textureFormatSet: 0
|
||||
ignorePngGamma: 0
|
||||
applyGammaDecoding: 0
|
||||
cookieLightType: 0
|
||||
platformSettings:
|
||||
- serializedVersion: 3
|
||||
buildTarget: DefaultTexturePlatform
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 3
|
||||
buildTarget: Standalone
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 3
|
||||
buildTarget: Android
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
spriteSheet:
|
||||
serializedVersion: 2
|
||||
sprites: []
|
||||
outline: []
|
||||
physicsShape: []
|
||||
bones: []
|
||||
spriteID: 5e97eb03825dee720800000000000000
|
||||
internalID: 0
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
secondaryTextures: []
|
||||
nameFileIdTable: {}
|
||||
spritePackingTag:
|
||||
pSDRemoveMatte: 0
|
||||
pSDShowRemoveMatteOption: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
Binary file not shown.
After Width: | Height: | Size: 3.8 KiB |
|
@ -0,0 +1,123 @@
|
|||
fileFormatVersion: 2
|
||||
guid: d3d47ec90df84fc4d9981dec01f17ed6
|
||||
TextureImporter:
|
||||
internalIDToNameTable: []
|
||||
externalObjects: {}
|
||||
serializedVersion: 12
|
||||
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
|
||||
vTOnly: 0
|
||||
ignoreMasterTextureLimit: 0
|
||||
grayScaleToAlpha: 0
|
||||
generateCubemap: 6
|
||||
cubemapConvolution: 0
|
||||
seamlessCubemap: 0
|
||||
textureFormat: 1
|
||||
maxTextureSize: 2048
|
||||
textureSettings:
|
||||
serializedVersion: 2
|
||||
filterMode: 1
|
||||
aniso: 1
|
||||
mipBias: 0
|
||||
wrapU: 1
|
||||
wrapV: 1
|
||||
wrapW: 0
|
||||
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
|
||||
flipbookRows: 1
|
||||
flipbookColumns: 1
|
||||
maxTextureSizeSet: 0
|
||||
compressionQualitySet: 0
|
||||
textureFormatSet: 0
|
||||
ignorePngGamma: 0
|
||||
applyGammaDecoding: 0
|
||||
cookieLightType: 0
|
||||
platformSettings:
|
||||
- serializedVersion: 3
|
||||
buildTarget: DefaultTexturePlatform
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 3
|
||||
buildTarget: Standalone
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 3
|
||||
buildTarget: Android
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
spriteSheet:
|
||||
serializedVersion: 2
|
||||
sprites: []
|
||||
outline: []
|
||||
physicsShape: []
|
||||
bones: []
|
||||
spriteID: 5e97eb03825dee720800000000000000
|
||||
internalID: 0
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
secondaryTextures: []
|
||||
nameFileIdTable: {}
|
||||
spritePackingTag:
|
||||
pSDRemoveMatte: 0
|
||||
pSDShowRemoveMatteOption: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
File diff suppressed because it is too large
Load Diff
|
@ -135,11 +135,16 @@ public class Control_Air : MonoBehaviour
|
|||
}
|
||||
public void AudiosTalk(string Talk)
|
||||
{
|
||||
if (Talk.Contains("´ò¿ª¿Õµ÷"))
|
||||
if (Talk.Contains("开空调"))
|
||||
{
|
||||
isOpen = true;
|
||||
OpenAir(isOpen);
|
||||
}
|
||||
if (Talk.Contains("关空调"))
|
||||
{
|
||||
isOpen = false;
|
||||
OpenAir(isOpen);
|
||||
}
|
||||
else if (Talk.Contains("¿Õµ÷ÖÆÀä"))
|
||||
{
|
||||
airwcoolModel.isOn = true;
|
||||
|
|
|
@ -1,19 +1,59 @@
|
|||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
|
||||
public class Control_Camera : MonoBehaviour
|
||||
{
|
||||
/// <summary>
|
||||
/// 摄像头画面
|
||||
///报警设置
|
||||
/// </summary>
|
||||
public GameObject OpenCameras;
|
||||
public Button WaringSetting;
|
||||
/// <summary>
|
||||
/// 报警设置图片
|
||||
/// </summary>
|
||||
public GameObject WaringSetPane;
|
||||
/// <summary>
|
||||
/// 确定按钮
|
||||
/// </summary>
|
||||
public Button EnterBt;
|
||||
/// <summary>
|
||||
/// 控制边界按钮
|
||||
/// </summary>
|
||||
public List<Toggle> toggles;
|
||||
/// <summary>
|
||||
/// 所有的范围碰撞
|
||||
/// </summary>
|
||||
public List<GameObject> allbox;
|
||||
void Start()
|
||||
{
|
||||
|
||||
WaringSetting.onClick.AddListener(() =>
|
||||
{
|
||||
WaringSetPane.SetActive(true);
|
||||
});
|
||||
EnterBt.onClick.AddListener(() =>
|
||||
{
|
||||
if (toggles[0].isOn)
|
||||
{
|
||||
allbox[0].SetActive(toggles[0].isOn);
|
||||
}
|
||||
if (toggles[1].isOn)
|
||||
{
|
||||
allbox[1].SetActive(toggles[1].isOn);
|
||||
}
|
||||
if (toggles[2].isOn)
|
||||
{
|
||||
allbox[2].SetActive(toggles[2].isOn);
|
||||
}
|
||||
if (toggles[3].isOn)
|
||||
{
|
||||
allbox[3].SetActive(toggles[3].isOn);
|
||||
}
|
||||
WaringSetPane.SetActive(false);
|
||||
});
|
||||
}
|
||||
void Update()
|
||||
{
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -57,12 +57,12 @@ public class Control_Curtain : MonoBehaviour
|
|||
}
|
||||
public void AudiosTalk(string Talk)
|
||||
{
|
||||
if (Talk.Contains("打开窗帘"))
|
||||
if (Talk.Contains("开窗帘"))
|
||||
{
|
||||
Open.isOn = true;
|
||||
Opencurtains(true);
|
||||
}
|
||||
else if (Talk.Contains("关闭窗帘"))
|
||||
else if (Talk.Contains("关窗帘"))
|
||||
{
|
||||
Open.isOn = false;
|
||||
Opencurtains(false);
|
||||
|
|
|
@ -4,60 +4,64 @@ using TMPro;
|
|||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
/// <summary>
|
||||
/// 设置联动
|
||||
/// 设置联动
|
||||
/// </summary>
|
||||
public class Control_Linkage : MonoBehaviour
|
||||
{
|
||||
/// <summary>
|
||||
/// 打开电视时联动
|
||||
/// 打开电视时联动
|
||||
/// </summary>
|
||||
public List<string> OpenTV = new List<string>();
|
||||
/// <summary>
|
||||
/// 关闭电视时联动
|
||||
/// 关闭电视时联动
|
||||
/// </summary>
|
||||
public List<string> CloseTV = new List<string>();
|
||||
/// <summary>
|
||||
/// 打开空调时联动
|
||||
/// 打开空调时联动
|
||||
/// </summary>
|
||||
public List<string> OpenAir = new List<string>();
|
||||
/// <summary>
|
||||
/// 关闭空调时联动
|
||||
/// 关闭空调时联动
|
||||
/// </summary>
|
||||
public List<string> CloseAir = new List<string>();
|
||||
/// <summary>
|
||||
/// 保存选择
|
||||
/// 保存选择
|
||||
/// </summary>
|
||||
public Button Enter;
|
||||
/// <summary>
|
||||
/// 选择条件
|
||||
/// 选择条件
|
||||
/// </summary>
|
||||
public TMP_Dropdown Choosecondition;
|
||||
/// <summary>
|
||||
/// 选择结果
|
||||
/// 选择结果
|
||||
/// </summary>
|
||||
public TMP_Dropdown Chooseoutcome;
|
||||
/// <summary>
|
||||
/// 输入的名称
|
||||
/// 输入的名称
|
||||
/// </summary>
|
||||
public TMP_InputField InputName;
|
||||
/// <summary>
|
||||
/// 设置面板
|
||||
/// 设置面板
|
||||
/// </summary>
|
||||
public GameObject SetPanel;
|
||||
/// <summary>
|
||||
/// 保存后显示的面板
|
||||
/// 保存后显示的面板
|
||||
/// </summary>
|
||||
public GameObject ClickPanel;
|
||||
/// <summary>
|
||||
/// 克隆的按钮
|
||||
/// 克隆的按钮
|
||||
/// </summary>
|
||||
public GameObject CloneButton;
|
||||
/// <summary>
|
||||
/// 克隆的父物体
|
||||
/// 克隆的父物体
|
||||
/// </summary>
|
||||
public Transform CloneParent;
|
||||
/// <summary>
|
||||
/// 创建数量上限提示
|
||||
/// 返回按钮
|
||||
/// </summary>
|
||||
public GameObject Backbt;
|
||||
/// <summary>
|
||||
/// 创建数量上限提示
|
||||
/// </summary>
|
||||
public GameObject Tips;
|
||||
void Start()
|
||||
|
@ -69,25 +73,26 @@ public class Control_Linkage : MonoBehaviour
|
|||
Chooseoutcome.options = new List<TMP_Dropdown.OptionData>();
|
||||
switch (Choosecondition.captionText.text)
|
||||
{
|
||||
case "开空调":
|
||||
case "开空调":
|
||||
Chooseoutcome.AddOptions(OpenAir);
|
||||
break;
|
||||
case "关空调":
|
||||
case "关空调":
|
||||
Chooseoutcome.AddOptions(CloseAir);
|
||||
break;
|
||||
case "开电视":
|
||||
case "开电视":
|
||||
Chooseoutcome.AddOptions(OpenTV);
|
||||
break;
|
||||
case "关电视":
|
||||
case "关电视":
|
||||
Chooseoutcome.AddOptions(CloseTV);
|
||||
break;
|
||||
}
|
||||
});
|
||||
Enter.onClick.AddListener(() =>
|
||||
{
|
||||
if (CloneParent.childCount > 5)
|
||||
if (CloneParent.childCount > 7)
|
||||
{
|
||||
Tips.SetActive(false);
|
||||
Tips.GetComponentInChildren<TextMeshProUGUI>().text = "创建联动数量超过上限,请删除";
|
||||
StartCoroutine(WaitHide());
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -99,11 +104,37 @@ public class Control_Linkage : MonoBehaviour
|
|||
|
||||
public void EnterChoose()
|
||||
{
|
||||
GameObject go = Instantiate(CloneButton, CloneParent.transform);
|
||||
go.name = Choosecondition.captionText.text + "|" + Chooseoutcome.captionText.text;
|
||||
go.GetComponentInChildren<TextMeshProUGUI>().text = InputName.text;
|
||||
go.SetActive(true);
|
||||
SetPanel.SetActive(false);
|
||||
ClickPanel.SetActive(true);
|
||||
bool issame = false;
|
||||
for (int i = 0; i < CloneParent.childCount; i++)
|
||||
{
|
||||
if (CloneParent.GetChild(i).name == Choosecondition.captionText.text + "|" + Chooseoutcome.captionText.text
|
||||
|| CloneParent.GetChild(i).GetChild(0).GetComponent<TextMeshProUGUI>().text == InputName.text
|
||||
|| InputName.text == "")
|
||||
{
|
||||
issame = true;
|
||||
}
|
||||
}
|
||||
if (!issame)
|
||||
{
|
||||
Backbt.SetActive(true);
|
||||
GameObject go = Instantiate(CloneButton, CloneParent.transform);
|
||||
go.name = Choosecondition.captionText.text + "|" + Chooseoutcome.captionText.text;
|
||||
go.GetComponentInChildren<TextMeshProUGUI>().text = InputName.text;
|
||||
go.SetActive(true);
|
||||
SetPanel.SetActive(false);
|
||||
ClickPanel.SetActive(true);
|
||||
}
|
||||
else
|
||||
{
|
||||
Tips.GetComponentInChildren<TextMeshProUGUI>().text = "输入的名称为空、重复或创建的联动与已创建的联动相同,请修改!";
|
||||
StartCoroutine(WaitHide());
|
||||
}
|
||||
}
|
||||
|
||||
IEnumerator WaitHide()
|
||||
{
|
||||
Tips.SetActive(true);
|
||||
yield return new WaitForSeconds(1.5f);
|
||||
Tips.SetActive(false);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -42,12 +42,12 @@ public class Control_Tv : MonoBehaviour
|
|||
}
|
||||
public void AudiosTalk(string Talk)
|
||||
{
|
||||
if (Talk.Contains("打开电视"))
|
||||
if (Talk.Contains("开电视"))
|
||||
{
|
||||
isopen = !isopen;
|
||||
OpenTvs(isopen);
|
||||
}
|
||||
else if (Talk.Contains("关闭电视"))
|
||||
else if (Talk.Contains("关电视"))
|
||||
{
|
||||
isopen = !isopen;
|
||||
OpenTvs(isopen);
|
||||
|
|
|
@ -58,12 +58,12 @@ public class Control_Windows : MonoBehaviour
|
|||
}
|
||||
public void AudiosTalk(string Talk)
|
||||
{
|
||||
if (Talk.Contains("打开窗户"))
|
||||
if (Talk.Contains("开窗户"))
|
||||
{
|
||||
open.isOn = true;
|
||||
Openwindows(true);
|
||||
}
|
||||
else if (Talk.Contains("关闭窗户"))
|
||||
else if (Talk.Contains("关窗户"))
|
||||
{
|
||||
close.isOn = true;
|
||||
Openwindows(false);
|
||||
|
|
|
@ -0,0 +1,71 @@
|
|||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
|
||||
public class LinkClick : MonoBehaviour
|
||||
{
|
||||
public Button delte;
|
||||
void Start()
|
||||
{
|
||||
GetComponent<Button>().onClick.AddListener(() =>
|
||||
{
|
||||
UseLink(transform.name.Split('|'));
|
||||
});
|
||||
delte.onClick.AddListener(() =>
|
||||
{
|
||||
Destroy(gameObject);
|
||||
});
|
||||
}
|
||||
|
||||
private void UseLink(string[] type)
|
||||
{
|
||||
if (type[0].Equals("开空调"))
|
||||
{
|
||||
Control_Air.Instance.AudiosTalk("开空调");
|
||||
if (type[1].Equals("关窗"))
|
||||
{
|
||||
Control_Windows.Instance.AudiosTalk("关窗户");
|
||||
}
|
||||
if (type[1].Equals("关窗帘"))
|
||||
{
|
||||
Control_Curtain.Instance.AudiosTalk("关窗帘");
|
||||
}
|
||||
}
|
||||
if (type[0].Equals("关空调"))
|
||||
{
|
||||
Control_Air.Instance.AudiosTalk("关空调");
|
||||
if (type[1].Equals("开窗"))
|
||||
{
|
||||
Control_Windows.Instance.AudiosTalk("开窗户");
|
||||
}
|
||||
if (type[1].Equals("开窗帘"))
|
||||
{
|
||||
Control_Curtain.Instance.AudiosTalk("开窗帘");
|
||||
}
|
||||
}
|
||||
if (type[0].Equals("开电视"))
|
||||
{
|
||||
Control_Tv.Instance.AudiosTalk("开电视");
|
||||
if (type[1].Equals("关灯"))
|
||||
{
|
||||
Control_Light.Instance.AudiosContorl("关灯");
|
||||
}
|
||||
if (type[1].Equals("关窗帘"))
|
||||
{
|
||||
Control_Curtain.Instance.AudiosTalk("关窗帘");
|
||||
}
|
||||
}
|
||||
if (type[0].Equals("关电视"))
|
||||
{
|
||||
if (type[1].Equals("开灯"))
|
||||
{
|
||||
Control_Light.Instance.AudiosContorl("开灯");
|
||||
}
|
||||
if (type[1].Equals("开窗帘"))
|
||||
{
|
||||
Control_Curtain.Instance.AudiosTalk("开窗帘");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,11 @@
|
|||
fileFormatVersion: 2
|
||||
guid: aa6efecd2f7b33c49b0fc73ddc1607bb
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -0,0 +1,30 @@
|
|||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
public class SetBoxCollider : MonoBehaviour
|
||||
{
|
||||
public GameObject Tips;
|
||||
|
||||
private void OnTriggerStay(Collider other)
|
||||
{
|
||||
if (other.tag == "Player")
|
||||
{
|
||||
Tips.SetActive(true);
|
||||
}
|
||||
}
|
||||
//private void OnTriggerEnter(Collider other)
|
||||
//{
|
||||
// if (other.tag == "Player")
|
||||
// {
|
||||
// Tips.SetActive(true);
|
||||
// }
|
||||
//}
|
||||
private void OnTriggerExit(Collider other)
|
||||
{
|
||||
if (other.tag == "Player")
|
||||
{
|
||||
Tips.SetActive(false);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,11 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 4bbf612bae635fb4b85e31b73ba583ff
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue