void Start()
    {
        if (SceneMenu == false)
        {
            powerScript  = GameObject.Find("GameManager").GetComponent <PowerManager>();
            pointsScript = GameObject.Find("GameManager").GetComponent <Pontuation>();

            gameoverScript = GameObject.Find("GameManager").GetComponent <GameOver>();
        }
    }
示例#2
0
  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;
  }
示例#3
0
 void Start()
 {
     RecordGameOver.text = PlayerPrefs.GetInt("HighScore", 0).ToString();              //get player prefs highscore
     pointsScript        = GameObject.Find("GameManager").GetComponent <Pontuation>(); //get componente of other script
 }
示例#4
0
 void Start()
 {
     pointsScript = GameObject.Find("GameManager").GetComponent <Pontuation>();
     powerScript  = GameObject.Find("GameManager").GetComponent <PowerManager>();
     moveScript   = GameObject.Find("Spaceship Galaga white").GetComponent <move>();
 }