// Use this for initialization void Start() { GameObject historyObject = GameObject.Find("History"); history = historyObject.GetComponent <History>(); placeCar(history.levelName); maxSpeed = history.getCarMaxSpeed(); minSpeed = history.getCarMinSpeed(); laneChangeSpeed = history.getLaneChangeSpeed(); fb = GameObject.FindObjectOfType <FitBoardHandler>(); curLanePos = 0; child = GameObject.Find("Car").GetComponent <Transform>(); marker = GameObject.Find("Marker").GetComponent <SpeedometerMarker>(); velocity = velocityExp; marker.updateMarker(velocityExp); moving = false; left = false; right = false; hittingSide = false; laneChangeHelp = false; laneChangeHelp2 = false; noHits = true; turnDegreeInput = 1; turnDegree = (0.0015f * Mathf.Pow(turnDegreeInput, 2)); relPos = 0; active = false; }
#pragma warning restore 0649 // Use this for initialization void Start() { fb = FindObjectOfType <FitBoardHandler>(); anim = GetComponent <Animator>(); //StartCoroutine(MakeHole()); canSpawn = true; }
// Use this for initialization void Start() { // initalize all colors to true (can be changed in game settings) usingGreen = true; usingBlue = true; usingRed = true; usingYellow = true; // setup inital preferences in playerprefsmanager PlayerPrefsManager.SetBallPopperDifficulty(0); // set to Easy initially PlayerPrefsManager.SetBallPopperTimeLimit(0); // set to 30 seconds initially PlayerPrefsManager.SetBallPopperVolume(0); // volume set to zero (volume not implemented) PlayerPrefsManager.SetBallPopperSFXVolume(1); // volume set to zero (volume not implemented) // set default time limit here timeLimit = 30; // set score to zero score = 0; // instance of audio source that plays pop noise popAudio = Object.FindObjectOfType <PlayPopNoise>(); // hard coded width and height for game height = 8; width = 15; // set ball velocities based off width and height SetVelocities(); // start spawning balls! StartSpawning(); fb = FindObjectOfType <FitBoardHandler>(); }
// Use this for initialization void Start() { fbHandler = FindObjectOfType <FitBoardHandler>(); if (!fbHandler) { Debug.LogError("No FitBoardSettingsHandler object found in scene!"); } PrintToText.filePath = Application.dataPath + "/"; InitializeFields(); SetColors(); InitializeBoard(); // if the there have been any trials or the data file does not exist if (!File.Exists(PrintToText.filePath + PrintToText.FILE_NAME)) { // reset trial number trialNumber = 1; } else { // trial number is the number of lines in the file trialNumber = File.ReadAllLines(PrintToText.filePath + PrintToText.FILE_NAME).Length; } }
// Initialization void Start() { ding = GetComponent <AudioSource>(); fbHandler = FindObjectOfType <FitBoardHandler>(); gameplayCanvas.SetActive(false); endLight.SetActive(false); scoreText.text = ""; minLimit = 2; secLimit = 0; bryg = new GameObject[4]; bryg[0] = blue; bryg[1] = red; bryg[2] = yellow; bryg[3] = green; level = 0; answerCount = 0; points = 0; blue.SetActive(false); red.SetActive(false); yellow.SetActive(false); green.SetActive(false); startGame = false; answerTurn = false; }
void Start() { fbHandler = FindObjectOfType <FitBoardHandler>(); rb = GetComponent <Rigidbody>(); count = 0; setCountText(); end = false; ballSpeed = defaultSpeed * PlayerPrefsManager.GetRollBallSpeed(); }
// Use this for initialization void Start() { spritenum = PlayerPrefsManager.GetMoveSpriteNumber(); sr = GetComponent <SpriteRenderer>(); sr.sprite = sprites[spritenum]; gameMode = PlayerPrefsManager.GetMoveGameMode(); fb = FindObjectOfType <FitBoardHandler>(); audioSource = GetComponent <AudioSource>(); keyPresses = 0; }
/* * public static GameObject instance; * * void Awake() { * if (instance) { * Destroy(this.gameObject); * } else { * instance = this.gameObject; * DontDestroyOnLoad(this.gameObject); * } * } */ private void Awake() { if (instance == null) { DontDestroyOnLoad(this.gameObject); instance = this; } else { Destroy(gameObject); } }
// Use this for initialization void Start() { fbHandler = FindObjectOfType <FitBoardHandler>(); if (!fbHandler) { Debug.LogError("No FitBoardSettingsHandler object found in scene!"); } InitializeFields(); InitializeBoard(); // if the there have been any trials or the data file does not exist //trialNumber = PrintData.GetTrialNumber(); }