// Start is called before the first frame update void Start() { foreach (GameObject el in input) { if (el == null) { screens.Add(null); continue; } ISwitchable found = el.GetComponent <ISwitchable>(); if (found != null) { screens.Add(found); found.Close(); } } screens[active].Open(); }
public void On() { _appliance.Close(); }