Ejemplo n.º 1
0
 public bool Equals(EntryBase entry)
 {
     if (entry is null)
     {
         return(false);
     }
     return(entry._identifier == _identifier);
 }
Ejemplo n.º 2
0
        public override bool Equals(object obj)
        {
            if (obj is null)
            {
                return(false);
            }
            EntryBase objAsEntry = obj as EntryBase;

            if (objAsEntry is null)
            {
                return(false);
            }
            else
            {
                return(Equals(objAsEntry));
            }
        }
Ejemplo n.º 3
0
        public static T CreateInstance <T>(GameObject gameObject, object[] parameters = null, bool includeConfig = false) where T : EntryBase
        {
            EntryBase entry = gameObject.AddComponent <T>();

            entry._identifier   = globalIdentifier++;
            entry.textComponent = gameObject.GetComponent <Text>();
            if (entry.textComponent != null)
            {
                entry._originalText = entry.textComponent.text;
            }

            if (includeConfig)
            {
                entry.prefEntry = PlayerListConfig.category.CreateEntry(entry.Name.Replace(" ", ""), true, is_hidden: true);
                entry.gameObject.SetActive(entry.prefEntry.Value);
            }

            entry.Init(parameters);

            return((T)entry);
        }