Beispiel #1
0
        public void PlayEffect(HitEffectType hitEffectType, MatType matType, Vector3 worldPos)
        {
            try
            {
                string          key             = hitEffectType.ToString() + "_" + matType.ToString();
                string          AudioID         = AudioIDDic[key.ToLower()];
                AudioAttackName audioAttackName = AudioNameDic[AudioID];

                string AudioKey = "";
                int    temp     = UnityEngine.Random.Range(0, 3);
                switch (temp)
                {
                case 0:
                    AudioKey = audioAttackName.AudioName1;
                    break;

                case 1:
                    AudioKey = audioAttackName.AudioName2;
                    break;

                case 2:
                    AudioKey = audioAttackName.AudioName3;
                    break;
                }
                PlayEffect(AudioKey, worldPos);
            }
            catch (Exception e)
            {
                Console.WriteLine(e);
            }
            finally
            {
            }
        }
        public override string ToString()
        {
            string mate = Type.ToString();

            mate = Char.ToUpper(mate[0]) + mate.Substring(1).ToLower().Replace("_", " ");

            return("GSA Material " + mate);
        }
        private string GetEffectId(WalkType walkType, MatType groundMatType)
        {
            string          key = walkType.ToString() + "_" + groundMatType.ToString();
            RoleInteraction roleInteraction;

            if (roleInteractionDic.TryGetValue(key, out roleInteraction))
            {
                Debug.Log("roleInteraction.EffectsKey为" + roleInteraction.hurtEffect);
                return(roleInteraction.hurtEffect);
            }
            return(null);
        }
Beispiel #4
0
        public HitAndMatData GetHitAndMatData(HitEffectType hitEffectType, MatType matType)
        {
            string key = hitEffectType.ToString().ToLower() + "_" + matType.ToString().ToLower();

            return(GetHitAndMatData(key));
        }