Commit e666d5aa authored by Ben Huber's avatar Ben Huber
Browse files

bugfixes and reset stats button for testing

parent cfb06f53
......@@ -23,9 +23,9 @@ public class AudioTrigger : MonoBehaviour {
}
private void OnTriggerEnter(Collider other) {
if (!triggered[text] || repeatable) {
if (repeatable || !triggered[text]) {
if(Narration.instance.Play(Menu.LangIsEnglish()?voiceLine_EN:voiceLine, Menu.LangIsEnglish() ? text_EN : text, textColor)) {
if (repeatable) {
if (!repeatable) {
triggered[text] = true;
// check if this was the last.... dirty hack: assume fixed number of narration bits that can be found
if (triggered.Count == 13 && triggered.All(t => t.Value)) {
......
......@@ -12,7 +12,7 @@ public class InfoActivatable : Activatable {
Keyword myKeyword;
static Dictionary<string, bool> read;
static Dictionary<string, bool> read = new Dictionary<string, bool>();
private void Awake() {
myKeyword = GetComponent<Keyword>();
......
......@@ -17,7 +17,8 @@ public class Menu : MonoBehaviour
bool start = true;
private void Awake()
// in Start rather than Awake to make sure that the Music instance already exists and its volume can be set
private void Start()
{
selectedLanguage = (Language)PlayerPrefs.GetInt("language", (Application.systemLanguage == SystemLanguage.German ? 1 : 0));
languageDropdown.value = (int)selectedLanguage;
......@@ -33,7 +34,7 @@ public class Menu : MonoBehaviour
muteToggle.isOn = muted;
SetMuted(muted);
if (Music.instance) Music.instance.auds.volume = muted ? 0f : musicVolume;
//if (Music.instance) Music.instance.auds.volume = muted ? 0f : musicVolume;
sub = PlayerPrefs.GetInt("sub", 1) == 1;
subToggle.isOn = sub;
......
......@@ -8,6 +8,7 @@ public class TestSteam : MonoBehaviour
private CGameID m_GameID;
bool init = false;
public bool resetAchievements = false;
protected Callback<UserAchievementStored_t> m_UserAchievementStored;
private void Awake() {
......@@ -16,13 +17,11 @@ public class TestSteam : MonoBehaviour
private void Update() {
if (SteamManager.Initialized && !init) {
Debug.Log(SteamFriends.GetPersonaName());
m_GameID = new CGameID(SteamUtils.GetAppID());
Debug.Log("RequestCurrentStats(): " + SteamUserStats.RequestCurrentStats());
//SteamUserStats.SetAchievement("START");
Debug.Log("StoreStats(): " + SteamUserStats.StoreStats());
init = true;
if (SteamManager.Initialized && resetAchievements) {
SteamUserStats.ResetAllStats(true);
SteamUserStats.RequestCurrentStats();
resetAchievements = false;
Debug.LogWarning("Reset all user achievements and stats!");
}
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment