
1-10 강의 10분 30초 부분 입니다.
끌어 당겨서 넣으려 해도 비활성 됩니다.
원인을 못찾겠습니다, 어떻게 해야 하죠??
* 문제 해결을 위해 어떤 시도를 해보았using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
public class GameManager : MonoBehaviour
{
public GameObject rain;
public GameManager 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.5f);
}
// Update is called once per frame
void Update()
{
limit -= Time.deltaTime;
if (limit < 0)
{
Time.timeScale = 0.0f;
limit = 0.0f;
}
timeText.text = limit.ToString("N2");
}
void makeRain()
{
Instantiate(rain);
}
public void addScore(int score)
{
totalscore += score;
scoreText.text = totalscore.ToString();
}
}
는지 구체적으로 함께 알려주세요.
