示例#1
0
        private EnabledMutator CreateEnabledButton(Mutator mutator)
        {
            GameObject     newButton = Instantiate(EnabledPrefab, EnabledParent);
            EnabledMutator enabled   = newButton.GetComponent <EnabledMutator>();

            return(enabled);
        }
示例#2
0
        public void RemoveMutator(string identifier)
        {
            // Disable it if it is enabled.
            EnabledMutator enabled = GetEnabledMutator(identifier);

            if (enabled)
            {
                DisableMutator(enabled.Mutator);
            }
            // Destroy the button.
            Destroy(GetAvailableMutator(identifier).gameObject);

            // Remove from list.
            _allMutators.RemoveAll(x => x.Identifier == identifier);
        }