-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added many new things, changed some others.
- Loading branch information
1 parent
ecd7d9c
commit fece5e4
Showing
13 changed files
with
2,231 additions
and
325 deletions.
There are no files selected for viewing
2,412 changes: 2,091 additions & 321 deletions
2,412
Ghostrunner Speedrun Randomizer/Assets/Scenes/SampleScene.unity
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
47 changes: 47 additions & 0 deletions
47
Ghostrunner Speedrun Randomizer/Assets/Scripts/VolumeAdjust.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
using System.IO; | ||
using UnityEngine; | ||
using UnityEngine.UI; | ||
|
||
public class VolumeAdjust : MonoBehaviour | ||
{ | ||
|
||
public Slider soundEffectSlider; | ||
public Slider musicSlider; | ||
public string fileName; | ||
|
||
[Space] | ||
public AudioSource[] soundEffects; | ||
public AudioSource[] music; | ||
|
||
private void Start() | ||
{ | ||
string path = Path.Combine(Application.streamingAssetsPath, fileName); | ||
if (File.Exists(path)) | ||
{ | ||
string[] contents = File.ReadAllLines(path); | ||
soundEffectSlider.value = float.Parse(contents[0]); | ||
musicSlider.value = float.Parse(contents[1]); | ||
} | ||
} | ||
|
||
void Update() | ||
{ | ||
string path = Path.Combine(Application.streamingAssetsPath, fileName); | ||
|
||
string[] contents = new string[2]; | ||
contents[0] = soundEffectSlider.value.ToString(); | ||
contents[1] = musicSlider.value.ToString(); | ||
|
||
File.WriteAllLines(path, contents); | ||
|
||
foreach (AudioSource source in soundEffects) | ||
{ | ||
source.volume = soundEffectSlider.value; | ||
} | ||
|
||
foreach (AudioSource source in music) | ||
{ | ||
source.volume = musicSlider.value; | ||
} | ||
} | ||
} |
11 changes: 11 additions & 0 deletions
11
Ghostrunner Speedrun Randomizer/Assets/Scripts/VolumeAdjust.cs.meta
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
4 changes: 4 additions & 0 deletions
4
Ghostrunner Speedrun Randomizer/Assets/StreamingAssets/Bounds.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
In-Bounds | ||
Out of Bounds | ||
Any Bounds | ||
Either One |
7 changes: 7 additions & 0 deletions
7
Ghostrunner Speedrun Randomizer/Assets/StreamingAssets/Bounds.txt.meta
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
6 changes: 4 additions & 2 deletions
6
Ghostrunner Speedrun Randomizer/Assets/StreamingAssets/Kills.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
All Kills | ||
No Kills (Not including required) | ||
Any | ||
No Kills (Unless Required) | ||
Any Kills | ||
1 Kill per Room (Required kills allowed) | ||
All Kills (Includes Crawlers) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 2 additions & 0 deletions
2
Ghostrunner Speedrun Randomizer/Assets/StreamingAssets/VolumeSettings.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
0.2 | ||
0.1 |
7 changes: 7 additions & 0 deletions
7
Ghostrunner Speedrun Randomizer/Assets/StreamingAssets/VolumeSettings.txt.meta
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.