Hi
State is a public abstract class and by definition an abstract class cannot be used to create objects (you cannot create an instance of it using the new keyword) and to access it it must be inherited from another class.
Then we create a public class StateMachine : MonoBehaviour
Inside StateMachine we create a private State currentState variable and use it to access the Tick() method inside the abstract class State.
As much as I know private State currentState is not an instance of State because instances are created using the new keyword and in case of abstract classes this is not even allowed.
And StateMachine does not inherit from State either.
So how can you access Tick() just by declaring a State currentState variable inside StateMachine?
Thank you