using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class CEStateManager : MonoBehaviour
{
    CEBaseState currentState;
    public CEPatrolState PatrolState = new CEPatrolState();
    public CEMoveState MoveState = new CEMoveState();
    public CEShootState ShootState = new CEShootState();

    void Start()
    {
        currentState = PatrolState;

        currentState.EnterState(this);
    }

    // Update is called once per frame
    void Update()
    {
        currentState.UpdateState(this);
    }

    public void SwitchState(CEBaseState state)
    {
        currentState = state;
        state.EnterState(this);
    }
}
