void Start() { if (ChangeableVariables.levelWeAreIn == "3x3_1" || ChangeableVariables.levelWeAreIn == "3x3_2") { tL = GameObject.Find("Tutorial").GetComponent <TutorialLevel> (); } // fire an event to change shapes directions (how we control the shape) - "switch feature" // because we can rotate the camera before we decide to switch shapes // and because the new shape each time takes the directions that used to be // we need to change them SpawnCubes.switchMovements += ChangeDirections; scCtrl = GameObject.Find("Platform").GetComponent <ScoreController> (); dS = transform.GetComponent <DisablingScripts> (); zOc = transform.GetComponentInChildren <ZeroOverlappingCases> (); currentState = PossibleStates.TurnOff; cC = GetComponentsInChildren <CubeController> (); spawner = GameObject.FindGameObjectWithTag("Spawner"); sC = (SpawnCubes)spawner.GetComponent(typeof(SpawnCubes)); mC = GetComponent <MovingController> (); directions = GameObject.FindGameObjectWithTag("Directions"); dfc = (DirectionsFollowingCamera)directions.GetComponent(typeof(DirectionsFollowingCamera)); }
void Start() { //vol = 0.0f; // volume from start timerBarLength = 170; maxTime = 20; if (ChangeableVariables.levelWeAreIn == "3x3_1" || ChangeableVariables.levelWeAreIn == "3x3_2" || ChangeableVariables.levelWeAreIn == "3x3_3") { maxTime = 30; } else if (ChangeableVariables.levelWeAreIn == "4x4_1" || ChangeableVariables.levelWeAreIn == "4x4_2" || ChangeableVariables.levelWeAreIn == "4x4_3") { maxTime = 20; } else if (ChangeableVariables.levelWeAreIn == "5x5_1" || ChangeableVariables.levelWeAreIn == "5x5_2" || ChangeableVariables.levelWeAreIn == "5x5_3") { maxTime = 20; } else if (ChangeableVariables.levelWeAreIn == "3x3_Free" || ChangeableVariables.levelWeAreIn == "4x4_Free" || ChangeableVariables.levelWeAreIn == "5x5_Free") { maxTime = 20; } scoreDefaultColor = StartFunction.currentTheme_GUISkin.FindStyle("ScoreLabel").normal.textColor; sc = GameObject.Find("Platform").GetComponent <ScoreController> (); spc = GameObject.FindGameObjectWithTag("Spawner").GetComponent <SpawnCubes> (); hsc = GameObject.Find("HighScore").GetComponent <HighScore> (); ls = GameObject.Find("Platform").GetComponent <LineScore> (); themeSongObj = GameObject.Find("Themesong"); DisplayImage(); }
// Use this for initialization void Awake() { if (PlayerPrefsManager.GetTimeAmount() != 0) { endTime = PlayerPrefsManager.GetTimeAmount(); } else { endTime = 30; } spawner = FindObjectOfType <SpawnCubes>(); }
private void Start() { _spawnCubes = GetComponent <SpawnCubes>(); SetLanguage(); SetSound(); SetPrompt(); SetSkin(); if (PlayerPrefs.GetString(Keys.StartImmediately) == "true") { PlayerPrefs.DeleteKey(Keys.StartImmediately); var mode = (Mode)PlayerPrefs.GetInt(Keys.Mode); StartGame(mode); } }
void Start() { child = gameObject.GetComponentsInChildren <Transform>(); colliders = gameObject.GetComponentsInChildren <BoxCollider2D>(); /* while (forI) * { * if (GameObject.Find("Cube" + serch) == null) * { * serch += 4; * } * else * { * cube = GameObject.Find("Cube" + serch); * forI = false; * } * * } */ gameMenager = GameObject.Find("GameMenager"); spawn = gameMenager.GetComponent <SpawnCubes>(); checkO = spawn.isTheFigureO; num = spawn.number; }
/// <summary> /// Sets up the physics cube spawner in the scene. /// </summary> private void SetupSpawner(TestParameters parameters, SpawnCubes spawner) { spawner.TimeToSpawnBody = parameters.timeToSpawnBody; spawner.NumberOfBodiesToSpawnAtOnce = parameters.numberOfBodiesToSpawnAtOnce; }
private void Start() { _spawnCubes = FindObjectOfType <SpawnCubes>(); _collision = GetComponent <CollisionHandler>(); SubscribeOnEvents(); }
void Start() { gameMenager = GameObject.Find("GameMenager"); spawn = gameMenager.GetComponent <SpawnCubes>(); }
// Use this for initialization void Start() { spawner = FindObjectOfType <SpawnCubes>(); }