修改功能提交
This commit is contained in:
parent
6e5cfcb210
commit
b3486d498f
|
@ -3054,6 +3054,8 @@ GameObject:
|
||||||
- component: {fileID: 110525853}
|
- component: {fileID: 110525853}
|
||||||
- component: {fileID: 110525854}
|
- component: {fileID: 110525854}
|
||||||
- component: {fileID: 110525855}
|
- component: {fileID: 110525855}
|
||||||
|
- component: {fileID: 110525857}
|
||||||
|
- component: {fileID: 110525856}
|
||||||
m_Layer: 0
|
m_Layer: 0
|
||||||
m_Name: "\u8840\u538B\u8BA1"
|
m_Name: "\u8840\u538B\u8BA1"
|
||||||
m_TagString: Untagged
|
m_TagString: Untagged
|
||||||
|
@ -3146,6 +3148,164 @@ BoxCollider:
|
||||||
serializedVersion: 2
|
serializedVersion: 2
|
||||||
m_Size: {x: 0.3264626, y: 0.37149766, z: 0.32778472}
|
m_Size: {x: 0.3264626, y: 0.37149766, z: 0.32778472}
|
||||||
m_Center: {x: -0.7275028, y: 0.13686906, z: 0.16389233}
|
m_Center: {x: -0.7275028, y: 0.13686906, z: 0.16389233}
|
||||||
|
--- !u!114 &110525856
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 110525852}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: 5009cbb7e54994bb586cde7a70f34e6b, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
highlightOnHover: 1
|
||||||
|
triggerMode: 0
|
||||||
|
raycastCamera: {fileID: 415140999}
|
||||||
|
raycastSource: 0
|
||||||
|
minDistance: 0
|
||||||
|
maxDistance: 0
|
||||||
|
respectUI: 1
|
||||||
|
volumeLayerMask:
|
||||||
|
serializedVersion: 2
|
||||||
|
m_Bits: 0
|
||||||
|
selectOnClick: 0
|
||||||
|
selectedProfile: {fileID: 0}
|
||||||
|
selectedAndHighlightedProfile: {fileID: 0}
|
||||||
|
singleSelection: 0
|
||||||
|
toggle: 0
|
||||||
|
--- !u!114 &110525857
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 110525852}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: 888380afc233049ce9e618f9f36c8ba8, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
profile: {fileID: 0}
|
||||||
|
profileSync: 0
|
||||||
|
previewInEditor: 1
|
||||||
|
camerasLayerMask:
|
||||||
|
serializedVersion: 2
|
||||||
|
m_Bits: 4294967295
|
||||||
|
effectGroup: 0
|
||||||
|
effectGroupLayer:
|
||||||
|
serializedVersion: 2
|
||||||
|
m_Bits: 4294967295
|
||||||
|
effectNameFilter:
|
||||||
|
combineMeshes: 0
|
||||||
|
alphaCutOff: 0
|
||||||
|
cullBackFaces: 1
|
||||||
|
ignoreObjectVisibility: 0
|
||||||
|
reflectionProbes: 0
|
||||||
|
GPUInstancing: 1
|
||||||
|
depthClip: 0
|
||||||
|
cameraDistanceFade: 0
|
||||||
|
cameraDistanceFadeNear: 0
|
||||||
|
cameraDistanceFadeFar: 1000
|
||||||
|
normalsOption: 0
|
||||||
|
ignore: 0
|
||||||
|
_highlighted: 0
|
||||||
|
fadeInDuration: 0
|
||||||
|
fadeOutDuration: 0
|
||||||
|
flipY: 0
|
||||||
|
constantWidth: 1
|
||||||
|
subMeshMask: -1
|
||||||
|
overlay: 0
|
||||||
|
overlayColor: {r: 1, g: 0.92156863, b: 0.015686275, a: 1}
|
||||||
|
overlayAnimationSpeed: 1
|
||||||
|
overlayMinIntensity: 0.5
|
||||||
|
overlayBlending: 1
|
||||||
|
overlayTexture: {fileID: 0}
|
||||||
|
overlayTextureScale: 1
|
||||||
|
outline: 1
|
||||||
|
outlineColor: {r: 0, g: 0.83137256, b: 1, a: 1}
|
||||||
|
outlineWidth: 0.2
|
||||||
|
outlineQuality: 3
|
||||||
|
outlineDownsampling: 2
|
||||||
|
outlineVisibility: 0
|
||||||
|
glowBlendMode: 0
|
||||||
|
outlineOptimalBlit: 1
|
||||||
|
outlineBlitDebug: 0
|
||||||
|
outlineIndependent: 0
|
||||||
|
glow: 0
|
||||||
|
glowWidth: 0.4
|
||||||
|
glowQuality: 3
|
||||||
|
glowDownsampling: 2
|
||||||
|
glowHQColor: {r: 0.64, g: 1, b: 0, a: 1}
|
||||||
|
glowDithering: 1
|
||||||
|
glowMagicNumber1: 0.75
|
||||||
|
glowMagicNumber2: 0.5
|
||||||
|
glowAnimationSpeed: 1
|
||||||
|
glowVisibility: 0
|
||||||
|
glowOptimalBlit: 1
|
||||||
|
glowBlitDebug: 0
|
||||||
|
glowBlendPasses: 1
|
||||||
|
glowPasses:
|
||||||
|
- offset: 4
|
||||||
|
alpha: 0.1
|
||||||
|
color: {r: 0.64, g: 1, b: 0, a: 1}
|
||||||
|
- offset: 3
|
||||||
|
alpha: 0.2
|
||||||
|
color: {r: 0.64, g: 1, b: 0, a: 1}
|
||||||
|
- offset: 2
|
||||||
|
alpha: 0.3
|
||||||
|
color: {r: 0.64, g: 1, b: 0, a: 1}
|
||||||
|
- offset: 1
|
||||||
|
alpha: 0.4
|
||||||
|
color: {r: 0.64, g: 1, b: 0, a: 1}
|
||||||
|
glowIgnoreMask: 0
|
||||||
|
innerGlow: 0
|
||||||
|
innerGlowWidth: 1
|
||||||
|
innerGlowColor: {r: 1, g: 1, b: 1, a: 1}
|
||||||
|
innerGlowVisibility: 0
|
||||||
|
targetFX: 0
|
||||||
|
targetFXTexture: {fileID: 0}
|
||||||
|
targetFXColor: {r: 1, g: 1, b: 1, a: 1}
|
||||||
|
targetFXCenter: {fileID: 0}
|
||||||
|
targetFXRotationSpeed: 50
|
||||||
|
targetFXInitialScale: 4
|
||||||
|
targetFXEndScale: 1.5
|
||||||
|
targetFXScaleToRenderBounds: 1
|
||||||
|
targetFXAlignToGround: 0
|
||||||
|
targetFXFadePower: 32
|
||||||
|
targetFXGroundMaxDistance: 10
|
||||||
|
targetFXGroundLayerMask:
|
||||||
|
serializedVersion: 2
|
||||||
|
m_Bits: 4294967295
|
||||||
|
targetFXTransitionDuration: 0.5
|
||||||
|
targetFXStayDuration: 1.5
|
||||||
|
targetFXVisibility: 1
|
||||||
|
seeThrough: 2
|
||||||
|
seeThroughOccluderMask:
|
||||||
|
serializedVersion: 2
|
||||||
|
m_Bits: 4294967295
|
||||||
|
seeThroughOccluderThreshold: 0.3
|
||||||
|
seeThroughOccluderMaskAccurate: 0
|
||||||
|
seeThroughOccluderCheckInterval: 1
|
||||||
|
seeThroughOccluderCheckIndividualObjects: 0
|
||||||
|
seeThroughDepthOffset: 0
|
||||||
|
seeThroughMaxDepth: 0
|
||||||
|
seeThroughIntensity: 0.8
|
||||||
|
seeThroughTintAlpha: 0.5
|
||||||
|
seeThroughTintColor: {r: 1, g: 0, b: 0, a: 1}
|
||||||
|
seeThroughNoise: 1
|
||||||
|
seeThroughBorder: 0
|
||||||
|
seeThroughBorderColor: {r: 0, g: 0, b: 0, a: 1}
|
||||||
|
seeThroughBorderOnly: 0
|
||||||
|
seeThroughBorderWidth: 0.45
|
||||||
|
seeThroughOrdered: 0
|
||||||
|
rmsCount: 1
|
||||||
|
hitFxInitialIntensity: 0
|
||||||
|
hitFxMode: 0
|
||||||
|
hitFxFadeOutDuration: 0.25
|
||||||
|
hitFxColor: {r: 1, g: 1, b: 1, a: 1}
|
||||||
|
hitFxRadius: 0.5
|
||||||
--- !u!1 &115528769
|
--- !u!1 &115528769
|
||||||
GameObject:
|
GameObject:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
|
@ -10597,7 +10757,7 @@ MonoBehaviour:
|
||||||
cameraDistanceFadeFar: 1000
|
cameraDistanceFadeFar: 1000
|
||||||
normalsOption: 0
|
normalsOption: 0
|
||||||
ignore: 0
|
ignore: 0
|
||||||
_highlighted: 1
|
_highlighted: 0
|
||||||
fadeInDuration: 0
|
fadeInDuration: 0
|
||||||
fadeOutDuration: 0
|
fadeOutDuration: 0
|
||||||
flipY: 0
|
flipY: 0
|
||||||
|
@ -10611,8 +10771,8 @@ MonoBehaviour:
|
||||||
overlayTexture: {fileID: 0}
|
overlayTexture: {fileID: 0}
|
||||||
overlayTextureScale: 1
|
overlayTextureScale: 1
|
||||||
outline: 1
|
outline: 1
|
||||||
outlineColor: {r: 1, g: 0.8607794, b: 0, a: 1}
|
outlineColor: {r: 0, g: 0.83137256, b: 1, a: 1}
|
||||||
outlineWidth: 0.45
|
outlineWidth: 0.2
|
||||||
outlineQuality: 3
|
outlineQuality: 3
|
||||||
outlineDownsampling: 2
|
outlineDownsampling: 2
|
||||||
outlineVisibility: 0
|
outlineVisibility: 0
|
||||||
|
@ -10707,6 +10867,33 @@ MeshCollider:
|
||||||
m_Convex: 0
|
m_Convex: 0
|
||||||
m_CookingOptions: 30
|
m_CookingOptions: 30
|
||||||
m_Mesh: {fileID: 2796407870748668513, guid: f88f2f6a4f6fcae449947d10f7fdd370, type: 3}
|
m_Mesh: {fileID: 2796407870748668513, guid: f88f2f6a4f6fcae449947d10f7fdd370, type: 3}
|
||||||
|
--- !u!114 &409581590
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 409581582}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: 5009cbb7e54994bb586cde7a70f34e6b, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
highlightOnHover: 1
|
||||||
|
triggerMode: 0
|
||||||
|
raycastCamera: {fileID: 415140999}
|
||||||
|
raycastSource: 0
|
||||||
|
minDistance: 0
|
||||||
|
maxDistance: 0
|
||||||
|
respectUI: 1
|
||||||
|
volumeLayerMask:
|
||||||
|
serializedVersion: 2
|
||||||
|
m_Bits: 0
|
||||||
|
selectOnClick: 0
|
||||||
|
selectedProfile: {fileID: 0}
|
||||||
|
selectedAndHighlightedProfile: {fileID: 0}
|
||||||
|
singleSelection: 0
|
||||||
|
toggle: 0
|
||||||
--- !u!1 &414295510
|
--- !u!1 &414295510
|
||||||
GameObject:
|
GameObject:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
|
@ -36879,7 +37066,7 @@ MonoBehaviour:
|
||||||
cameraDistanceFadeFar: 1000
|
cameraDistanceFadeFar: 1000
|
||||||
normalsOption: 0
|
normalsOption: 0
|
||||||
ignore: 0
|
ignore: 0
|
||||||
_highlighted: 1
|
_highlighted: 0
|
||||||
fadeInDuration: 0
|
fadeInDuration: 0
|
||||||
fadeOutDuration: 0
|
fadeOutDuration: 0
|
||||||
flipY: 0
|
flipY: 0
|
||||||
|
@ -36893,8 +37080,8 @@ MonoBehaviour:
|
||||||
overlayTexture: {fileID: 0}
|
overlayTexture: {fileID: 0}
|
||||||
overlayTextureScale: 1
|
overlayTextureScale: 1
|
||||||
outline: 1
|
outline: 1
|
||||||
outlineColor: {r: 1, g: 0.85882354, b: 0, a: 1}
|
outlineColor: {r: 0, g: 0.83137256, b: 1, a: 1}
|
||||||
outlineWidth: 0.45
|
outlineWidth: 0.2
|
||||||
outlineQuality: 3
|
outlineQuality: 3
|
||||||
outlineDownsampling: 2
|
outlineDownsampling: 2
|
||||||
outlineVisibility: 0
|
outlineVisibility: 0
|
||||||
|
@ -36975,6 +37162,33 @@ MonoBehaviour:
|
||||||
hitFxFadeOutDuration: 0.25
|
hitFxFadeOutDuration: 0.25
|
||||||
hitFxColor: {r: 1, g: 1, b: 1, a: 1}
|
hitFxColor: {r: 1, g: 1, b: 1, a: 1}
|
||||||
hitFxRadius: 0.5
|
hitFxRadius: 0.5
|
||||||
|
--- !u!114 &1737704576
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 1737704570}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: 5009cbb7e54994bb586cde7a70f34e6b, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
highlightOnHover: 1
|
||||||
|
triggerMode: 0
|
||||||
|
raycastCamera: {fileID: 415140999}
|
||||||
|
raycastSource: 0
|
||||||
|
minDistance: 0
|
||||||
|
maxDistance: 0
|
||||||
|
respectUI: 1
|
||||||
|
volumeLayerMask:
|
||||||
|
serializedVersion: 2
|
||||||
|
m_Bits: 0
|
||||||
|
selectOnClick: 0
|
||||||
|
selectedProfile: {fileID: 0}
|
||||||
|
selectedAndHighlightedProfile: {fileID: 0}
|
||||||
|
singleSelection: 0
|
||||||
|
toggle: 0
|
||||||
--- !u!1 &1738432952
|
--- !u!1 &1738432952
|
||||||
GameObject:
|
GameObject:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -118,7 +118,7 @@ MonoBehaviour:
|
||||||
value: 0
|
value: 0
|
||||||
postExposure:
|
postExposure:
|
||||||
overrideState: 1
|
overrideState: 1
|
||||||
value: 1
|
value: 1.5
|
||||||
contrast:
|
contrast:
|
||||||
overrideState: 1
|
overrideState: 1
|
||||||
value: 15
|
value: 15
|
||||||
|
|
|
@ -4,7 +4,6 @@ using System.Collections.Generic;
|
||||||
using TMPro;
|
using TMPro;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
using UnityEngine.UI;
|
using UnityEngine.UI;
|
||||||
using static System.Net.Mime.MediaTypeNames;
|
|
||||||
|
|
||||||
public class TipMangner : MonoBehaviour
|
public class TipMangner : MonoBehaviour
|
||||||
{
|
{
|
||||||
|
|
|
@ -0,0 +1,99 @@
|
||||||
|
using HighlightPlus;
|
||||||
|
using System.Collections;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using UnityEditor;
|
||||||
|
using UnityEngine;
|
||||||
|
|
||||||
|
public enum ModelType
|
||||||
|
{
|
||||||
|
None,
|
||||||
|
灯,
|
||||||
|
空调,
|
||||||
|
电视,
|
||||||
|
窗帘,
|
||||||
|
窗户
|
||||||
|
}
|
||||||
|
public class ControlManager : MonoBehaviour
|
||||||
|
{
|
||||||
|
public static ControlManager instance;
|
||||||
|
public Transform windows;
|
||||||
|
public Transform air;
|
||||||
|
public Transform lights;
|
||||||
|
public Transform curtain;
|
||||||
|
public Transform Tv;
|
||||||
|
public RectTransform HightUi;
|
||||||
|
public ModelType modeltypestate = ModelType.None;
|
||||||
|
private void Awake()
|
||||||
|
{
|
||||||
|
instance = this;
|
||||||
|
}
|
||||||
|
void Start()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public void Getfurniture()
|
||||||
|
{
|
||||||
|
StartCoroutine(WaitGet());
|
||||||
|
}
|
||||||
|
public IEnumerator WaitGet()
|
||||||
|
{
|
||||||
|
yield return new WaitForSeconds(0.2f);
|
||||||
|
switch (SelectModel.Instance.region)
|
||||||
|
{
|
||||||
|
case Region.环境控制:
|
||||||
|
air = Furniture_Manager.Instance.FindHome("环境", "空调");
|
||||||
|
windows = Furniture_Manager.Instance.FindHome("环境", "窗户");
|
||||||
|
lights = Furniture_Manager.Instance.FindHome("环境", "灯");
|
||||||
|
curtain = Furniture_Manager.Instance.FindHome("环境", "窗帘");
|
||||||
|
break;
|
||||||
|
case Region.设备互联与系统控制:
|
||||||
|
air = Furniture_Manager.Instance.FindHome("互联", "空调");
|
||||||
|
Tv = Furniture_Manager.Instance.FindHome("互联", "电视");
|
||||||
|
windows = Furniture_Manager.Instance.FindHome("互联", "窗户");
|
||||||
|
lights = Furniture_Manager.Instance.FindHome("互联", "灯");
|
||||||
|
curtain = Furniture_Manager.Instance.FindHome("互联", "窗帘");
|
||||||
|
break;
|
||||||
|
case Region.智能家电与维护:
|
||||||
|
air = Furniture_Manager.Instance.FindHome("家电", "空调");
|
||||||
|
Tv = Furniture_Manager.Instance.FindHome("家电", "电视");
|
||||||
|
windows = Furniture_Manager.Instance.FindHome("家电", "窗户");
|
||||||
|
lights = Furniture_Manager.Instance.FindHome("家电", "灯");
|
||||||
|
curtain = Furniture_Manager.Instance.FindHome("家电", "窗帘");
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
lights.GetComponent<BoxCollider>().enabled = true;
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// 获取物体的宽度和高度 rect[0] 高 rect[1] 宽
|
||||||
|
/// </summary>
|
||||||
|
/// <returns></returns>
|
||||||
|
public List<float> GetRect(Transform transform)
|
||||||
|
{
|
||||||
|
List<float> rect = new List<float>();
|
||||||
|
RectTransform trans = transform.GetComponent<RectTransform>();
|
||||||
|
rect.Add(trans.rect.height);
|
||||||
|
rect.Add(trans.rect.width);
|
||||||
|
return rect;
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// 设置高亮UI的父物体
|
||||||
|
/// </summary>
|
||||||
|
public void SetHightParent(Transform parent, Vector2 vector2 = new Vector2())
|
||||||
|
{
|
||||||
|
if (vector2 != Vector2.zero)
|
||||||
|
{
|
||||||
|
HightUi.gameObject.SetActive(true);
|
||||||
|
HightUi.parent = parent;
|
||||||
|
HightUi.localPosition = Vector3.zero;
|
||||||
|
HightUi.sizeDelta = vector2;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
HightUi.gameObject.SetActive(true);
|
||||||
|
HightUi.parent = parent;
|
||||||
|
HightUi.localPosition = Vector3.zero;
|
||||||
|
HightUi.sizeDelta = new Vector2(GetRect(parent)[1], GetRect(parent)[0]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,11 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 78008e9c507916f45a11b71f22fab397
|
||||||
|
MonoImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
defaultReferences: []
|
||||||
|
executionOrder: 0
|
||||||
|
icon: {instanceID: 0}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
|
@ -1,9 +1,12 @@
|
||||||
|
using HighlightPlus;
|
||||||
using Newtonsoft.Json.Linq;
|
using Newtonsoft.Json.Linq;
|
||||||
using System.Collections;
|
using System.Collections;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using TMPro;
|
using TMPro;
|
||||||
|
using UnityEditor;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
using UnityEngine.UI;
|
using UnityEngine.UI;
|
||||||
|
using static UnityEngine.GridBrushBase;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 灯光控制
|
/// 灯光控制
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -40,16 +43,42 @@ public class Control_Light : MonoBehaviour
|
||||||
public Toggle cool;
|
public Toggle cool;
|
||||||
public Toggle warm;
|
public Toggle warm;
|
||||||
public Toggle Incandescent;
|
public Toggle Incandescent;
|
||||||
|
/// <summary>
|
||||||
|
/// 灯光强度按钮遮罩
|
||||||
|
/// </summary>
|
||||||
|
public GameObject MaskLightbrightness;
|
||||||
|
/// <summary>
|
||||||
|
/// 开关灯遮罩
|
||||||
|
/// </summary>
|
||||||
|
public GameObject MaskOpen;
|
||||||
|
/// <summary>
|
||||||
|
/// 灯光类型遮罩
|
||||||
|
/// </summary>
|
||||||
|
public GameObject Masklighttype;
|
||||||
|
/// <summary>
|
||||||
|
/// 关闭按钮
|
||||||
|
/// </summary>
|
||||||
|
public Button Close;
|
||||||
|
int coolclick = 0;
|
||||||
|
int warmclick = 0;
|
||||||
|
int incandescent = 0;
|
||||||
private void Awake()
|
private void Awake()
|
||||||
{
|
{
|
||||||
Instance = this;
|
Instance = this;
|
||||||
}
|
}
|
||||||
void Start()
|
void Start()
|
||||||
{
|
{
|
||||||
|
|
||||||
|
cool.onValueChanged.AddListener((a) => { coolclick++; });
|
||||||
|
warm.onValueChanged.AddListener((a) => { warmclick++; });
|
||||||
|
Incandescent.onValueChanged.AddListener((a) => { incandescent++; });
|
||||||
Open.onClick.AddListener(() =>
|
Open.onClick.AddListener(() =>
|
||||||
{
|
{
|
||||||
Is_Open = !Is_Open;
|
Is_Open = !Is_Open;
|
||||||
OpenorCloseLight(Is_Open);
|
OpenorCloseLight(Is_Open);
|
||||||
|
ControlManager.instance.SetHightParent(Close.transform);
|
||||||
|
MaskOpen.SetActive(true);
|
||||||
|
UseSateTips.Instance.StateTips(3);
|
||||||
});
|
});
|
||||||
lightsildervalue = Lightbrightness.value;
|
lightsildervalue = Lightbrightness.value;
|
||||||
Lightbrightness.onValueChanged.AddListener((value) =>
|
Lightbrightness.onValueChanged.AddListener((value) =>
|
||||||
|
@ -58,18 +87,33 @@ public class Control_Light : MonoBehaviour
|
||||||
{
|
{
|
||||||
if (lightsildervalue > value)
|
if (lightsildervalue > value)
|
||||||
{
|
{
|
||||||
Debug.Log("----");
|
|
||||||
SetEmissionIntensity(LightsModel[i].GetComponent<MeshRenderer>(), value);
|
SetEmissionIntensity(LightsModel[i].GetComponent<MeshRenderer>(), value);
|
||||||
LightsModel[i].GetChild(0).GetComponent<Light>().intensity = value;
|
LightsModel[i].GetChild(0).GetComponent<Light>().intensity = value;
|
||||||
}
|
}
|
||||||
else if (lightsildervalue < value)
|
else if (lightsildervalue < value)
|
||||||
{
|
{
|
||||||
Debug.Log("+++++++++");
|
|
||||||
SetEmissionIntensity(LightsModel[i].GetComponent<MeshRenderer>(), value);
|
SetEmissionIntensity(LightsModel[i].GetComponent<MeshRenderer>(), value);
|
||||||
LightsModel[i].GetChild(0).GetComponent<Light>().intensity = value;
|
LightsModel[i].GetChild(0).GetComponent<Light>().intensity = value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
MaskLightbrightness.SetActive(true);
|
||||||
|
Masklighttype.SetActive(false);
|
||||||
|
ControlManager.instance.SetHightParent(cool.transform.parent);
|
||||||
lightsildervalue = Lightbrightness.value;
|
lightsildervalue = Lightbrightness.value;
|
||||||
|
UseSateTips.Instance.StateTips(1);
|
||||||
|
});
|
||||||
|
Close.onClick.AddListener(() =>
|
||||||
|
{
|
||||||
|
UseSateTips.Instance.TipsPanel.SetActive(false);
|
||||||
|
for (int i = 0; i < LightsModel.Count; i++)
|
||||||
|
{
|
||||||
|
LightsModel[i].GetComponent<BoxCollider>().enabled = false;
|
||||||
|
LightsModel[i].GetComponent<HighlightEffect>().highlighted = false;
|
||||||
|
}
|
||||||
|
Control_Air.Instance.airobject.GetComponent<BoxCollider>().enabled = true;
|
||||||
|
Control_Air.Instance.airobject.GetComponent<HighlightEffect>().highlighted = true;
|
||||||
|
Control_Air.Instance.airobject.GetComponent<HighlightEffect>().overlay = 1;
|
||||||
|
Control_Air.Instance.airobject.GetComponent<HighlightEffect>().overlayMinIntensity = 0;
|
||||||
});
|
});
|
||||||
//enter.onClick.AddListener(() =>
|
//enter.onClick.AddListener(() =>
|
||||||
//{
|
//{
|
||||||
|
@ -85,12 +129,15 @@ public class Control_Light : MonoBehaviour
|
||||||
{
|
{
|
||||||
case Region.环境控制:
|
case Region.环境控制:
|
||||||
LightsModel = Furniture_Manager.Instance.FindHomes("环境", "灯");
|
LightsModel = Furniture_Manager.Instance.FindHomes("环境", "灯");
|
||||||
|
Modelflashing();
|
||||||
break;
|
break;
|
||||||
case Region.设备互联与系统控制:
|
case Region.设备互联与系统控制:
|
||||||
LightsModel = Furniture_Manager.Instance.FindHomes("互联", "灯");
|
LightsModel = Furniture_Manager.Instance.FindHomes("互联", "灯");
|
||||||
|
Modelflashing();
|
||||||
break;
|
break;
|
||||||
case Region.智能家电与维护:
|
case Region.智能家电与维护:
|
||||||
LightsModel = Furniture_Manager.Instance.FindHomes("家电", "灯");
|
LightsModel = Furniture_Manager.Instance.FindHomes("家电", "灯");
|
||||||
|
Modelflashing();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -102,6 +149,41 @@ public class Control_Light : MonoBehaviour
|
||||||
{
|
{
|
||||||
IsClick(Is_Open);
|
IsClick(Is_Open);
|
||||||
}
|
}
|
||||||
|
if (Lightbrightness.gameObject.activeInHierarchy && ControlManager.instance.HightUi.parent.name == "Canvas")
|
||||||
|
{
|
||||||
|
ControlManager.instance.modeltypestate = ModelType.灯;
|
||||||
|
ControlManager.instance.SetHightParent(Lightbrightness.transform.parent);
|
||||||
|
UseSateTips.Instance.StateTips(0);
|
||||||
|
MaskLightbrightness.SetActive(false);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (coolclick > 0 && warmclick > 0 && incandescent > 0 && ControlManager.instance.HightUi.parent.name == "灯光选择")
|
||||||
|
{
|
||||||
|
ControlManager.instance.SetHightParent(Open.transform);
|
||||||
|
Masklighttype.SetActive(true);
|
||||||
|
MaskOpen.SetActive(false);
|
||||||
|
UseSateTips.Instance.StateTips(2);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void Modelflashing()
|
||||||
|
{
|
||||||
|
|
||||||
|
if (SelectModel.Instance.region != Region.智能家电与维护)
|
||||||
|
{
|
||||||
|
HighlightEffect highlight = LightsModel[0].GetComponent<HighlightEffect>();
|
||||||
|
highlight.highlighted = true;
|
||||||
|
highlight.overlay = 1;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
HighlightEffect highlight = LightsModel[0].GetComponent<HighlightEffect>();
|
||||||
|
highlight.highlighted = true;
|
||||||
|
highlight.overlay = 1;
|
||||||
|
HighlightEffect highlights = LightsModel[1].GetComponent<HighlightEffect>();
|
||||||
|
highlights.highlighted = true;
|
||||||
|
highlights.overlay = 1;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
void IsClick(bool isclick)
|
void IsClick(bool isclick)
|
||||||
{
|
{
|
||||||
|
|
|
@ -0,0 +1,18 @@
|
||||||
|
using DG.Tweening;
|
||||||
|
using System.Collections;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using UnityEngine;
|
||||||
|
using UnityEngine.UI;
|
||||||
|
|
||||||
|
public class HightUI : MonoBehaviour
|
||||||
|
{
|
||||||
|
|
||||||
|
void Start()
|
||||||
|
{
|
||||||
|
GetComponent<Image>().DOFade(0.2F, 0.8F).SetLoops(-1, LoopType.Yoyo);
|
||||||
|
}
|
||||||
|
void Update()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,11 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 13669b34dd34f4a49b40edb1bfcd239d
|
||||||
|
MonoImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
defaultReferences: []
|
||||||
|
executionOrder: 0
|
||||||
|
icon: {instanceID: 0}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
|
@ -0,0 +1,43 @@
|
||||||
|
using System.Collections;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using TMPro;
|
||||||
|
using UnityEngine;
|
||||||
|
|
||||||
|
public class UseSateTips : MonoBehaviour
|
||||||
|
{
|
||||||
|
public static UseSateTips Instance;
|
||||||
|
public GameObject TipsPanel;
|
||||||
|
public TextMeshProUGUI text;
|
||||||
|
public List<string> Lights = new List<string>();
|
||||||
|
public List<string> Air = new List<string>();
|
||||||
|
public List<string> Tv = new List<string>();
|
||||||
|
private void Awake()
|
||||||
|
{
|
||||||
|
Instance = this;
|
||||||
|
}
|
||||||
|
void Start()
|
||||||
|
{
|
||||||
|
TipsPanel.SetActive(false);
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// 步骤提示
|
||||||
|
/// </summary>
|
||||||
|
public void StateTips(int index)
|
||||||
|
{
|
||||||
|
TipsPanel.SetActive(true);
|
||||||
|
switch (ControlManager.instance.modeltypestate)
|
||||||
|
{
|
||||||
|
case ModelType.灯:
|
||||||
|
text.text = Lights[index];
|
||||||
|
break;
|
||||||
|
case ModelType.空调:
|
||||||
|
break;
|
||||||
|
case ModelType.电视:
|
||||||
|
break;
|
||||||
|
case ModelType.窗帘:
|
||||||
|
break;
|
||||||
|
case ModelType.窗户:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,11 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 4e08011ff441273419bfee588bda3971
|
||||||
|
MonoImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
defaultReferences: []
|
||||||
|
executionOrder: 0
|
||||||
|
icon: {instanceID: 0}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
Loading…
Reference in New Issue