private void OnTriggerEnter(Collider other) { bool rightController = other.tag == "Right"; if (rightController && rightSelected != null) { rightSelected.deselect(); } if (!rightController && leftSelected != null) { leftSelected.deselect(); } hc.audioModsSelect(rightController); material.SetColor("_BaseColor", rightController? Color.green: Color.blue); if (rightController) { rightSelected = this; } else { leftSelected = this; } }
public static void Reproxy(this KMSelectable selectable) { ModSelectable modSelectable = selectable.GetComponent <ModSelectable>(); if (modSelectable != null) { modSelectable.CopySettingsFromProxy(); } }