void Start()
 {
     standingState = new HeroStandingState(this);
     walkingState  = new HeroWalkingState(this);
     jumpingState  = new HeroJumpingState(this);
     curState      = standingState;
 }
        public void SwitchState(string stateName)
        {
            curState.Leave();
            switch (stateName)
            {
            case "StandingState":
                curState = standingState;
                break;

            case "WalkingState":
                curState = walkingState;
                break;

            case "JumpingState":
                curState = jumpingState;
                break;
            }
            curState.Enter();
        }