Exemple #1
0
    // Start is called before the first frame update
    void Start()
    {
        gManager = GameObject.Find("GameManager").GetComponent <D_GameManager>();

        TextAsset WaveData = Resources.Load <TextAsset>("Waves");

        string[] arrData = WaveData.text.Split('\n');

        for (int i = 0; i < arrData.Length; i++)
        {
            string[]       row   = arrData[i].Split('\t');
            WaveDataScript wData = new WaveDataScript();
            int.TryParse(row[0], out wData.wave);
            int.TryParse(row[1], out wData.normalcount);
            int.TryParse(row[2], out wData.rocketcount);
            int.TryParse(row[3], out wData.catbosscount);
            int.TryParse(row[4], out wData.healercount);
            int.TryParse(row[5], out wData.multiballcount);
            int.TryParse(row[6], out wData.circlecount);
            int.TryParse(row[7], out wData.finalcount);
            Waves.Add(wData);
        }
        //Debug.Log(Waves[16].wave);

        yTime        = YarnTimer;
        SpawningYarn = false;
    }
 void Awake()
 {
     if (current == null)
     {
         current = this;
     }
     else
     {
         Destroy(this.gameObject);
         return;
     }
     if (SceneManager.GetActiveScene().name == "TutorialScene")
     {
         return;
     }
     DontDestroyOnLoad(this.gameObject);
 }
Exemple #3
0
 // Start is called before the first frame update
 void Start()
 {
     gManager = GameObject.Find("GameManager").GetComponent <D_GameManager>();
 }