Exemple #1
0
        internal static LeanInConfig GetLeanStateId(PostureStateId stateId)
        {
            LeanInConfig ret = LeanInConfig.NoPeek;

            switch (stateId)
            {
            case PostureStateId.NoPeek:
                ret = LeanInConfig.NoPeek;
                break;

            case PostureStateId.PeekLeft:
                ret = LeanInConfig.PeekLeft;
                break;

            case PostureStateId.PeekRight:
                ret = LeanInConfig.PeekRight;
                break;

            default:
                ret = LeanInConfig.NoPeek;
                Logger.ErrorFormat("can not convert PostureStateId type:{0} to MovementInConfig type", stateId);
                break;
            }
            return(ret);
        }
        private EPlayerState LeanToState(LeanInConfig lean)
        {
            switch (lean)
            {
            case LeanInConfig.PeekLeft:
                return(EPlayerState.PeekLeft);

            case LeanInConfig.PeekRight:
                return(EPlayerState.PeekRight);

            default:
                return(EPlayerState.None);
            }
        }