title: Counting points space shooter unity
body: <p>my code in GameController is :</p>
  
  <pre><code>public void AddScore(int newscore) 
  {
      score += newscore;
      UpdateScore();
   }
  
  void UpdateScore() 
  {
      scoreText.text = "score " + score;
  }
  </code></pre>
  
  <p>and my code in destroyByContact :</p>
  
  <pre><code>public GameController gameController;
  
  void OnTriggerEnter(Collider other)
  {
      if (other.tag =="boundary")
       { 
          return; 
       }
      Instantiate(explosion, transform.position, transform.rotation);
      if (other.tag == "player")
      {
          Instantiate(playerexplosion, other.transform.position, other.transform.rotation);
      }
      gameController.AddScore(scoreValue);
      Destroy(other.gameObject);
      Destroy(gameObject);
  }
  </code></pre>
  
  <p>and unity display this error :
  error CS1061: Type <code>GameController' does not contain a definition for</code>AddScore' and no extension method <code>AddScore' of type</code>GameController' could be found (are you missing a using directive or an assembly reference?)</p>