Beispiel #1
0
    public int GetHitAniCount(string bundleName, int weaponkey, int anitype)
    {
        NkCharAniInfo charAniInfo = this.GetCharAniInfo(bundleName);

        if (charAniInfo == null)
        {
            return(-1);
        }
        return(charAniInfo.GetHitAniCount(weaponkey, anitype));
    }
Beispiel #2
0
    public float GetAnimationEvent(string bundleName, int weaponkey, int anitype, int eventype)
    {
        NkCharAniInfo charAniInfo = this.GetCharAniInfo(bundleName);

        if (charAniInfo == null)
        {
            return(1f);
        }
        return(charAniInfo.GetAnimationEvent(weaponkey, anitype, eventype));
    }
    public NkCharAniInfo GetCharAniInfo(string bundlename)
    {
        if (!this.m_kCharAniInfoList.ContainsKey(bundlename))
        {
            NkCharAniInfo value = new NkCharAniInfo();
            this.m_kCharAniInfoList.Add(bundlename, value);
        }
        NkCharAniInfo result = null;

        if (!this.m_kCharAniInfoList.TryGetValue(bundlename, out result))
        {
            return(null);
        }
        return(result);
    }
    public void SetAniInfo(ref CHARKIND_ANIINFO aniinfo)
    {
        int            weaponkey      = 0;
        NrCharKindInfo nrCharKindInfo = NrTSingleton <NrCharKindInfoManager> .Instance.GetCharKindInfoFromBundleName(aniinfo.BUNDLENAME);

        if (nrCharKindInfo != null && nrCharKindInfo.IsATB(1L))
        {
            int weaponType = NrTSingleton <NkWeaponTypeInfoManager> .Instance.GetWeaponType(aniinfo.WEAPONTYPE);

            if (weaponType != nrCharKindInfo.GetWeaponType())
            {
                weaponkey = 1;
            }
        }
        int           charAniTypeForEvent = (int)this.m_kCharDataCodeInfo.GetCharAniTypeForEvent(aniinfo.ANITYPE);
        int           charAniEvent        = (int)this.m_kCharDataCodeInfo.GetCharAniEvent(aniinfo.EVENTTYPE);
        NkCharAniInfo charAniInfo         = this.GetCharAniInfo(aniinfo.BUNDLENAME);

        if (charAniInfo != null)
        {
            charAniInfo.SetAniEventTime(weaponkey, charAniTypeForEvent, charAniEvent, aniinfo.EVENTTIME);
            NkCharAniMapInfo charAniMapInfo = this.GetCharAniMapInfo(aniinfo.BUNDLENAME);
            if (charAniMapInfo != null)
            {
                List <int> charKindList = charAniMapInfo.GetCharKindList();
                foreach (int current in charKindList)
                {
                    nrCharKindInfo = this.GetCharKindInfo(current);
                    if (nrCharKindInfo != null)
                    {
                        nrCharKindInfo.SetAniInfo(ref charAniInfo);
                    }
                }
            }
        }
    }
Beispiel #5
0
    public void SetAniInfo(ref CHARKIND_ANIINFO aniinfo)
    {
        int            weaponkey = 0;
        NrCharKindInfo charKindInfoFromBundleName = NrTSingleton <NrCharKindInfoManager> .Instance.GetCharKindInfoFromBundleName(aniinfo.BUNDLENAME);

        if (charKindInfoFromBundleName != null && charKindInfoFromBundleName.IsATB(1L))
        {
            int weaponType = NrTSingleton <NkWeaponTypeInfoManager> .Instance.GetWeaponType(aniinfo.WEAPONTYPE);

            if (weaponType != charKindInfoFromBundleName.GetWeaponType())
            {
                weaponkey = 1;
            }
        }
        int           charAniTypeForEvent = (int)this.m_kCharDataCodeInfo.GetCharAniTypeForEvent(aniinfo.ANITYPE);
        int           charAniEvent        = (int)this.m_kCharDataCodeInfo.GetCharAniEvent(aniinfo.EVENTTYPE);
        NkCharAniInfo charAniInfo         = this.GetCharAniInfo(aniinfo.BUNDLENAME);

        if (charAniInfo == null)
        {
            return;
        }
        charAniInfo.SetAniEventTime(weaponkey, charAniTypeForEvent, charAniEvent, aniinfo.EVENTTIME);
    }
 public void SetAniInfo(ref NkCharAniInfo aniinfo)
 {
     this.m_pkCharAniInfo = aniinfo;
 }