Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using UnityEngine;
- public abstract class State
- {
- protected StateMachine stateMachine;
- protected AppManager appManager => stateMachine.appManager;
- public State(StateMachine stateMachine) {
- this.stateMachine = stateMachine;
- }
- public void Enter() {
- EnterState();
- }
- protected virtual void EnterState() {
- }
- protected virtual void ExitState(State nextState) {
- stateMachine.SetState(nextState);
- }
- public virtual void UpdateState() {
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement