wangguan
2020-12-08 0532886c74aeb4e7910810148f8dc01280eebfd3
音效修改
14 files added
12 files modified
383 ■■■■■ changed files
Assets/Materials/PVE/PVEBg3.png patch | view | raw | blame | history
Assets/Materials/PVE/PVEBg3.png.meta 118 ●●●●● patch | view | raw | blame | history
Assets/Resources/Music/UI按键.mp3 patch | view | raw | blame | history
Assets/Resources/Music/UI按键.mp3.meta 2 ●●● patch | view | raw | blame | history
Assets/Resources/Music/不可点击_错误.wav patch | view | raw | blame | history
Assets/Resources/Music/不可点击_错误.wav.meta 2 ●●● patch | view | raw | blame | history
Assets/Resources/Music/冰淇淋技能.wav patch | view | raw | blame | history
Assets/Resources/Music/冰淇淋技能.wav.meta 22 ●●●●● patch | view | raw | blame | history
Assets/Resources/Music/合成.wav patch | view | raw | blame | history
Assets/Resources/Music/合成.wav.meta 22 ●●●●● patch | view | raw | blame | history
Assets/Resources/Music/气泡.mp3 patch | view | raw | blame | history
Assets/Resources/Music/气泡.mp3.meta 22 ●●●●● patch | view | raw | blame | history
Assets/Resources/Music/火焰喷射.mp3 patch | view | raw | blame | history
Assets/Resources/Music/火焰喷射.mp3.meta 22 ●●●●● patch | view | raw | blame | history
Assets/Resources/Music/玉米狙击子弹.wav patch | view | raw | blame | history
Assets/Resources/Music/玉米狙击子弹.wav.meta 22 ●●●●● patch | view | raw | blame | history
Assets/Resources/Music/结算分数.wav patch | view | raw | blame | history
Assets/Resources/Music/结算分数.wav.meta 22 ●●●●● patch | view | raw | blame | history
Assets/Scripts/Music/AudioSourceManager.cs 94 ●●●●● patch | view | raw | blame | history
Assets/Scripts/TowerDefense/Affectors/AttackAffector.cs 14 ●●●●● patch | view | raw | blame | history
Assets/Scripts/TowerDefense/Level/EndlessWaveLineManager.cs 2 ●●● patch | view | raw | blame | history
Assets/Scripts/TowerDefense/Towers/Tower.cs 4 ●●●● patch | view | raw | blame | history
Assets/Scripts/TowerDefense/UI/EndlessBuffPreview.cs 3 ●●●●● patch | view | raw | blame | history
Assets/Scripts/TowerDefense/UI/FreezeBreath.cs 2 ●●●●● patch | view | raw | blame | history
Assets/Scripts/TowerDefense/UI/HUD/EndlessGameUI.cs 1 ●●●● patch | view | raw | blame | history
Assets/Scripts/UI/FinalPanel/FinalPanel.cs 9 ●●●● patch | view | raw | blame | history
Assets/Materials/PVE/PVEBg3.png
Assets/Materials/PVE/PVEBg3.png.meta
New file
@@ -0,0 +1,118 @@
fileFormatVersion: 2
guid: df741809ad1319241863d54531c72864
TextureImporter:
  internalIDToNameTable: []
  externalObjects: {}
  serializedVersion: 11
  mipmaps:
    mipMapMode: 0
    enableMipMap: 1
    sRGBTexture: 1
    linearTexture: 0
    fadeOut: 0
    borderMipMap: 0
    mipMapsPreserveCoverage: 0
    alphaTestReferenceValue: 0.5
    mipMapFadeDistanceStart: 1
    mipMapFadeDistanceEnd: 3
  bumpmap:
    convertToNormalMap: 0
    externalNormalMap: 0
    heightScale: 0.25
    normalMapFilter: 0
  isReadable: 0
  streamingMipmaps: 0
  streamingMipmapsPriority: 0
  vTOnly: 0
  grayScaleToAlpha: 0
  generateCubemap: 6
  cubemapConvolution: 0
  seamlessCubemap: 0
  textureFormat: 1
  maxTextureSize: 2048
  textureSettings:
    serializedVersion: 2
    filterMode: -1
    aniso: -1
    mipBias: -100
    wrapU: 1
    wrapV: 1
    wrapW: 1
  nPOTScale: 0
  lightmap: 0
  compressionQuality: 50
  spriteMode: 0
  spriteExtrude: 1
  spriteMeshType: 1
  alignment: 0
  spritePivot: {x: 0.5, y: 0.5}
  spritePixelsToUnits: 100
  spriteBorder: {x: 0, y: 0, z: 0, w: 0}
  spriteGenerateFallbackPhysicsShape: 1
  alphaUsage: 1
  alphaIsTransparency: 0
  spriteTessellationDetail: -1
  textureType: 0
  textureShape: 1
  singleChannelComponent: 0
  maxTextureSizeSet: 0
  compressionQualitySet: 0
  textureFormatSet: 0
  ignorePngGamma: 0
  applyGammaDecoding: 0
  platformSettings:
  - serializedVersion: 3
    buildTarget: DefaultTexturePlatform
    maxTextureSize: 2048
    resizeAlgorithm: 0
    textureFormat: -1
    textureCompression: 1
    compressionQuality: 50
    crunchedCompression: 0
    allowsAlphaSplitting: 0
    overridden: 0
    androidETC2FallbackOverride: 0
    forceMaximumCompressionQuality_BC6H_BC7: 0
  - serializedVersion: 3
    buildTarget: Standalone
    maxTextureSize: 2048
    resizeAlgorithm: 0
    textureFormat: -1
    textureCompression: 1
    compressionQuality: 50
    crunchedCompression: 0
    allowsAlphaSplitting: 0
    overridden: 0
    androidETC2FallbackOverride: 0
    forceMaximumCompressionQuality_BC6H_BC7: 0
  - serializedVersion: 3
    buildTarget: Android
    maxTextureSize: 2048
    resizeAlgorithm: 0
    textureFormat: -1
    textureCompression: 1
    compressionQuality: 50
    crunchedCompression: 0
    allowsAlphaSplitting: 0
    overridden: 0
    androidETC2FallbackOverride: 0
    forceMaximumCompressionQuality_BC6H_BC7: 0
  spriteSheet:
    serializedVersion: 2
    sprites: []
    outline: []
    physicsShape: []
    bones: []
    spriteID:
    internalID: 0
    vertices: []
    indices:
    edges: []
    weights: []
    secondaryTextures: []
  spritePackingTag:
  pSDRemoveMatte: 0
  pSDShowRemoveMatteOption: 0
  userData:
  assetBundleName:
  assetBundleVariant:
Assets/Resources/Music/UI按键.mp3
Binary files differ
Assets/Resources/Music/UI按键.mp3.meta
@@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 43808f08f96a2ed4c878dd497c285654
guid: 9193840e52801ad409ab5781c1d40393
AudioImporter:
  externalObjects: {}
  serializedVersion: 6
Assets/Resources/Music/不可点击_错误.wav
Binary files differ
Assets/Resources/Music/不可点击_错误.wav.meta
@@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 0782288ff0426494da2f384e99479605
guid: 81561e41397957f48ab2f372e645cace
AudioImporter:
  externalObjects: {}
  serializedVersion: 6
Assets/Resources/Music/冰淇淋技能.wav
Binary files differ
Assets/Resources/Music/冰淇淋技能.wav.meta
New file
@@ -0,0 +1,22 @@
fileFormatVersion: 2
guid: 139ce7505158f5d43939f843fa2edaed
AudioImporter:
  externalObjects: {}
  serializedVersion: 6
  defaultSettings:
    loadType: 0
    sampleRateSetting: 0
    sampleRateOverride: 44100
    compressionFormat: 1
    quality: 1
    conversionMode: 0
  platformSettingOverrides: {}
  forceToMono: 0
  normalize: 1
  preloadAudioData: 1
  loadInBackground: 0
  ambisonic: 0
  3D: 1
  userData:
  assetBundleName:
  assetBundleVariant:
Assets/Resources/Music/合成.wav
Binary files differ
Assets/Resources/Music/合成.wav.meta
New file
@@ -0,0 +1,22 @@
fileFormatVersion: 2
guid: 946675980693ebe48adba65acf892cd7
AudioImporter:
  externalObjects: {}
  serializedVersion: 6
  defaultSettings:
    loadType: 0
    sampleRateSetting: 0
    sampleRateOverride: 44100
    compressionFormat: 1
    quality: 1
    conversionMode: 0
  platformSettingOverrides: {}
  forceToMono: 0
  normalize: 1
  preloadAudioData: 1
  loadInBackground: 0
  ambisonic: 0
  3D: 1
  userData:
  assetBundleName:
  assetBundleVariant:
Assets/Resources/Music/气泡.mp3
Binary files differ
Assets/Resources/Music/气泡.mp3.meta
New file
@@ -0,0 +1,22 @@
fileFormatVersion: 2
guid: 17e0177a9aad5f44eb1d4b9d0bad579c
AudioImporter:
  externalObjects: {}
  serializedVersion: 6
  defaultSettings:
    loadType: 0
    sampleRateSetting: 0
    sampleRateOverride: 44100
    compressionFormat: 1
    quality: 1
    conversionMode: 0
  platformSettingOverrides: {}
  forceToMono: 0
  normalize: 1
  preloadAudioData: 1
  loadInBackground: 0
  ambisonic: 0
  3D: 1
  userData:
  assetBundleName:
  assetBundleVariant:
Assets/Resources/Music/火焰喷射.mp3
Binary files differ
Assets/Resources/Music/火焰喷射.mp3.meta
New file
@@ -0,0 +1,22 @@
fileFormatVersion: 2
guid: 5743ca16c454add418d25094cd36518f
AudioImporter:
  externalObjects: {}
  serializedVersion: 6
  defaultSettings:
    loadType: 0
    sampleRateSetting: 0
    sampleRateOverride: 44100
    compressionFormat: 1
    quality: 1
    conversionMode: 0
  platformSettingOverrides: {}
  forceToMono: 0
  normalize: 1
  preloadAudioData: 1
  loadInBackground: 0
  ambisonic: 0
  3D: 1
  userData:
  assetBundleName:
  assetBundleVariant:
Assets/Resources/Music/玉米狙击子弹.wav
Binary files differ
Assets/Resources/Music/玉米狙击子弹.wav.meta
New file
@@ -0,0 +1,22 @@
fileFormatVersion: 2
guid: 6b65df1e5f826bc4891c2f99526286ac
AudioImporter:
  externalObjects: {}
  serializedVersion: 6
  defaultSettings:
    loadType: 0
    sampleRateSetting: 0
    sampleRateOverride: 44100
    compressionFormat: 1
    quality: 1
    conversionMode: 0
  platformSettingOverrides: {}
  forceToMono: 0
  normalize: 1
  preloadAudioData: 1
  loadInBackground: 0
  ambisonic: 0
  3D: 1
  userData:
  assetBundleName:
  assetBundleVariant:
Assets/Resources/Music/结算分数.wav
Binary files differ
Assets/Resources/Music/结算分数.wav.meta
New file
@@ -0,0 +1,22 @@
fileFormatVersion: 2
guid: 23e14dfcf5043814ab4d4dee151adc20
AudioImporter:
  externalObjects: {}
  serializedVersion: 6
  defaultSettings:
    loadType: 0
    sampleRateSetting: 0
    sampleRateOverride: 44100
    compressionFormat: 1
    quality: 1
    conversionMode: 0
  platformSettingOverrides: {}
  forceToMono: 0
  normalize: 1
  preloadAudioData: 1
  loadInBackground: 0
  ambisonic: 0
  3D: 1
  userData:
  assetBundleName:
  assetBundleVariant:
Assets/Scripts/Music/AudioSourceManager.cs
@@ -1,4 +1,5 @@
using System.Collections;
using System.Security.Cryptography.X509Certificates;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
@@ -19,7 +20,13 @@
    WaterTAttack,//水攻击
    WoodTAttack,//木攻击
    LightningSkill,//电技能
    FireSkill//火技能
    FireSkill,//火技能
    FinalScore,//结算分数滚动效果
    BossWaterSkill,//气泡
    WaterTowerSkill,//冰淇淋技能
    WoodSkill,//玉米狙击子弹
    Upgrade,//合成
}
public class AudioSourceManager : MonoBehaviour
{
@@ -65,7 +72,7 @@
        return tmpAudioSource;
    }
    private AudioClip LoadAudioClip(string musicName)
    public AudioClip LoadAudioClip(string musicName)
    {
        if (clipDic.ContainsKey(musicName))
            return clipDic[musicName];
@@ -75,7 +82,6 @@
            clipDic.Add(musicName, au);
            return au;
        }
    }
    public void Play(AudioEnum en)
@@ -130,10 +136,31 @@
                Play("电技能", true);
                break;
            case AudioEnum.FireSkill:
                Play("火技能", true);
                Debug.Log("火焰喷射");
                Play("火焰喷射", true);
                break;
            case AudioEnum.FinalScore:
                Debug.Log("结算分数");
                Play("结算分数", true);
                break;
            case AudioEnum.BossWaterSkill:
                //Play("气泡", true);
                PlayBossWaterSkill("气泡");
                break;
            case AudioEnum.WaterTowerSkill:
                Play("冰淇淋技能", true);
                break;
            case AudioEnum.WoodSkill:
                Play("玉米狙击子弹", true);
                break;
            case AudioEnum.Upgrade:
                Debug.Log("合成");
                Play("合成", true);
                break;
        }
    }
@@ -166,6 +193,63 @@
        tmpAudioSource.volume = volume;
    }
    AudioSource bossWaterSkillAS;
    /// <summary>
    /// BOSS气泡技能 38秒钟,所以不用循环播放
    /// </summary>
    /// <param name="musicName"></param>
    /// <param name="volume"></param>
    private void PlayBossWaterSkill(string musicName, float volume = 1.0f)
    {
        Debug.Log("BOSS气泡技能 38秒钟,所以不用循环播放");
        AudioClip au = LoadAudioClip(musicName);
        bossWaterSkillAS = GetAudioSource();
        bossWaterSkillAS.clip = au;
        bossWaterSkillAS.loop = false;
        bossWaterSkillAS.Play();
        bossWaterSkillAS.volume = volume;
    }
    /// <summary>
    /// BOSS气泡技能结束
    /// </summary>
    public void StopBossWaterSkill()
    {
        Debug.Log("BOSS气泡技能结束");
        if (bossWaterSkillAS != null)
        {
            bossWaterSkillAS.Stop();
            bossWaterSkillAS.clip = null;
            if (audioSourceList.Count > 5)
            {
                audioSourceList.Remove(bossWaterSkillAS);
                Destroy(bossWaterSkillAS);
                bossWaterSkillAS = null;
            }
        }
    }
    /// <summary>
    /// 暂停背景音乐
    /// </summary>
    public void StopBGAudio()
    {
        if (!audioSourceList[0].isPlaying)
            audioSourceList[0].Stop();
    }
    /// <summary>
    /// 继续背景音乐
    /// </summary>
    public void RestartBGAudio()
    {
        if (!audioSourceList[0].isPlaying)
            audioSourceList[0].Play();
    }
    /// <summary>
    /// 销毁音效
    /// </summary>
Assets/Scripts/TowerDefense/Affectors/AttackAffector.cs
@@ -238,6 +238,7 @@
        }
        private AudioEnum audioEnum;//当前音乐的种类
        bool isWoodAudio;
        void GetAudioEnum()
        {
@@ -607,6 +608,7 @@
                    tmpDamager.damage = damagerProjectile.damage;
                    tmpDamager.IsEnhancedBullet = true;
                    tmpDamager.TowerPtr = towerPtr;
                    isWoodAudio = true;
                }
                // 下一颗子弹是强化子弹,然后直接蓄力
@@ -628,7 +630,17 @@
            {
                m_Launcher.Launch(m_TrackingEnemy, go, projectilePoints);
                if (AudioSourceManager.Ins)
                    AudioSourceManager.Ins.Play(audioEnum);
                {
                    if (isWoodAudio)
                    {
                        isWoodAudio = false;
                        AudioSourceManager.Ins.Play(AudioEnum.WoodSkill);
                    }
                    else
                    {
                        AudioSourceManager.Ins.Play(audioEnum);
                    }
                }
            }
        }
Assets/Scripts/TowerDefense/Level/EndlessWaveLineManager.cs
@@ -79,10 +79,10 @@
                ps = obj.transform.GetChild(0).GetComponent<ParticleSystem>();
            ps.transform.position = EndlessLevelManager.instance.WaveManager.GetWaveEndPos(i);
            ps.Play();
            AudioSourceManager.Ins.Play(AudioEnum.FireSkill);
            Destroy(obj, 5f);
        }
        AudioSourceManager.Ins.Play(AudioEnum.FireSkill);
    }
    /// <summary>
Assets/Scripts/TowerDefense/Towers/Tower.cs
@@ -377,6 +377,8 @@
            obj.transform.position = transform.position;
            obj.transform.GetChild(0).GetComponent<ParticleSystem>().Play();
            Destroy(obj, 1.2f);
            AudioSourceManager.Ins.StopBossWaterSkill();
        }
        /// <summary>
@@ -395,6 +397,8 @@
            pos.y += gridPosition.y == 3 ? 2f : 1f;
            bondageObj.transform.position = pos;
            bondageObj.transform.GetChild(0).GetComponent<ParticleSystem>().Play();
            AudioSourceManager.Ins.Play(AudioEnum.BossWaterSkill);
        }
        /// <summary>
Assets/Scripts/TowerDefense/UI/EndlessBuffPreview.cs
@@ -92,12 +92,15 @@
            Time.timeScale = 0;
            Panel.SetActive(true);
            Refresh();
            AudioSourceManager.Ins.StopBGAudio();
        }
        private void HideBuffPreview()
        {
            Time.timeScale = preTimeScale;
            Panel.SetActive(false);
            AudioSourceManager.Ins.RestartBGAudio();
        }
    }
}
Assets/Scripts/TowerDefense/UI/FreezeBreath.cs
@@ -184,6 +184,8 @@
            ps.transform.position = EndlessLevelManager.instance.WaveManager.GetWaveEndPos(waveLineId);
            ps.Play();
            AudioSourceManager.Ins.Play(AudioEnum.WaterTowerSkill);
        }
    }
}
Assets/Scripts/TowerDefense/UI/HUD/EndlessGameUI.cs
@@ -1723,6 +1723,7 @@
        public void PlayUpgradeEffect(Tower newTower)
        {
            newTower.CurrentTowerLevel.PlayUpGradeEffect();
            AudioSourceManager.Ins.Play(AudioEnum.Upgrade);
        }
        /// <summary>
Assets/Scripts/UI/FinalPanel/FinalPanel.cs
@@ -219,13 +219,19 @@
        agentTweenSeq.Join(Image2.DOFade(1, imageTime));
        Image Image3 = transform.Find("Image3").GetComponent<Image>();
        agentTweenSeq.Append(Image3.transform.DOScale(Vector3.one, imageTime).SetEase(Ease.InOutBack));//变化图片大小
        agentTweenSeq.Join(Image3.DOFade(1, imageTime));
        agentTweenSeq.AppendCallback(() =>
       {
           Debug.Log("开始播放声音");
           AudioSourceManager.Ins.Play(AudioEnum.FinalScore);
       });
        agentTweenSeq.Join(DOTween.To(delegate (float value)
        {
            var temp = Math.Floor(value);
            scoreText.text = temp + "";
        }, 0, _myScore, 1.0f));
        }, 0, _myScore, 1.71f));
        agentTweenSeq.AppendCallback(StartLoadLargeData);
        tsLight = transform.Find("ImageLight");
@@ -342,6 +348,7 @@
    /// </summary>
    protected void RotateLight()
    {
        Debug.Log("开始旋转");
        isRotate = true;
        offect = 0;
    }