| | |
| | | Play("放下宝石", true); |
| | | break; |
| | | case AudioEnum.FireTAttack: |
| | | Play("火攻击", true); |
| | | Play("火攻击", true, 0.5f); |
| | | break; |
| | | case AudioEnum.WaterTAttack: |
| | | Play("水攻击", true); |
| | | Play("水攻击", true, 0.5f); |
| | | break; |
| | | case AudioEnum.WoodTAttack: |
| | | Play("木攻击", true); |
| | | Play("木攻击", true, 0.5f); |
| | | break; |
| | | case AudioEnum.LightningSkill: |
| | | Play("电技能", true); |
| | |
| | | |
| | | Dictionary<string, AudioClip> clipDic; |
| | | |
| | | private void Play(string musicName, bool isOneShot) |
| | | private void Play(string musicName, bool isOneShot, float volume = 1.0f) |
| | | { |
| | | AudioClip au = LoadAudioClip(musicName); |
| | | AudioSource tmpAudioSource; |
| | |
| | | tmpAudioSource = audioSourceList[0]; |
| | | tmpAudioSource.clip = au; |
| | | tmpAudioSource.loop = true; |
| | | tmpAudioSource.volume = volume; |
| | | } |
| | | tmpAudioSource.Play(); |
| | | } |