fica aparecendo essa mensagem de erro Assets\scripts\obstaculo.cs(12,13): error CS0246: The type or namespace name 'pontuacao' could not be found (are you missing a using directive or an assembly reference?)
codigo
public class obstaculo : MonoBehaviour { [SerializeField] private float velocidade = 0.015f; [SerializeField] private float variacaoy; private Vector3 posicaoaviao; private pontuacao pontuacao; private bool pontuei;
// Update is called once per frame
private void Awake()
{
this.transform.Translate(Vector3.up * Random.Range(-variacaoy, variacaoy));
}
private void Start()
{
this.posicaoaviao = GameObject.FindObjectOfType<aviao>().transform.position;
this.pontuacao = GameObject.FindObjectOfType<pontuacao>();
}
void Update()
{
this.transform.Translate(Vector3.left * this.velocidade * Time.deltaTime);
if(!this.pontuei && this.transform.position.x < this.posicaoaviao.x)
{
Debug.Log("pontuou");
this.pontuei = true;
this.pontuacao.Adicionarpontos();
}
}
private void OnTriggerEnter2D(Collider2D outro)
{
this.destruir();
}
public void destruir()
{
GameObject.Destroy(this.gameObject);
}
}