//TODO is this really the right script for this to live? //Called when there is an exception void LogCallback(string condition, string stackTrace, LogType type) { if (type == LogType.Error || type == LogType.Exception) { AnalyticsLogger.UpdateLogFile(condition + " - " + stackTrace); } }
private void ActivateCurrentLevel() { AnalyticsLogger.UpdateLogFile("--------Level " + (currentLevelNumber + 1) + " activated--------", false, true); int highscore = GameManager.GetHighscore(currentLevelNumber); uiManager.UpdateInfo(currentLevelNumber, highscore); levelManagers[currentLevelNumber].ActivateLevel(); }
public virtual void DeactivateLevel() { HideAllLevelText(); levelActive = false; gameObjectsHolder.SetActive(false); foodPrompt.enabled = false; questionsManager.HideQuestion(); voiceover.Stop(); AnalyticsLogger.UpdateLogFile("Fps over last level: " + numberOfFrames / (Time.time - framerateTimer)); }
private void RandomizeMaze() { AnalyticsLogger.UpdateLogFile("Round " + (currentRound + 1)); int activeMazeVariation = Random.Range(0, 3); for (int i = 0; i < NUMBER_OF_ROUNDS; i++) { mazes[currentRound][i].SetActive(i == activeMazeVariation); } spiderSpotlight.SetTarget(ceilingSpider); }
private void StartNextRound() { AnalyticsLogger.UpdateLogFile("Round " + (currentRound + 1)); raceStartTime = -1; for (int i = 0; i < NUMBER_OF_ROUNDS; i++) { bool indexAtCurrentRound = i == currentRound; spiders[i].SetActive(indexAtCurrentRound); mazes[i].SetActive(indexAtCurrentRound); } spiderSpotlight.SetTarget(spiders[currentRound]); //Debug.Log("SET POS " + spiders[currentRound].gameObject.name); }
public void Begin() { currentLevelNumber = GameManager.startingLevel; AnalyticsLogger.UpdateLogFile("--------Level " + (currentLevelNumber + 1) + " activated--------", false, true); Debug.Log("LEVEL: " + (currentLevelNumber + 1) + "/" + levelManagers.Count); levelManagers[currentLevelNumber].ActivateLevel(); int highscore = GameManager.GetHighscore(currentLevelNumber); if (uiManager == null) { Debug.Log("Warning - UI Manager null in " + gameObject.name + "'s PSM"); uiManager = GameObject.FindGameObjectWithTag("UIManagerObject").GetComponent <UIManager>(); } uiManager.ToggleLevelSelectionUI(false); uiManager.UpdateInfo(currentLevelNumber, highscore); }
public void NextLevel(int suds) { AnalyticsLogger.UpdateLogFile("Level " + (currentLevelNumber + 1) + " completed, score: " + (int)Math.Round(LevelManager.score) + ", SUDS: " + suds); GameManager.UpdateSave(currentLevelNumber, (int)Math.Round(LevelManager.score), suds); //Don't need to deactivate the level here as that happens when the SUDS UI switches on currentLevelNumber++; if (currentLevelNumber < levelManagers.Count) { ActivateCurrentLevel(); } else { //TODO show some kind of special "you finished this mode" screen, return to level selection? } }
private void OnEnable() { AnalyticsLogger.UpdateLogFile("--------Main Menu--------"); for (int i = 0; i < 10; i++) { levelRowManager[i] = LevelRowGO[i].GetComponent <LevelSelectionRowManager>(); //TODO deal with 2 and 3 stars float score = GameManager.GetHighscore(i); if (score == 100) { //Debug.Log("Setting stars"); levelRowManager[i].SetNumberOfStars(1); } else { levelRowManager[i].SetScore(GameManager.GetHighscore(i)); //TODO deal with stars } } }
private SpiderManager GetSpiderManager() { SpiderManager[] spiderManagers = gameObject.GetComponents <SpiderManager>(); //If we have two spider managers, disable the ceiling spider manager and return the other one if (spiderManagers.Length > 1) { foreach (SpiderManager managerInArray in spiderManagers) { if (managerInArray is CeilingSpiderFollowController && managerInArray.enabled) { AnalyticsLogger.UpdateLogFile("Ceiling spider grabbed off silk"); ((CeilingSpiderFollowController)managerInArray).SwitchToRandomPathing(); } else { spiderManager = managerInArray; } } } return(spiderManager); }
public override void Awake() { base.Awake(); //Setup initial prefs if (PlayerPrefs.GetInt(SettingsManager.graphicsSettingName) == 0) { //If this is the first boot of the system, and player is using a quest, turn on performance lighting if (OVRPlugin.GetSystemHeadsetType() == OVRPlugin.SystemHeadset.Oculus_Quest || OVRPlugin.GetSystemHeadsetType() == OVRPlugin.SystemHeadset.Oculus_Quest_2 || OVRPlugin.GetSystemHeadsetType() == OVRPlugin.SystemHeadset.Oculus_Link_Quest || OVRPlugin.GetSystemHeadsetType() == OVRPlugin.SystemHeadset.Oculus_Link_Quest_2) { AnalyticsLogger.UpdateLogFile("Detecting Oculus Quest - lowering lighting quality"); PlayerPrefs.SetInt(SettingsManager.graphicsSettingName, 1); TogglePerformanceLighting(true); } else { PlayerPrefs.SetInt(SettingsManager.graphicsSettingName, 2); } } else if (PlayerPrefs.GetInt(SettingsManager.graphicsSettingName) == 1) { TogglePerformanceLighting(true); } if (PlayerPrefs.GetInt(SettingsManager.colorblindSettingName) == 0) { PlayerPrefs.SetInt(SettingsManager.colorblindSettingName, 1); } if (PlayerPrefs.GetInt(SettingsManager.usageDataSettingName) == 0) { PlayerPrefs.SetInt(SettingsManager.usageDataSettingName, 2); } }
protected virtual void BumpOffSurface() { rb.AddForce(localUp * BUMP_FORCE, ForceMode.Impulse); AnalyticsLogger.UpdateLogFile("Spider fell off surface"); }
public void ResetLevel(int suds) { AnalyticsLogger.UpdateLogFile("---Level " + (currentLevelNumber + 1) + " reset with score " + (int)LevelManager.score + " and SUDS " + suds + "---"); SubmitLevelDetails(suds); ResetLevel(); }
public void ResetLevel() { AnalyticsLogger.UpdateLogFile("---Level " + (currentLevelNumber + 1) + " reset with score " + (int)LevelManager.score + "---"); levelManagers[currentLevelNumber].ResetLevel(); }
private void Awake() { AnalyticsLogger.UpdateLogFile("------------------- NEW SESSION " + OVRPlugin.GetSystemHeadsetType().ToString() + " -------------------", true); }