summaryrefslogtreecommitdiff
path: root/Assets/uGUI-2017.1/UnityEngine.UI/UI/Core/SetPropertyUtility.cs
diff options
context:
space:
mode:
authorchai <chaifix@163.com>2021-04-07 19:10:30 +0800
committerchai <chaifix@163.com>2021-04-07 19:10:30 +0800
commite7dfbec8e8634e767d78959941daf71a96e021cf (patch)
tree58895a7c60df0bd3f316e6461051eabd1c0a51e1 /Assets/uGUI-2017.1/UnityEngine.UI/UI/Core/SetPropertyUtility.cs
parentff5a3fbf31db349db11bbc5c60ba199d26780f19 (diff)
*移动目录
Diffstat (limited to 'Assets/uGUI-2017.1/UnityEngine.UI/UI/Core/SetPropertyUtility.cs')
-rw-r--r--Assets/uGUI-2017.1/UnityEngine.UI/UI/Core/SetPropertyUtility.cs36
1 files changed, 0 insertions, 36 deletions
diff --git a/Assets/uGUI-2017.1/UnityEngine.UI/UI/Core/SetPropertyUtility.cs b/Assets/uGUI-2017.1/UnityEngine.UI/UI/Core/SetPropertyUtility.cs
deleted file mode 100644
index 15d8519..0000000
--- a/Assets/uGUI-2017.1/UnityEngine.UI/UI/Core/SetPropertyUtility.cs
+++ /dev/null
@@ -1,36 +0,0 @@
-using System;
-using System.Collections.Generic;
-using UnityEngine.Events;
-
-namespace UnityEngine.UI
-{
- internal static class SetPropertyUtility
- {
- public static bool SetColor(ref Color currentValue, Color newValue)
- {
- if (currentValue.r == newValue.r && currentValue.g == newValue.g && currentValue.b == newValue.b && currentValue.a == newValue.a)
- return false;
-
- currentValue = newValue;
- return true;
- }
-
- public static bool SetStruct<T>(ref T currentValue, T newValue) where T : struct
- {
- if (EqualityComparer<T>.Default.Equals(currentValue, newValue))
- return false;
-
- currentValue = newValue;
- return true;
- }
-
- public static bool SetClass<T>(ref T currentValue, T newValue) where T : class
- {
- if ((currentValue == null && newValue == null) || (currentValue != null && currentValue.Equals(newValue)))
- return false;
-
- currentValue = newValue;
- return true;
- }
- }
-}