My solution for the zoom toggle

I figured since we wanted the zoom to reset when the weapon was switched, I would just make a property w/ a getter and setter and have the WeaponSwitcher call ResetWeaponZoom

private void ResetWeaponZoom()
    {
        GetComponentInParent<WeaponZoom>().ZoomToggle = false;
    }

In terms of abstracting it, I figure it’s the equivalent to not using the same scope with all weapons, so that would fall under the responsibility of whatever’s doing the switching. Thus, a zoom toggle in WeaponSwitcher.

Privacy & Terms