커뮤니티
포인트
쿠폰
내 강의실
국비 신청 내역
증명서
계정
로그아웃
학습 질문
개발 일지
나의 활동
답변 완료
컴파일 오류가 또 떴습니다ㅠ
undefined주차
북마크
임*윤
댓글
3
추천
0
조회수
7
조회수
7
답변 완료

지금 점수를 보여줘야하는데

내용대로 했는데 컴파일 오류가 났다고 합니다 ㅠ





스파르타 즉문즉답


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);
    }
}


작성한 코드 및 에러 메세지





취소
 공유
취소
댓글 0
댓글 알림
나의얼굴