
* 겪고 있는 문제 상황을 최대한 자세하게 작성해주세요.
* 문제 해결을 위해 어떤 시도를 해보았는지 구체적으로 함께 알려주세요.
처음 코드를 입력했을 때는 적용이 됐는데 트렌지션 과정을 손대고 나서는 풍선이 터지지 않습니다
강의자료에 있는 것과 같이 코드를 입력했고 타임스케일 0으로 된 코드도 없애봤는데 똑같이 작동하지 않았습니다
터지는 애니메이션만 플레이 해보면 움직입니다
time.timeScale = 0f;

작성한 코드 및 에러 메세지
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
using UnityEngine.SceneManagement;
public class gameManager : MonoBehaviour
{
public GameObject square;
public Text timeTxt;
float alive = 0f;
public static gameManager I;
public GameObject endPanel;
public Text thisScoreTxt;
public Text maxScoreTxt;
bool isRunning = true;
public Animator anim;
void Awake()
{
I = this;
}
// Start is called before the first frame update
void Start()
{
Time.timeScale = 1f;
InvokeRepeating("makeSquare", 0.0f, 0.5f);
}
// Update is called once per frame
void Update()
{
if (isRunning)
alive += Time.deltaTime;
timeTxt.text = alive.ToString("N2");
}
void makeSquare()
{
Instantiate(square);
}
public void gameOver()
{
anim.SetBool("isDie", true);
isRunning = false;
Invoke("timeStop", 0.5f);
endPanel.SetActive(true);
thisScoreTxt.text = alive.ToString("N2");
endPanel.SetActive(true);
if (PlayerPrefs.HasKey("bestscore") == false)
{
PlayerPrefs.SetFloat("bestscore", alive);
}
else
{
if (PlayerPrefs.GetFloat("bestscore") < alive)
{
PlayerPrefs.SetFloat("bestscore", alive);
}
}
float maxScore = PlayerPrefs.GetFloat("bestscore");
maxScoreTxt.text = maxScore.ToString("N2");
}
public void retry()
{
SceneManager.LoadScene("myshield");
}
void timeStop()
{
Time.timeScale = 0.0f;
}
