Using the UnityEvent feature on each controller will allow you to add multiple event types, see the demo scene for a clear example on this.
void ActivateGenerator()
{
rumbling = true;
activateGenerator.Invoke();
}
void DeactivateGenerator()
{
rumbling = false;
deactivateGenerator.Invoke();
}
public class ActivateGenerator : MonoBehaviour
{
[SerializeField] private Renderer[] thisMaterial = null;
private string emissionName = "_EMISSION";
[SerializeField] private GameObject[] lights = null;
public void PowerLights()
{
foreach (GameObject lightObjects in lights)
{
lightObjects.SetActive(true);
}
foreach (Renderer emissiveMaterial in thisMaterial)
{
emissiveMaterial.material.EnableKeyword(emissionName);
}
}
public void DeactivateLights()
{
foreach (GameObject lightObjects in lights)
{
lightObjects.SetActive(false);
}
foreach (Renderer emissiveMaterial in thisMaterial)
{
emissiveMaterial.material.DisableKeyword(emissionName);
}
}