public static void TurnOn(IInteractiveAction type, IInteractiveAction[] _interactiveComponents) { foreach (IInteractiveAction interactive in _interactiveComponents) { if (interactive.GetType() == type.GetType()) { interactive.TurnOn(); } } }
public void TurnOn(IInteractiveAction type) { foreach (IInteractiveAction interactive in interactiveComponents) { if (interactive.GetType() == type.GetType()) { //interactive.TurnOn(); } } }
void Awake() { interactive = GetComponent <IInteractiveAction>(); }