void Start() { if (SceneMenu == false) { powerScript = GameObject.Find("GameManager").GetComponent <PowerManager>(); pointsScript = GameObject.Find("GameManager").GetComponent <Pontuation>(); gameoverScript = GameObject.Find("GameManager").GetComponent <GameOver>(); } }
void Start() { if (GameObject.FindGameObjectWithTag("Player") != null) { playerTransform = GameObject.FindGameObjectWithTag("Player").GetComponent <Transform>(); PlayerScript = GameObject.FindGameObjectWithTag("Player").GetComponent <move>(); } pointsScript = GameObject.FindGameObjectWithTag("GameManager").GetComponent <Pontuation>(); powerScripts = GameObject.FindGameObjectWithTag("GameManager").GetComponent <PowerManager>(); TypeRead = type; if (gameObject.tag == "EnemyDuplicate") { spawnDuplicateScript = gameObject.GetComponent <SpawnDuplicate>(); } waitShot = timeShot; }
void Start() { RecordGameOver.text = PlayerPrefs.GetInt("HighScore", 0).ToString(); //get player prefs highscore pointsScript = GameObject.Find("GameManager").GetComponent <Pontuation>(); //get componente of other script }
void Start() { pointsScript = GameObject.Find("GameManager").GetComponent <Pontuation>(); powerScript = GameObject.Find("GameManager").GetComponent <PowerManager>(); moveScript = GameObject.Find("Spaceship Galaga white").GetComponent <move>(); }