Is there any way to let multiple class share the same instance of another class? So in my c# program i've got three class Gamelogic(A), FPSController(B), and SpawnPlayer(C).
In my case class B and C would use and alter some variables in A, in order to use the variables i'm currently instantiating A in two different classes and then use dot notation to access the variable from the instance of A, but the problem is that after A instantiated in different classes, the change in instance.variable does not share between B and C class at all.
Would static type be a good way of solving this? Or writing a main would be better.
Any suggestions would be appreciated.