Exemple #1
0
    private IEnumerator SpawnMyCharacters()
    {
        var myDecks = UIManagerScript.Instance.UI_Lobby._deckManager.list_CurrentDeckCards;

        for (int i = 0; i < myDecks.Count; i++)
        {
            eBattlePosition pos = (eBattlePosition)myDecks[i].UnitIndex;
            yield return(StartCoroutine(SpawnUnit(myDecks[i].UnitId, dic_AllyspawnPos[pos], TeamType.Ally)));
        }
    }
Exemple #2
0
    private Transform GetTowerTransform(TeamType team, eBattlePosition posIndex)
    {
        StructureTransform SpawnPos = (team == TeamType.Ally) ? AllyDefenseTowerPosition : EnemyDefenseTowerPosition;

        switch (posIndex)
        {
        case eBattlePosition.Left: return(SpawnPos.tr_Left);

        case eBattlePosition.Right: return(SpawnPos.tr_Right);

        case eBattlePosition.Center: return(SpawnPos.tr_Center);

        default: return(null);
        }
    }
Exemple #3
0
    private IEnumerator SpawnEnemys()
    {
        Debug.LogError(CurrentCrowdIndex + " 번 웨이브 생성");
        var Currentwave = waveDatas.FindAll(r => r.CrowdIndex == CurrentCrowdIndex);

        foreach (var item in Currentwave)
        {
            eBattlePosition epos = (eBattlePosition)item.PosIndex;
            if ((UnitType)item.EnemyType == UnitType.DefenseTower)
            {
                yield return(StartCoroutine(AddTower(item.EnemyIndex, GetTowerTransform(TeamType.Enemy, epos), TeamType.Enemy)));
            }
            else
            {
                yield return(StartCoroutine(SpawnUnit(item.EnemyIndex, dic_EnemyspawnPos[epos], TeamType.Enemy)));
            }
        }
    }