I have a bunch of light bulb switches, and other interactable objects.
When my player 'presses' a button, I want it to switch on/off a light, depending on which switch is pressed.
I currently have a 'last interacted with' variable that stores the last thing I've clicked on.
Would it be better performance to:
a) Have a simple FSM on each button checking it is the last item clicked each frame, and my game ending up with many FSM's; or
b) Have a 1 large FSM with multiple 'if's testing for each button in sequence every frame?
I use lightbulbs as an example, but I'll have various simple objects (switch on/off TV, switch on/off lights etc, with each button linked to an object)
Thanks