Esempio n. 1
0
 private void Awake()
 {
     if (instance == null)
     {
         instance = this;
         DontDestroyOnLoad(gameObject);
     }
     else
     {
         Destroy(gameObject);
     }
 }
Esempio n. 2
0
    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");
        }
    }
Esempio n. 3
0
 void Start()
 {
     stageData = FindObjectOfType <LevelStatusControl>();
 }