diff options
author | chai <chaifix@163.com> | 2021-04-07 19:10:30 +0800 |
---|---|---|
committer | chai <chaifix@163.com> | 2021-04-07 19:10:30 +0800 |
commit | e7dfbec8e8634e767d78959941daf71a96e021cf (patch) | |
tree | 58895a7c60df0bd3f316e6461051eabd1c0a51e1 /Assets/uGUI-2017.1/UnityEngine.UI/UI/Core/Navigation.cs | |
parent | ff5a3fbf31db349db11bbc5c60ba199d26780f19 (diff) |
*移动目录
Diffstat (limited to 'Assets/uGUI-2017.1/UnityEngine.UI/UI/Core/Navigation.cs')
-rw-r--r-- | Assets/uGUI-2017.1/UnityEngine.UI/UI/Core/Navigation.cs | 74 |
1 files changed, 0 insertions, 74 deletions
diff --git a/Assets/uGUI-2017.1/UnityEngine.UI/UI/Core/Navigation.cs b/Assets/uGUI-2017.1/UnityEngine.UI/UI/Core/Navigation.cs deleted file mode 100644 index 8dce1d5..0000000 --- a/Assets/uGUI-2017.1/UnityEngine.UI/UI/Core/Navigation.cs +++ /dev/null @@ -1,74 +0,0 @@ -using System; -using UnityEngine.Serialization; - -namespace UnityEngine.UI -{ - [Serializable] - public struct Navigation : IEquatable<Navigation> - { - /* - * This looks like it's not flags, but it is flags, - * the reason is that Automatic is considered horizontal - * and verical mode combined - */ - [Flags] - public enum Mode - { - None = 0, // No navigation - Horizontal = 1, // Automatic horizontal navigation - Vertical = 2, // Automatic vertical navigation - Automatic = 3, // Automatic navigation in both dimensions - Explicit = 4, // Explicitly specified only - } - - // Which method of navigation will be used. - [FormerlySerializedAs("mode")] - [SerializeField] - private Mode m_Mode; - - // Game object selected when the joystick moves up. Used when navigation is set to "Explicit". - [FormerlySerializedAs("selectOnUp")] - [SerializeField] - private Selectable m_SelectOnUp; - - // Game object selected when the joystick moves down. Used when navigation is set to "Explicit". - [FormerlySerializedAs("selectOnDown")] - [SerializeField] - private Selectable m_SelectOnDown; - - // Game object selected when the joystick moves left. Used when navigation is set to "Explicit". - [FormerlySerializedAs("selectOnLeft")] - [SerializeField] - private Selectable m_SelectOnLeft; - - // Game object selected when the joystick moves right. Used when navigation is set to "Explicit". - [FormerlySerializedAs("selectOnRight")] - [SerializeField] - private Selectable m_SelectOnRight; - - public Mode mode { get { return m_Mode; } set { m_Mode = value; } } - public Selectable selectOnUp { get { return m_SelectOnUp; } set { m_SelectOnUp = value; } } - public Selectable selectOnDown { get { return m_SelectOnDown; } set { m_SelectOnDown = value; } } - public Selectable selectOnLeft { get { return m_SelectOnLeft; } set { m_SelectOnLeft = value; } } - public Selectable selectOnRight { get { return m_SelectOnRight; } set { m_SelectOnRight = value; } } - - static public Navigation defaultNavigation - { - get - { - var defaultNav = new Navigation(); - defaultNav.m_Mode = Mode.Automatic; - return defaultNav; - } - } - - public bool Equals(Navigation other) - { - return mode == other.mode && - selectOnUp == other.selectOnUp && - selectOnDown == other.selectOnDown && - selectOnLeft == other.selectOnLeft && - selectOnRight == other.selectOnRight; - } - } -} |