Example #1
0
        public void Interact(SwitchElement switcher) // Main goal of SwitchMechanism
        {
            var toInteract = Elements.Where(x => x != GetLinked(switcher) && x.gameObject.active);

            foreach (var g in toInteract)
            {
                g.gameObject.SetActive(false);              //Activation of rest
            }
            GetLinked(switcher).gameObject.SetActive(true); //TheElemnt what you are interacting
            //switcher.gameObject.SetActive(false);
        }
Example #2
0
 public SwitchElementTarget GetLinked(SwitchElement switcher) //Get SwtichElementTarget
 {
     return(Buttons[switcher]);
 }
Example #3
0
        public List <Link> Links;                                               //All Links

        public void AddLink(SwitchElement switcher, SwitchElementTarget target) //Register in to Dictionary
        {
            Buttons.Add(switcher, target);
            Elements.Add(target);
        }