
지금 점수를 보여줘야하는데
내용대로 했는데 컴파일 오류가 났다고 합니다 ㅠ

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
public class gameManager : MonoBehaviour
{
public GameObject square;
public Text timeTxt;
public Text thisscoreTxt;
float alive = 0f;
public static gameManager I;
public GameObject endPanel;
void Awake()
{
I = this;
}
void Start()
{
InvokeRepeating("makeSquare", 0.0f, 0.7f);
}
// Update is called once per frame
void Update()
{
alive += Time.deltaTime;
timeTxt.text = alive.ToString("N2");
}
void makeSquare()
{
Instantiate(square);
}
public void gameOver()
{
Time.timeScale = 0f;
endPanel.SetActive(true);
thisscore text = alive.ToString("N2");
endPanel.SetActive(true);
}
}
작성한 코드 및 에러 메세지
