Exemplo n.º 1
0
        internal void AddToBaseManager(BaseManager managers = null)
        {
            SubRoot = GetComponentInParent <SubRoot>() ?? GetComponent <SubRoot>();

            if (SubRoot == null)
            {
                return;
            }

            Manager = managers ?? BaseManager.FindManager(SubRoot);
            Manager.AddBaseUnit(this);
        }
Exemplo n.º 2
0
        public void AddToManager(BaseManager managers = null)
        {
            if (SubRoot == null)
            {
                SubRoot = GetComponentInParent <SubRoot>() ?? GetComponent <SubRoot>() ?? GetComponentInChildren <SubRoot>();
            }

            if (SubRoot == null)
            {
                QuickLogger.Error <QuantumTeleporterController>("SubRoot returned null");
                return;
            }

            Manager = managers ?? BaseManager.FindManager(SubRoot);
            Manager.AddBaseUnit(this);
            QuickLogger.Debug($"{Mod.FriendlyName} has been connected", true);
        }