// Set-up void Start() { moveUp = true; moveDown = false; //if (cardioWall == false) { hCal = GameObject.Find("HeightCalibrator").GetComponent <HeightCalibrator>(); height = hCal.GetWallAdjustedHeight(); } //else { // height = 0; } }
private void Start() { hitBox = GameObject.Find("Player").GetComponent <PlayerHitBox>(); hCal = GameObject.Find("HeightCalibrator").GetComponent <HeightCalibrator>(); if (leftHand == true) { hand = SteamVR_Input_Sources.LeftHand; } else { hand = SteamVR_Input_Sources.RightHand; } // Get the wand info for when we force close menuInterations[0] = this.transform.parent.Find("Controller (left)").GetComponent <WandControlMenuInteraction>(); menuInterations[1] = this.transform.parent.Find("Controller (right)").GetComponent <WandControlMenuInteraction>(); pausePos = new Vector3(.1f, .15f, -.15f); pauseRot = new Vector3(-45, 180, 0); }
// Start is called before the first frame update void Start() { // Disable all gyms for (int i = 0; i < gyms.Length; i++) { gyms[i].SetActive(false); } // Re - enable the one we want(or random if rand selected) int gymToEnable = PlayerPrefs.GetInt("GymInd"); // If random is selected or error just pick randomly if (gymToEnable >= gyms.Length || gymToEnable < 0) { gymToEnable = Random.Range(0, gyms.Length); } gyms[gymToEnable].SetActive(true); // Enable that gym // rename it so paths still work gyms[gymToEnable].name = "GYM"; // Get everything CUSTOM_ROUTINE_PATH = Application.persistentDataPath + "/CustomRoutineData.txt"; hCal = GameObject.Find("HeightCalibrator").GetComponent <HeightCalibrator>(); waveShooter = GameObject.Find("WaveShooter").GetComponent <WaveShooter>(); destroyWall = GameObject.Find("WallDestroyer").GetComponent <DestroyWall>(); GameObject ccgo = GameObject.Find("CalorieCounterOrig"); if (ccgo != null) { calorieCounter = ccgo.GetComponent <CalorieCounter>(); } loadingReset = false; for (int i = 0; i < waveTransiton.Length; i++) { waveTransiton[i] = true; } timer = 0; livesLeft = 0; onBreakTimer = float.PositiveInfinity; // If the file doesnt exist then load the normal defaults, else read from file if (File.Exists(CUSTOM_ROUTINE_PATH) == false) { // Enable all walls by default for (int i = 0; i < 3; i++) { wallTypesAllowed[i] = true; cardioWallTypesAllowed[i] = true; } if (PlayerPrefs.GetInt(Constants.gameMode) == Constants.gameModeClassic) // Clasic Mode { warmUp = true; pauseAfterXWaves = int.MaxValue; secondsToPauseFor = 0; switchModesOnBreak = false; } else // Arcade Mode { warmUp = false; //livesLeft = 3; pauseAfterXWaves = 50; secondsToPauseFor = 15; cardioMode = false; // If we are on cardio mode we are acatually on cardio/squat mode if (PlayerPrefs.GetInt(Constants.cardioMode) == 1) { switchModesOnBreak = true; } else { switchModesOnBreak = false; } } } else { this.SetCustomRoutineData(); // If we are in custom mode, check to update the stat if (PlayerPrefs.GetInt(Constants.gameMode) == Constants.gameModeCustom) { customRoutineStatCheck = true; // Set the arcade pause menus for (int i = 0; i < pauseMenues.Length; i++) { pauseMenues[i].SetPauseButton(Instantiate <GameObject>(Resources.Load <GameObject>("Other/PauseMenuCustom"))); } } } this.ActivateGameMode(); }
void Start() { counter = float.PositiveInfinity; boxCol = this.GetComponents <BoxCollider>(); hCal = GameObject.Find("HeightCalibrator").GetComponent <HeightCalibrator>(); }