Exemple #1
0
    private void CreateCrawl()
    {
        List <MonsterInfo> createMonsters = MonsterModel.Instance.CrawlCreate();

        for (int i = 0; i < createMonsters.Count; i++)
        {
            MonsterInfo createInfo  = createMonsters[i];
            GameObject  monsterItem = monsterLayer.CreateMonsterItem(createInfo.posX, createInfo.posY, createInfo);
            monsterItem.transform.localScale = new Vector3(0, 0, 1);
            LeanTween.scale(monsterItem, new Vector3(1, 1, 1), 0.2f);

            CellInfo      cellInfo = CellModel.Instance.GetCellByPos(createInfo.posX, createInfo.posY);
            FightCellItem itemCtr  = GetItemByRunId(cellInfo.runId);
            if (itemCtr != null)
            {
                UpdateCellInfo(itemCtr, cellInfo, false);
            }
            else
            {
                CreateCellItem(cellInfo);
            }
        }
    }