Beispiel #1
0
    public static WrapMode GetFacialWrapMode(NrCharDefine.eCharFaicalAnimationType anitype)
    {
        switch (anitype)
        {
        case NrCharDefine.eCharFaicalAnimationType.FStay1:
            return(WrapMode.Loop);

        case NrCharDefine.eCharFaicalAnimationType.FTalk1:
            return(WrapMode.Loop);

        case NrCharDefine.eCharFaicalAnimationType.FTalk2:
            return(WrapMode.Loop);

        case NrCharDefine.eCharFaicalAnimationType.FTalk3:
            return(WrapMode.Loop);

        case NrCharDefine.eCharFaicalAnimationType.FTalk4:
            return(WrapMode.Loop);

        case NrCharDefine.eCharFaicalAnimationType.FTalkLong1:
            return(WrapMode.Loop);

        case NrCharDefine.eCharFaicalAnimationType.FSmile1:
            return(WrapMode.Once);

        case NrCharDefine.eCharFaicalAnimationType.FCloseEye1:
            return(WrapMode.Once);

        default:
            return(WrapMode.Loop);
        }
    }
    public void SetFacialAnimation(NrCharDefine.eCharFaicalAnimationType anitype)
    {
        string   facialAniKey   = this.GetFacialAniKey(anitype);
        WrapMode facialWrapMode = NrCharDefine.GetFacialWrapMode(anitype);

        this.m_pkParent3DChar.SetFacialAnimation(facialAniKey, facialWrapMode);
        this.m_eCurrentFacialAniType = anitype;
    }
    public string GetFacialAniKey(NrCharDefine.eCharFaicalAnimationType anitype)
    {
        string text = this.m_szCharCode + anitype.ToString();

        return(text.ToLower());
    }