private void Awake() { sm = FindObjectOfType <SceneManagment>(); SwitchABCD go = FindObjectOfType <SwitchABCD>(); GameObject goText = GameObject.Find("Mode"); TextAbove = goText.GetComponent <Text>(); tr = FindObjectOfType <TrailRender>(); airStrokeMapper = FindObjectOfType <AirStrokeMapper>(); GameObject KeyboardHolder = GameObject.Find("Keyboard Holder"); KeyboardHolder.transform.localScale = new Vector3(scale_coef, scale_coef, 1); pointerHandler = FindObjectOfType <PointerHandler>(); if (go == null) { enabled = false; Debug.Log("Can't find SwitchABCD object."); return; } else { ScaledObject = go.gameObject; } }
private void Awake() { // icons.SetActive(true); server = FindObjectOfType <Server>(); th = FindObjectOfType <TextHelper>(); measuringMetrics = FindObjectOfType <MeasuringMetrics>(); sceneManagment = FindObjectOfType <SceneManagment>(); SRanipal_Eye_Framework.Instance.StartFramework(); }
void Awake() { DontDestroyOnLoad(this.gameObject); //Instance Setup if (instance == null) { instance = this; } else if (instance != null) { DebugZ.instance.Log("Instance already exists, destroying object!"); Destroy(this.gameObject); } blackoutAnim = GetComponentInChildren <Animation>(); }
// Use this for initialization void Awake() { // referencias soundManager = GetComponent <SoundManager>(); scnManager = GetComponent <SceneManagment>(); // guardamos los controladores de los fantasmas ghController = new GhostController[ghostsContainer.transform.childCount]; for (int i = 0; i < ghostsContainer.transform.childCount; i++) { ghController[i] = ghostsContainer.transform.GetChild(i).GetComponent <GhostController>(); } // guardamos cuantas bolas hay en total remainingBalls = smallBallsContainer.transform.childCount; // setamos el estado de juego a preLevel currentGameStatus = GameStatus.preLevel; }
// Update is called once per frame void Update() { if (score < 0) { score = 0; } text.text = " " + score; if (winScore == score) { print("Win Score Reached = " + score); winText.GetComponent <Text>().enabled = true; Time.timeScale = 0; } if (Input.GetKeyDown(KeyCode.Escape)) { SceneManagment.LoadScene(0); } }
// Start is called before the first frame update public void Start() { manager = FindObjectOfType <SceneManagment>(); }
private void Awake() { sm = FindObjectOfType <SceneManagment>(); }