Skip to content

Commit c87a15e

Browse files
committed
Mvvm
1 parent 0839355 commit c87a15e

File tree

1,596 files changed

+187981
-187466
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,596 files changed

+187981
-187466
lines changed

.gitignore

Lines changed: 38 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,38 @@
1-
[Ll]ibrary/
2-
[Tt]emp/
3-
[Oo]bj/
4-
[Bb]uild/
5-
[Bb]uilds/
6-
Assets/AssetStoreTools*
7-
8-
# Visual Studio cache directory
9-
.vs/
10-
.vscode/
11-
.idea/
12-
13-
# Autogenerated VS/MD/Consulo solution and project files
14-
ExportedObj/
15-
.consulo/
16-
*.csproj
17-
*.unityproj
18-
*.sln
19-
*.suo
20-
*.tmp
21-
*.user
22-
*.userprefs
23-
*.pidb
24-
*.booproj
25-
*.svd
26-
*.pdb
27-
*.opendb
28-
29-
# Unity3D generated meta files
30-
*.pidb.meta
31-
*.pdb.meta
32-
33-
# Unity3D Generated File On Crash Reports
34-
sysinfo.txt
35-
36-
# Builds
37-
*.apk
38-
*.unitypackage
1+
[Ll]ibrary/
2+
[Tt]emp/
3+
[Oo]bj/
4+
[Bb]uild/
5+
[Bb]uilds/
6+
Assets/AssetStoreTools*
7+
8+
# Visual Studio cache directory
9+
.vs/
10+
.vscode/
11+
.idea/
12+
13+
# Autogenerated VS/MD/Consulo solution and project files
14+
ExportedObj/
15+
.consulo/
16+
*.csproj
17+
*.unityproj
18+
*.sln
19+
*.suo
20+
*.tmp
21+
*.user
22+
*.userprefs
23+
*.pidb
24+
*.booproj
25+
*.svd
26+
*.pdb
27+
*.opendb
28+
29+
# Unity3D generated meta files
30+
*.pidb.meta
31+
*.pdb.meta
32+
33+
# Unity3D Generated File On Crash Reports
34+
sysinfo.txt
35+
36+
# Builds
37+
*.apk
38+
*.unitypackage

Audio.meta

Lines changed: 8 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Audio/AudioComponent.cs

Lines changed: 37 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,38 @@
1-
using System.Collections;
2-
using System.Collections.Generic;
3-
using UnityEngine;
4-
using UnityEngine.Audio;
5-
6-
namespace Wanderer.GameFramework
7-
{
8-
public class AudioComponent : MonoBehaviour
9-
{
10-
//声音混合器
11-
[SerializeField]
12-
private AudioMixer _audioMixer;
13-
14-
private void Awake()
15-
{
16-
//获取所有的音频混合组
17-
List<AudioMixerGroup> amgs = new List<AudioMixerGroup>();
18-
amgs.AddRange(_audioMixer.FindMatchingGroups("Master"));
19-
//music
20-
AudioSource asMusic = gameObject.AddComponent<AudioSource>();
21-
asMusic.volume = 0.8f;
22-
asMusic.playOnAwake = false;
23-
asMusic.loop = true;
24-
asMusic.outputAudioMixerGroup = amgs.Find(x => x.name.Equals("Music"));
25-
//sound
26-
AudioSource asSound = gameObject.AddComponent<AudioSource>();
27-
asSound.playOnAwake = false;
28-
asSound.outputAudioMixerGroup = amgs.Find(x => x.name.Equals("Sound"));
29-
//uiSound
30-
AudioSource asUISound = gameObject.AddComponent<AudioSource>();
31-
asUISound.playOnAwake = false;
32-
asUISound.outputAudioMixerGroup = amgs.Find(x => x.name.Equals("UISound"));
33-
34-
//设置音频管理器
35-
GameFrameworkMode.GetModule<AudioManager>().SetDefaultAudioSource(asMusic,asUISound,asSound);
36-
}
37-
}
1+
using System.Collections;
2+
using System.Collections.Generic;
3+
using UnityEngine;
4+
using UnityEngine.Audio;
5+
6+
namespace Wanderer.GameFramework
7+
{
8+
public class AudioComponent : MonoBehaviour
9+
{
10+
//声音混合器
11+
[SerializeField]
12+
private AudioMixer _audioMixer;
13+
14+
private void Awake()
15+
{
16+
//获取所有的音频混合组
17+
List<AudioMixerGroup> amgs = new List<AudioMixerGroup>();
18+
amgs.AddRange(_audioMixer.FindMatchingGroups("Master"));
19+
//music
20+
AudioSource asMusic = gameObject.AddComponent<AudioSource>();
21+
asMusic.volume = 0.8f;
22+
asMusic.playOnAwake = false;
23+
asMusic.loop = true;
24+
asMusic.outputAudioMixerGroup = amgs.Find(x => x.name.Equals("Music"));
25+
//sound
26+
AudioSource asSound = gameObject.AddComponent<AudioSource>();
27+
asSound.playOnAwake = false;
28+
asSound.outputAudioMixerGroup = amgs.Find(x => x.name.Equals("Sound"));
29+
//uiSound
30+
AudioSource asUISound = gameObject.AddComponent<AudioSource>();
31+
asUISound.playOnAwake = false;
32+
asUISound.outputAudioMixerGroup = amgs.Find(x => x.name.Equals("UISound"));
33+
34+
//设置音频管理器
35+
GameFrameworkMode.GetModule<AudioManager>().SetDefaultAudioSource(asMusic,asUISound,asSound);
36+
}
37+
}
3838
}

Audio/AudioComponent.cs.meta

Lines changed: 11 additions & 11 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)