public void ArrangeEnemyArray() { enemiesTypesLevelUpCondition = new List<EnemiesTypesLevelUpCondition>(); foreach(EnemiesTypesLevelUpConditionTemp temp in enemiesTypesLevelUpConditionTemp) { if(temp.killStreak >= 0)//new tier { EnemiesTypesLevelUpCondition newTier = new EnemiesTypesLevelUpCondition(); newTier.killStreak = temp.killStreak; newTier.points = temp.points; newTier.enemies = new List<EnemiesPercent>(); enemiesTypesLevelUpCondition.Add(newTier); } EnemiesPercent enemyPercent = new EnemiesPercent(); enemyPercent.name = temp.name; enemyPercent.percent = temp.percent; enemiesTypesLevelUpCondition[enemiesTypesLevelUpCondition.Count - 1].enemies.Add(enemyPercent); } //enemies stats EnemyStats enemy = null; foreach(EnemyStatsTemp temp in enemyStatsTemp) { if(temp.name != EnemiesPercent.EnemyNames.None)//new tier { switch(temp.name) { case EnemiesPercent.EnemyNames.Blu: enemy = blu; break; case EnemiesPercent.EnemyNames.Follower: enemy = follower; break; case EnemiesPercent.EnemyNames.Ziggy: enemy = ziggy; break; case EnemiesPercent.EnemyNames.Charger: enemy = charger; break; case EnemiesPercent.EnemyNames.Spiral: enemy = spiral; break; case EnemiesPercent.EnemyNames.Legion: enemy = legion; break; case EnemiesPercent.EnemyNames.LegionMinion: enemy = legionMinion; break; } enemy.life = temp.life; enemy.vel = temp.vel; enemy.score = temp.score; enemy.chanceToDrop = temp.chanceToDrop; enemy.itens = new List<ItemPercent>(); } ItemPercent item = new ItemPercent(); item.name = temp.itemName; item.percent = temp.percent; enemy.itens.Add(item); } }
public static EnemyStats GetEnemyStats(EnemiesPercent.EnemyNames type) { EnemyStats enemyStats = null; switch(type) { case EnemiesPercent.EnemyNames.Blu: enemyStats = Instance.gameBalance.blu; break; case EnemiesPercent.EnemyNames.Spiral: enemyStats = Instance.gameBalance.spiral; break; case EnemiesPercent.EnemyNames.Charger: enemyStats = Instance.gameBalance.charger; break; case EnemiesPercent.EnemyNames.Ziggy: enemyStats = Instance.gameBalance.ziggy; break; case EnemiesPercent.EnemyNames.Follower: enemyStats = Instance.gameBalance.follower; break; case EnemiesPercent.EnemyNames.Legion: enemyStats = Instance.gameBalance.legion; break; case EnemiesPercent.EnemyNames.LegionMinion: enemyStats = Instance.gameBalance.legionMinion; break; } return enemyStats; }