Beispiel #1
0
 void Awake()
 {
     me = this;
     gameoverUI.SetActive(false);
     btn_replay.onClick.AddListener(Replay);
     CsvLevel.Init();
 }
Beispiel #2
0
    // Use this for initialization

    void Start()
    {
        csvLevel      = DataManager.instance.getCsvData <CsvLevel>(CsvConfig.CSV_LEVEL);
        _curLevelData = csvLevel.getObj(4);
        if (_curLevelData.bonusIds == null)
        {
            _curLevelData.bonusIds = CsvConfig.stringToIntArray <int>(_curLevelData.Bonus);
            string[] ss = _curLevelData.Monsters.Split("|"[0]);
            string[] sss;
            Coord    c;
            _curLevelData.monsterDatas = new List <Coord>();
            for (int i = 0; i < ss.Length; i++)
            {
                sss = ss[i].Split(";"[0]);
                c   = new Coord();
                c.x = System.Convert.ToInt32(sss[0]);
                c.y = System.Convert.ToInt32(sss[1]);
                _curLevelData.monsterDatas.Add(c);
            }
        }
        onGameStart();
    }