private void Awake() { if (instance == null) { instance = this; DontDestroyOnLoad(gameObject); } else { Destroy(gameObject); } }
void LoadStatus() { if (LevelStatusControl.instance != null) { stageData = LevelStatusControl.instance; title.text = stageData.data.DisplayName; goal = stageData.data.Goal; timeLimit = stageData.data.TimeLimit; objAlive = stageData.data.ObjLiveTime; totalObj = (int)Mathf.Ceil(goal * 1.25f); frequency = timeLimit / totalObj; } else { Debug.Log("not found"); } }
void Start() { stageData = FindObjectOfType <LevelStatusControl>(); }