
* 겪고 있는 문제 상황을 최대한 자세하게 작성해주세요.
* 문제 해결을 위해 어떤 시도를 해보았는지 구체적으로 함께 알려주세요.
중간에 강의를 듣다가 잘 못 입력했었는지 오류 코드가 있어서 해결하려고 실행취소를 반복하다 보니
코드가 꼬이거나 사라진 게 있는 것 같습니다...
원래 시간 줄어드는 것까진 만들어 뒀었는데 시간이 줄어들질 않고 60으로만 멈춰있어서
확인 부탁 드립니다 ㅠㅜ
저도 처음부터 다시 만들어 보겠습니다 어느 부분이 문제였는지 확인해 주시면 감사하겠습니다


작성한 코드 및 에러 메세지
using System.Collections;
using System.Collections.Generic;
using Unity.VisualScripting;
using UnityEngine;
using UnityEngine.SocialPlatforms.Impl;
using UnityEngine.UI;
using UnityEngine.SceneManagement;
public class gameManager : MonoBehaviour
{
public GameObject rain;
public GameObject Panel;
public static gameManager I;
public Text scoreText;
public Text timeText;
int totalScore;
float limit = 60f;
void Awake()
{
I = this;
}
// Start is called before the first frame update
void Start()
{
InvokeRepeating("makerain", 0, 0.9f);
}
private GameObject GetPanel()
{
return Panel;
}
// Update is called once per frame
void Update(GameObject Panel)
{
limit -= Time.deltaTime;
timeText.text = limit.ToString("N2");
}
void makerain()
{
Instantiate(rain);
}
public void addScore(int score)
{
totalScore += score;
scoreText.text = totalScore.ToString();
}
public void retry()
{
SceneManager.LoadScene("MainScene");
}
}
