コード例 #1
0
    private void _SetCurrentAniState(eCharAnimationType _anitype)
    {
        if (this.m_pkParent3DChar == null)
        {
            return;
        }
        GameObject baseObject = this.m_pkParent3DChar.GetBaseObject();

        if (baseObject == null)
        {
            return;
        }
        string name = this.m_pkParent3DChar.MakeAnimationKey(_anitype);

        this.m_CurrentAniState = baseObject.animation[name];
        if (this.m_bBattleState)
        {
            if (this.m_eCurrentAniType == eCharAnimationType.BRun1)
            {
                this.m_CurrentAniState.speed = 1.5f;
            }
            else
            {
                this.m_CurrentAniState.speed = 1f;
            }
        }
    }
コード例 #2
0
    public void Clear()
    {
        this._listCamera.Clear();
        this.Duration   = 0f;
        this.fStartTime = 0f;
        if (this.m_TargetCamera != null && this.m_TargetCamera.CastedTarget != null)
        {
            this.m_TargetCamera.CastedTarget.enabled = true;
            this.m_TargetCamera.CastedTarget.RestoreCameraInfo();
        }
        this.m_TargetCamera       = null;
        this.nReservationCharKind = 0;
        this.eReservationAni      = eCharAnimationType.None;
        this.bLoadComplete        = false;
        Battle.BATTLE.GRID_MANAGER.ShowHideGrid(true);
        GameObject gameObject = GameObject.Find("UI Camera");

        if (gameObject != null)
        {
            Camera componentInChildren = gameObject.GetComponentInChildren <Camera>();
            if (componentInChildren != null)
            {
                componentInChildren.enabled = true;
            }
        }
        if (this.bHide)
        {
            NrTSingleton <NkBattleCharManager> .Instance.ChangeCharLayer((eBATTLE_ALLY)this.nHideAlly, -1, true, true);

            this.bHide     = false;
            this.nHideAlly = -1;
        }
    }
コード例 #3
0
ファイル: NrCharMove.cs プロジェクト: parikharsh/GLOH_Source
    public void SetTabMoveInfoForMobile(bool bStart, eCharAnimationType anitype)
    {
        NrCharUser    nrCharUser    = this.m_pkChar as NrCharUser;
        Nr3DCharActor nr3DCharActor = nrCharUser.Get3DChar() as Nr3DCharActor;

        if (nr3DCharActor == null)
        {
            return;
        }
        if (bStart)
        {
            this.ProcessIncreaseMove();
            this.SetCharPos(nr3DCharActor.GetRootGameObject());
            this.SendCharMovePacketForKeyBoardMove(false);
            this.m_bArrived      = false;
            this.m_bKeyboardMove = false;
            this.m_bMouseMove    = false;
            this.m_bJoyStickMove = true;
        }
        else
        {
            this.MoveStop(false, false);
        }
        nrCharUser.SetAnimation(anitype);
    }
コード例 #4
0
 public void SetIdleAni(eCharAnimationType PreAniType)
 {
     if (this.m_ActorBase.GetCharAnimation().GetCurrentAniType() == PreAniType)
     {
         this.SetCurrentAnimation(eCharAnimationType.Stay1);
     }
 }
コード例 #5
0
    private AnimationClip GetAnimationClip(eCharAnimationType targetani)
    {
        if (this.m_kBaseObject == null)
        {
            return(null);
        }
        if (this.m_bFaceSoldier)
        {
            if (targetani == eCharAnimationType.Run1)
            {
                targetani = eCharAnimationType.BRun1;
            }
            else if (targetani == eCharAnimationType.Stay1)
            {
                targetani = eCharAnimationType.BStay1;
            }
        }
        string        name = this.MakeAnimationKey(targetani);
        AnimationClip clip = this.m_kBaseObject.animation.GetClip(name);

        if (!(clip == null))
        {
            base.SetCurrentAniType(targetani.ToString());
        }
        return(clip);
    }
コード例 #6
0
    public override string MakeAnimationKey(eCharAnimationType anitype)
    {
        StringBuilder stringBuilder = new StringBuilder(string.Empty);
        string        value         = anitype.ToString();

        if (!this.m_bFaceSoldier)
        {
            bool flag = base.GetParentCharKindInfo().GetCharTribe() == 4;
            if (NrCharAnimation.IsBattleAnimation(anitype) || flag)
            {
                if (!base.IsBattleChar())
                {
                    if (!NrCharAnimation.IsOnlyNormalAnimation(anitype, flag))
                    {
                        stringBuilder.Append(base.GetParentChar().GetWeaponCode());
                    }
                }
                else
                {
                    stringBuilder.Append(base.GetParentBattleChar().GetWeaponCode());
                }
            }
        }
        if (this.IsRideState())
        {
            string value2 = "Camel";
            stringBuilder.Append("_");
            stringBuilder.Append(value2);
        }
        stringBuilder.Append(value);
        return(stringBuilder.ToString().ToLower());
    }
コード例 #7
0
 public static bool IsBattleAnimation(eCharAnimationType anitype)
 {
     switch (anitype)
     {
     case eCharAnimationType.Attack1:
     case eCharAnimationType.Attack2:
     case eCharAnimationType.Attack3:
     case eCharAnimationType.ExtAttack1:
     case eCharAnimationType.AttackLeft1:
     case eCharAnimationType.AttackRight1:
     case eCharAnimationType.Skill1:
     case eCharAnimationType.Skill2:
     case eCharAnimationType.Skill3:
     case eCharAnimationType.BStay1:
     case eCharAnimationType.BStay2:
     case eCharAnimationType.BRun1:
     case eCharAnimationType.Damage1:
     case eCharAnimationType.CriDamage1:
     case eCharAnimationType.Evade1:
     case eCharAnimationType.Die1:
     case eCharAnimationType.Tired1:
     case eCharAnimationType.Respawn1:
     case eCharAnimationType.Event1:
         return(true);
     }
     return(false);
 }
コード例 #8
0
    public static bool IsOnlyNormalAnimation(eCharAnimationType anitype, bool bMagic)
    {
        switch (anitype)
        {
        case eCharAnimationType.SitS1:
        case eCharAnimationType.SitL1:
        case eCharAnimationType.SitL2:
        case eCharAnimationType.SitE1:
        case eCharAnimationType.CollectS1:
        case eCharAnimationType.CollectL1:
        case eCharAnimationType.CollectE1:
            return(true);

        default:
            switch (anitype)
            {
            case eCharAnimationType.Stay1:
            case eCharAnimationType.Stay2:
            case eCharAnimationType.Walk1:
            case eCharAnimationType.Run1:
                return(!bMagic);

            default:
                return(false);
            }
            break;
        }
    }
コード例 #9
0
 public bool CheckProcessStatus()
 {
     if (this.IsCrossFadeProcess())
     {
         return(true);
     }
     if (!this.m_bLoop)
     {
         if (this.IsSameAniPlaying())
         {
             if (!this.IsPlaying())
             {
                 this.m_bProcessStatus = true;
             }
             else if (this.m_eCurrentFacialAniType != NrCharDefine.eCharFaicalAnimationType.FStay1 && !this.IsTalkAnimationPlaying())
             {
                 this.SetFacialAnimation(NrCharDefine.eCharFaicalAnimationType.FStay1);
             }
         }
     }
     else if (this.m_fAniPlayingTime > this.m_fAnimationLength)
     {
         eCharAnimationType randomAniType = this.GetRandomAniType(this.m_eCurrentAniType);
         this.SetCurrentAniType(randomAniType, 0.3f);
         this.m_fAniPlayingTime = 0f;
     }
     return(this.m_bProcessStatus);
 }
コード例 #10
0
    public static bool IsIdleAnimation(eCharAnimationType anitype)
    {
        switch (anitype)
        {
        case eCharAnimationType.EcoAction1:
        case eCharAnimationType.EcoAction2:
        case eCharAnimationType.TalkStay1:
        case eCharAnimationType.ActionLoop1:
            return(true);

        case eCharAnimationType.TalkStart1:
        case eCharAnimationType.TalkAction1:
        case eCharAnimationType.TalkEnd1:
        case eCharAnimationType.ActionStart1:
IL_2B:
            switch (anitype)
            {
            case eCharAnimationType.Tired1:
            case eCharAnimationType.SitL1:
            case eCharAnimationType.SitL2:
                return(true);

            case eCharAnimationType.SitS1:
IL_44:
                if (anitype != eCharAnimationType.Stay1 && anitype != eCharAnimationType.Stay2 && anitype != eCharAnimationType.BStay1 && anitype != eCharAnimationType.BStay2)
                {
                    return(false);
                }
                return(true);
            }
            goto IL_44;
        }
        goto IL_2B;
    }
コード例 #11
0
    public eCharAnimationType GetRandomAniType(eCharAnimationType sourceanitype)
    {
        eCharAnimationType result = sourceanitype;

        switch (sourceanitype)
        {
        case eCharAnimationType.SitL1:
            if (UnityEngine.Random.value < 0.5f)
            {
                result = eCharAnimationType.SitL2;
            }
            return(result);

        case eCharAnimationType.SitL2:
            result = eCharAnimationType.SitL1;
            return(result);

        case eCharAnimationType.SitE1:
        case eCharAnimationType.CollectS1:
        case eCharAnimationType.CollectL1:
        case eCharAnimationType.CollectE1:
IL_2D:
            if (sourceanitype == eCharAnimationType.Stay1)
            {
                if (!this.m_pkParent3DChar.GetMiniDramaChar() && UnityEngine.Random.value < 0.5f)
                {
                    result = eCharAnimationType.Stay2;
                }
                else
                {
                    result = eCharAnimationType.Stay1;
                }
                return(result);
            }
            if (sourceanitype == eCharAnimationType.Stay2)
            {
                return(eCharAnimationType.Stay1);
            }
            if (sourceanitype == eCharAnimationType.BStay1)
            {
                return(result);
            }
            if (sourceanitype != eCharAnimationType.BStay2)
            {
                return(result);
            }
            return(eCharAnimationType.BStay1);

        case eCharAnimationType.EcoAction1:
            if (UnityEngine.Random.value < 0.5f)
            {
                result = eCharAnimationType.EcoAction2;
            }
            return(result);

        case eCharAnimationType.EcoAction2:
            return(eCharAnimationType.EcoAction1);
        }
        goto IL_2D;
    }
コード例 #12
0
    public eCharAnimationType GetNextAniType(eCharAnimationType sourceanitype)
    {
        eCharAnimationType result = eCharAnimationType.END_ANITYPE;

        switch (sourceanitype)
        {
        case eCharAnimationType.Attack1:
        case eCharAnimationType.Attack2:
        case eCharAnimationType.Attack3:
        case eCharAnimationType.ExtAttack1:
        case eCharAnimationType.AttackLeft1:
        case eCharAnimationType.AttackRight1:
        case eCharAnimationType.Skill1:
        case eCharAnimationType.Skill2:
        case eCharAnimationType.Skill3:
        case eCharAnimationType.Damage1:
        case eCharAnimationType.CriDamage1:
        case eCharAnimationType.Evade1:
        case eCharAnimationType.Respawn1:
        case eCharAnimationType.Event1:
        case eCharAnimationType.Cinema_000:
        case eCharAnimationType.Cinema_001:
        case eCharAnimationType.Cinema_002:
        case eCharAnimationType.Cinema_003:
        case eCharAnimationType.Cinema_004:
            result = eCharAnimationType.BStay1;
            break;

        case eCharAnimationType.SitS1:
            result = eCharAnimationType.SitL1;
            break;

        case eCharAnimationType.CollectS1:
            result = eCharAnimationType.CollectL1;
            break;

        case eCharAnimationType.TalkStart1:
            result = eCharAnimationType.TalkAction1;
            break;

        case eCharAnimationType.TalkAction1:
            result = eCharAnimationType.TalkStay1;
            break;

        case eCharAnimationType.TalkStay1:
            result = eCharAnimationType.Stay1;
            break;

        case eCharAnimationType.TalkEnd1:
            result = eCharAnimationType.EcoAction1;
            break;

        case eCharAnimationType.ActionStart1:
            result = eCharAnimationType.ActionLoop1;
            break;
        }
        return(result);
    }
コード例 #13
0
    public override eCharAnimationType GetMoveAnimation()
    {
        eCharAnimationType result = eCharAnimationType.Run1;

        if (base.IsBattleChar())
        {
            result = eCharAnimationType.BRun1;
        }
        return(result);
    }
コード例 #14
0
    public string GetAttachTargetName(NrCharDefine.eAT2ItemAssetBundle eItemIndex)
    {
        string result = string.Empty;

        switch (eItemIndex)
        {
        case NrCharDefine.eAT2ItemAssetBundle.hair:
        case NrCharDefine.eAT2ItemAssetBundle.face:
        case NrCharDefine.eAT2ItemAssetBundle.helmet:
            result = "dmhead";
            break;

        case NrCharDefine.eAT2ItemAssetBundle.weapon1:
        case NrCharDefine.eAT2ItemAssetBundle.weapon2:
        {
            bool battleani = true;
            if (!this.m_pkTarget3DChar.IsBattleChar())
            {
                battleani = false;
                if (this.m_pkTargetKind.IsATB(2L))
                {
                    battleani = true;
                }
                else if (this.m_pkTargetKind.GetCharTribe() == 4)
                {
                    battleani = true;
                }
                else if (this.m_pkTarget3DChar.GetParentCharAnimation() == null)
                {
                    Debug.LogWarning("===> Attack Weapon Target Error (" + eItemIndex.ToString() + ") : " + this.m_pkTarget3DChar.GetName());
                }
                else
                {
                    eCharAnimationType currentAniType = this.m_pkTarget3DChar.GetParentCharAnimation().GetCurrentAniType();
                    battleani = NrCharAnimation.IsBattleAnimation(currentAniType);
                }
            }
            result = this.GetWeaponTargetName(eItemIndex, battleani);
            break;
        }

        case NrCharDefine.eAT2ItemAssetBundle.decoration:
            result = "dmback";
            break;

        case NrCharDefine.eAT2ItemAssetBundle.bodyitem:
            result = "dmbody";
            break;

        case NrCharDefine.eAT2ItemAssetBundle.centeritem:
            result = "dmcenter";
            break;
        }
        return(result);
    }
コード例 #15
0
    public void SetNextAnimation(eCharAnimationType anitype)
    {
        eCharAnimationType nextAniType = this.GetNextAniType(anitype);

        if (nextAniType != eCharAnimationType.END_ANITYPE)
        {
            this.m_nSetAniCount++;
            this.m_eNextAniTypeList.Add(new NrCharNextAniInfo(nextAniType, true));
            this.SetNextAnimation(nextAniType);
        }
    }
コード例 #16
0
    public static bool IsForcePlayAnimation(eCharAnimationType anitype)
    {
        switch (anitype)
        {
        case eCharAnimationType.Damage1:
        case eCharAnimationType.CriDamage1:
        case eCharAnimationType.Evade1:
            return(true);

        default:
            return(false);
        }
    }
コード例 #17
0
    public static bool IsCollectAnimation(eCharAnimationType anitype)
    {
        switch (anitype)
        {
        case eCharAnimationType.CollectS1:
        case eCharAnimationType.CollectL1:
        case eCharAnimationType.CollectE1:
            return(true);

        default:
            return(false);
        }
    }
コード例 #18
0
 private float GetCrossFade(eCharAnimationType eNextType, bool bBlend)
 {
     if (this.m_pkParent3DChar != null && bBlend)
     {
         string text  = this.m_pkParent3DChar.MakeAnimationKey(this.m_eCurrentAniType);
         string text2 = this.m_pkParent3DChar.MakeAnimationKey(eNextType);
         return(NrTSingleton <Nr3DCharSystem> .Instance.GetBlend(this.m_szCharCode, text.ToLower(), text2.ToLower()));
     }
     if (null != this.m_CurrentAniState && this.m_CurrentAniState.wrapMode == WrapMode.Loop)
     {
         return(0f);
     }
     return(0f);
 }
コード例 #19
0
    public static bool IsSitDownAnimation(eCharAnimationType anitype)
    {
        switch (anitype)
        {
        case eCharAnimationType.SitS1:
        case eCharAnimationType.SitL1:
        case eCharAnimationType.SitL2:
        case eCharAnimationType.SitE1:
            return(true);

        default:
            return(false);
        }
    }
コード例 #20
0
    public override AnimationClip SetAnimation(eCharAnimationType targetani, float fBlendTime, bool bForceLoop)
    {
        AnimationClip animationClip = this.GetAnimationClip(targetani);

        if (animationClip == null)
        {
            animationClip = base.GetSafeAnimationClip(targetani);
            if (animationClip == null)
            {
                return(null);
            }
        }
        string name = animationClip.name;

        if (base.IsBattleChar() && (targetani == eCharAnimationType.Damage1 || targetani == eCharAnimationType.CriDamage1))
        {
            this.m_kBaseObject.animation.Stop();
        }
        if (fBlendTime != 0f)
        {
            this.m_kBaseObject.animation.CrossFade(name, fBlendTime);
        }
        else
        {
            if (this.m_kBaseObject.animation.isPlaying && animationClip.wrapMode != WrapMode.Loop)
            {
                this.m_kBaseObject.animation.Stop();
            }
            if (!this.m_kBaseObject.animation.Play(name))
            {
                Debug.LogWarning("m_kBaseObject.animation.Play failed =====> " + name);
            }
        }
        if (bForceLoop)
        {
            if (animationClip.wrapMode != WrapMode.Loop)
            {
                animationClip.wrapMode = WrapMode.Loop;
            }
        }
        else if (animationClip.wrapMode != WrapMode.Once)
        {
            animationClip.wrapMode = WrapMode.Once;
        }
        bool bBlend = 0f != fBlendTime;

        this.SetRideAnimation(name, bBlend, bForceLoop);
        this.SetWeaponTrailAnimation(targetani, bBlend, bForceLoop);
        return(animationClip);
    }
コード例 #21
0
    public void SetCurrentAniType(eCharAnimationType sourceanitype, float fBlendTime)
    {
        if (!NrCharAnimation.IsForcePlayAnimation(sourceanitype) && this.m_eCurrentAniType == sourceanitype && this.IsSameAniPlaying())
        {
            return;
        }
        AnimationClip animationClip = this.m_pkParent3DChar.SetAnimation(sourceanitype, fBlendTime, this.IsLoopAnimation(sourceanitype));

        if (animationClip == null)
        {
            if (this.m_pkParent3DChar is Nr3DCharActor)
            {
                string text = "[" + sourceanitype.ToString() + "] Character Animation Setting failed. Contact me(SSH).";
                NrTSingleton <NrWebAlert> .Instance.PushMsg(text);

                Debug.Log(text);
            }
            return;
        }
        this.m_bLoop = (animationClip.wrapMode == WrapMode.Loop);
        string value = this.m_pkParent3DChar.MakeAnimationKey(sourceanitype);

        if (!animationClip.name.Equals(value))
        {
            sourceanitype = this.FindAniTypeByCode(this.m_pkParent3DChar.GetCurrentAniType());
        }
        this.m_ePrevAniType    = this.m_eCurrentAniType;
        this.m_eCurrentAniType = sourceanitype;
        this._SetCurrentAniState(sourceanitype);
        this.m_bProcessStatus = false;
        this.SetFinishAnimation(false);
        this.m_fAniPlayingTime  = 0f;
        this.m_fAnimationLength = animationClip.length;
        if (!this.m_pkParent3DChar.IsBattleChar())
        {
            NkCharPartControl parentCharPartControl = this.m_pkParent3DChar.GetParentCharPartControl();
            if (parentCharPartControl != null)
            {
                eCharAnimationType prevAniType = this.GetPrevAniType();
                bool flag  = NrCharAnimation.IsBattleAnimation(prevAniType);
                bool flag2 = NrCharAnimation.IsBattleAnimation(sourceanitype);
                if (flag != flag2)
                {
                    parentCharPartControl.ChangeWeaponTarget();
                }
            }
        }
    }
コード例 #22
0
    public bool ReadCutScneData(string fileName, int nCharKind, eCharAnimationType eAni, int nHide, int nAlly)
    {
        this.Clear();
        string text = string.Empty;

        if (!NrTSingleton <NrGlobalReference> .Instance.isLoadWWW)
        {
            string text2 = Option.GetProtocolRootPath(Protocol.FILE);
            text2 = text2.Substring("file:///".Length, text2.Length - "file:///".Length);
            text  = string.Format("{0}{1}{2}.xml", text2, CDefinePath.XMLPath(), fileName);
            this.ReadXML(text, null);
        }
        else
        {
            ItemType itemType;
            if (!NrTSingleton <NrGlobalReference> .Instance.useCache)
            {
                text     = string.Format("{0}{1}.xml", CDefinePath.XMLPath(), fileName);
                itemType = ItemType.USER_STRING;
            }
            else
            {
                if (TsPlatform.IsMobile)
                {
                    text = string.Format("{0}{1}_mobile{2}", CDefinePath.XMLBundlePath(), fileName, Option.extAsset);
                }
                else
                {
                    text = string.Format("{0}{1}{2}", CDefinePath.XMLBundlePath(), fileName, Option.extAsset);
                }
                itemType = ItemType.USER_ASSETB;
            }
            WWWItem wWWItem = Holder.TryGetOrCreateBundle(text, null);
            wWWItem.SetItemType(itemType);
            wWWItem.SetCallback(new PostProcPerItem(this.ReadXML), null);
            TsImmortal.bundleService.RequestDownloadCoroutine(wWWItem, DownGroup.RUNTIME, true);
        }
        this.bLoadComplete        = false;
        this.nReservationCharKind = nCharKind;
        this.eReservationAni      = eAni;
        if (nHide != 0)
        {
            this.bHide     = true;
            this.nHideAlly = nAlly;
        }
        return(true);
    }
コード例 #23
0
    public bool IsLoopAnimation(eCharAnimationType sourceanitype)
    {
        switch (sourceanitype)
        {
        case eCharAnimationType.BStay1:
        case eCharAnimationType.BStay2:
        case eCharAnimationType.BRun1:
        case eCharAnimationType.Tired1:
        case eCharAnimationType.SitL1:
        case eCharAnimationType.SitL2:
        case eCharAnimationType.CollectL1:
        case eCharAnimationType.EcoAction1:
        case eCharAnimationType.EcoAction2:
        case eCharAnimationType.TalkStay1:
            return(true);

        case eCharAnimationType.Damage1:
        case eCharAnimationType.CriDamage1:
        case eCharAnimationType.Evade1:
        case eCharAnimationType.Die1:
        case eCharAnimationType.SitS1:
        case eCharAnimationType.SitE1:
        case eCharAnimationType.CollectS1:
        case eCharAnimationType.CollectE1:
        case eCharAnimationType.TalkStart1:
        case eCharAnimationType.TalkAction1:
IL_5B:
            switch (sourceanitype)
            {
            case eCharAnimationType.Stay1:
            case eCharAnimationType.Stay2:
            case eCharAnimationType.Walk1:
            case eCharAnimationType.Run1:
                return(true);

            default:
                if (sourceanitype != eCharAnimationType.ActionLoop1)
                {
                    return(false);
                }
                return(true);
            }
            break;
        }
        goto IL_5B;
    }
コード例 #24
0
    public float PushNextAniType(eCharAnimationType anitype, bool bForceAction, bool bForceReserved, bool bBlend)
    {
        if (!bForceAction && this.m_eCurrentAniType == anitype && this.m_bLoop)
        {
            return(this.m_fAnimationLength);
        }
        this.m_nSetAniCount = 0;
        bool  flag      = bForceReserved || (!bForceAction && this.GetNextAniCount() > 0);
        float crossFade = this.GetCrossFade(anitype, bBlend);

        if (flag)
        {
            this.m_eNextAniTypeList.Add(new NrCharNextAniInfo(anitype, bBlend));
            this.SetNextAnimation(anitype);
            this.m_bProcessStatus = true;
            return(0f);
        }
        if (NrCharAnimation.IsBattleAnimation(anitype))
        {
            eCharAnimationType randomAniType = this.GetRandomAniType(anitype);
            if (this.m_pkParent3DChar != null && this.m_pkParent3DChar.IsHaveAnimation(randomAniType))
            {
                anitype = randomAniType;
            }
        }
        if (!bForceReserved && this.m_pkParent3DChar is Nr3DCharNonePart && !this.m_pkParent3DChar.IsHaveAnimation(anitype))
        {
            anitype = this.GetSafeAniType(anitype);
        }
        this.m_eNextAniTypeList.Clear();
        this.SetCurrentAniType(anitype, crossFade);
        if (this.m_pkParent3DChar.IsBattleChar())
        {
            if (NrCharAnimation.IsIdleAnimation(this.GetNextAniType(anitype)) && !this.m_pkParent3DChar.GetParentBattleChar().IsLastAttacker)
            {
                eCharAnimationType stayAni = this.m_pkParent3DChar.GetParentBattleChar().GetStayAni();
                this.m_eNextAniTypeList.Add(new NrCharNextAniInfo(stayAni, true));
                this.SetNextAnimation(stayAni);
            }
        }
        else
        {
            this.SetNextAnimation(anitype);
        }
        return(this.m_fAnimationLength);
    }
コード例 #25
0
    public bool IsValidAniState(eCharAnimationType _anitype)
    {
        Nr3DCharBase pkParent3DChar = this.m_pkParent3DChar;

        if (pkParent3DChar == null)
        {
            return(false);
        }
        GameObject baseObject = pkParent3DChar.GetBaseObject();

        if (baseObject == null)
        {
            return(false);
        }
        string name = this.m_pkParent3DChar.MakeAnimationKey(_anitype);

        return(baseObject.animation.GetClip(name) != null);
    }
コード例 #26
0
    public override eCharAnimationType GetMoveAnimation()
    {
        eCharAnimationType eCharAnimationType = eCharAnimationType.Walk1;

        if (base.GetSpeed() > 50f)
        {
            eCharAnimationType = eCharAnimationType.Run1;
        }
        if (base.IsBattleChar())
        {
            eCharAnimationType = eCharAnimationType.BRun1;
        }
        if (!base.IsHaveAnimation(eCharAnimationType))
        {
            eCharAnimationType = eCharAnimationType.Walk1;
        }
        return(eCharAnimationType);
    }
コード例 #27
0
    private AnimationClip GetAnimationClip(eCharAnimationType targetani)
    {
        if (this.m_kBaseObject == null)
        {
            return(null);
        }
        if (this.m_kBaseObject.animation == null)
        {
            return(null);
        }
        string        name = this.MakeAnimationKey(targetani);
        AnimationClip clip = this.m_kBaseObject.animation.GetClip(name);

        if (!(clip == null))
        {
            base.SetCurrentAniType(targetani.ToString());
        }
        return(clip);
    }
コード例 #28
0
 public float Ani(string Ani)
 {
     if (!this.IsValidActor())
     {
         return(0f);
     }
     if (this.AniList == null)
     {
         this.AniList = new List <string>();
         string[] names = Enum.GetNames(typeof(eCharAnimationType));
         this.AniList.AddRange(names);
     }
     if (this.AniList.Contains(Ani))
     {
         eCharAnimationType aniType = (eCharAnimationType)((int)Enum.Parse(typeof(eCharAnimationType), Ani));
         this._Actor.SetAnimation(ref aniType);
         return(this._Actor.PlayTimeAniState(aniType));
     }
     return(0f);
 }
コード例 #29
0
        private bool Decide(ref eCharAnimationType AniType)
        {
            if (this.m_ActorBase.GetCharAnimation().GetCurrentAniType() == AniType)
            {
                return(false);
            }
            eCharAnimationType eCharAnimationType = AniType;

            if (eCharAnimationType != eCharAnimationType.Stay1)
            {
                if (eCharAnimationType == eCharAnimationType.TalkStart1)
                {
                    if (this.m_ActorBase.GetCharAnimation().GetCurrentAniType() != eCharAnimationType.Stay1)
                    {
                        return(false);
                    }
                }
                return(true);
            }
            return(true);
        }
コード例 #30
0
    public void SetWeaponTrailAnimation(eCharAnimationType targetani, bool bBlend, bool bForceLoop)
    {
        if (this.m_kWeaponTrailObject == null)
        {
            return;
        }
        if (targetani < eCharAnimationType.Attack1 || targetani > eCharAnimationType.Attack3)
        {
            return;
        }
        string text = targetani.ToString();

        text = text.ToLower();
        Transform child = NkUtil.GetChild(this.m_kWeaponTrailObject.transform, text);

        if (null == child)
        {
            return;
        }
        child.gameObject.SetActive(false);
        child.gameObject.SetActive(true);
    }