Hi. Suppose we want to implement two state machines. One of them is about a device which can turn on or not.If special time elapses, it becomes off. The another one is about shield. A player can have a shield or not.
If he has a shield, after elapsing special time, he has no longer that. Both of them have two states but different concept and maybe change in the future. Do you use the same classes to implement them?
If I underastand correctly your question, you can create an abstract class “Weapon” which has the code that both weapons will share and then create a class based on the abstract for each weapon to extend their functionality. Generally we try to avoid duplicated code if we can.