what is wrong?

hi, i asked before and in theory i have to do this, so this code will save my coins right? but is wrong (where i put B)

CODE OF SCRIPT

Code (csharp):

    • using System.Collections;
  • using System.Collections.Generic;
  • using UnityEngine;
  • {
  • public static CoinsScore Coin;
  • public GameObject ban;
  • public void Awake()
  • {
  • PlayerPrefs.GetInt(“Player Score”);
  • }
  • public void OnTriggerEnter2D(Collider2D collider)
  • {
  • if (collider.CompareTag(“Player”))
  • {
  • GameController.instance.Coin();
  • Coinz();
  • Destroy(ban);
  • }
  • }
  • public void Coinz()
  • {
  • PlayerPrefs.SetInt(“Player Score”, GameController.coin);
  • PlayerPrefs.Save();
    • }
  • }

the code of Coin
Code (csharp):

      • using System.Collections;
  • using System.Collections.Generic;
  • using UnityEngine;
  • using UnityEngine.SceneManagement;
  • using UnityEngine.UI;
    • public static GameController instance;
    • public bool gameOver;
  • public float scrollSpeed = -1.5f;
    • private int score;
  • public static int coin;
  • public Text scoreText;
  • public Text cointext;
  • {
  • if(GameController.instance == null)
  • {
  • GameController.instance = this;
  • }else if(GameController.instance != this)
  • {
  • Destroy(gameObject);
  • Debug.LogWarning(“GameController ha sido instanciado por segunda vez. Esto no debería pasar.”);
  • }
    • }
      • public void Coin()
  • {
  • coin++;
  • Updateco();
  • SoundSystem.instance.PlayCoin();
      • }
  • public void Updateco()
  • {
  • CoinsScore.Coin.Coinz();
  • cointext.text = “” + coin;
        • }
  • public void BirdScored()
  • {
  • if (gameOver) return;
    • score++;
  • scoreText.text = "Score: " + score;
    • }
    • public void BirdDie()
  • {
  • gameOverText.SetActive(true);
  • gameOver = true;
  • }
  • {
  • if(GameController.instance == this)
  • {
  • GameController.instance = null;
  • }
  • }
  • }

I don’t even want to know how you got those line numbers…

But… use code tags!

Ordered list.

3032436--226850--toolbar.png