You current code will only play the sounds 1 and 2, Assuming that you want to play sounds 1 - 100 you can do this
using UnityEngine;
using UnityEngine.UI;
using System.Collections;
using System.Collections.Generic;
[RequireComponent(typeof(AudioSource))]
public class GameController_Count : MonoBehaviour
{
public Text textNumber;
public Text textNumberAsWords;
public AudioSource audioSource1;
public AudioSource audioSource2;
public List<AudioClip> numberOfClips = new List<AudioClip>();
public int maxSounds = 100;
private string[] numbersAsText = {"One", "Two", "Three", "Four", "Five", "Six", "Seven", "Eight", "Nine", "Ten",
"Eleven", "Telve", "Thirteen", "Fourteen", "Fifteen", "Sixteen", "Seventeen", "Eightteen", "Nineteen", "Twenty",
"Twenty One", "Twenty Two", "Twenty Three", "Twenty Four", "Twenty Five", "Twenty Six", "Twenty Seven", "Twenty Eight", "Twenty Nine", "Thirty",
"Thirty One", "Thirty Two", "Thirty Three", "Thirty Four", "Thirty Five", "Thirty Six", "Thirty Seven", "Thirty Eight", "Thirty Nine", "Fourty",
"Fourty One", "Fourty Two", "Fourty Three", "Fourty Four", "Fourty Five", "Fourty Six", "Fourty Seven", "Fourty Eight", "Fourty Nine", "Fifty",
"Fifty One", "Fifty Two", "Fifty Three", "Fifty Four", "Fifty Five", "Fifty Six", "Fifty Seven", "Fifty Eight", "Fifty Nine", "Sixty",
"Sixty One", "Sixty Two", "Sixty Three", "Sixty Four", "Sixty Five", "Sixty Six", "Sixty Seven", "Sixty Eight", "Sixty Nine", "Seventy",
"Seventy One", "Seventy Two", "Seventy Three", "Seventy Four", "Seventy Five", "Seventy Six", "Seventy Seven", "Seventy Eight", "Seventy Nine", "Eighty",
"Eighty One", "Eighty Two", "Eighty Three", "Eighty Four", "Eighty Five", "Eighty Six", "Eighty Seven", "Eighty Eight", "Eighty Nine", "Ninety",
"Ninety One", "Ninety Two", "Ninety Three", "Ninety Four", "Ninety Five", "Ninety Six", "Ninety Seven", "Ninety Eight", "Ninety Nine", "One Hundred"};
void Start ()
{
// make sure that there are audio clips
if (numberOfClips.Count > 0)
{
maxSounds = numbersAsText
// limit the number of sounds
int count = numberOfClips.Count;
if (count > maxSounds)
{
count = maxSounds;
}
StartCoroutine(CountUp());
}
}
IEnumerator CountUp ()
{
for (int textNum = 0; textNum < count; textNum++)
{
print (textNum);
textNumber.text = (textNum + 1).ToString();
textNumberAsWords.text = numbersAsText*;*
// textNum is an odd number and audioSource2 is not null play clip on audioSource2
// otherwise play clip on audioSource1
if (((textNum % 2) == 1) && (audioSource2 != null))
{
audioSource2.PlayOneShot(numberOfClips*);*
}
else
{
audioSource1.PlayOneShot(numberOfClips*);*
}
// wait the length of the clip before continuing on to the next clip
yield return new WaitForSeconds(numberOfClips*.length + 0.1f);*
}
yield return 0;
}
}
The only thing you need to do is add 100 audio clips to numberOfClips in the inspector.
Also, personally I would only use one AudioSource but you may have a reason for using two. This code however allows you to play all audio clips with either one ore two AudioSource variables.