예제 #1
0
        internal static void Unregister(YorozuButton button)
        {
            if (!_activeButtons.Contains(button))
            {
                return;
            }

            _activeButtons.Remove(button);
        }
예제 #2
0
        internal static void Register(YorozuButton button)
        {
            if (_activeButtons.Contains(button))
            {
                return;
            }

            _activeButtons.Add(button);
        }
예제 #3
0
        protected void OnEnable()
        {
            _base = target as YorozuButton;

            // 必要タイプを取得
            _types = AppDomain.CurrentDomain.GetAssemblies()
                     .SelectMany(a => a.GetTypes())
                     .Where(t => !t.IsAbstract && t.IsSubclassOf(typeof(YorozuButtonModuleAbstract)))
                     .ToArray();

            _moduleProperty = serializedObject.FindProperty("_modules");
            _interactable   = serializedObject.FindProperty("m_Interactable");

            _cacheInfos = new Dictionary <Type, TypeInfo>();
            foreach (var type in _types)
            {
                var info = new TypeInfo(type, this);
                _cacheInfos.Add(type, info);
            }
        }
예제 #4
0
 internal void SetUp(YorozuButton main)
 {
     _main = main;
     _rect = main.transform as RectTransform;
     Prepare();
 }
예제 #5
0
 /// <summary>
 /// 必要なら override する
 /// </summary>
 public virtual void DrawEditor(YorozuButton button, UnityEditor.SerializedProperty property)
 {
 }