public void OnStateUpdate()
    {
        //Follow patroling path route.
        switch (gameplayFSMManager.transitionDirection)
        {
        case StateTransitionDirection.WashingToFighting:
            //if there are any clues for the washing process like some paste on the teeth or some effect is still working don't do anything.
            //else if there is nothing and everything is clean -> change to the intended state.
            if (GameManager.Instance.DirtyTeeth.Count == 0)
            {
                //this mean he clean all the teeth
                gameplayFSMManager.ChangeToFighting();
                gameplayFSMManager.PushState(gameplayFSMManager.fightingState);
            }
            break;

        case StateTransitionDirection.FightingToWashing:
            //if there is any enemy alive wait unil he dies.
            //else if there is no enemy alive and everything is clean -> change to the intended state.
            GameManager.Instance.enableFightingTools();
            if (GameManager.Instance.enemyObjects.All(e1 => e1 == null))
            {
                gameplayFSMManager.PushState(gameplayFSMManager.washingState);
                GameManager.Instance.disableFightingTools();
            }
            break;

        case StateTransitionDirection.WashingToPause:
            //if the player click the pause menu and he/she in the washing state

            break;

        case StateTransitionDirection.PauseToWashing:
            //if the player click the resume menu and back to game again but he/she was in the washing state

            break;

        case StateTransitionDirection.FightingToPause:
            //if the player click the pause menu and he/she in the fighting state
            GameManager.Instance.disableFightingTools();
            GameManager.Instance.enemySpawingPointManager.SetActive(false);
            break;

        case StateTransitionDirection.PauseToFighting:
            //if the player click the resume menu and back to game again but he/she was in the fighting state
            GameManager.Instance.enableFightingTools();
            break;
        }
    }