// Update is called once per frame void Update () { if (!started) { Debug.Log ("creating new sound action"); ActionRunner soundAction = new SoundAction ("chatter", false); ActionRunner soundAction2 = new SoundAction("happy", false); IList<ActionRunner> list = new List<ActionRunner> (); list.Add (soundAction); list.Add (soundAction2); ActionRunner parAction = new ParallelAction(list); list = new List<ActionRunner> (); list.Add (parAction); list.Add (parAction); ActionRunner seqAction = new SequentialAction(list); seqAction.Start (); started = true; } }
// Update is called once per frame void Update() { if (!started) { Debug.Log("creating new sound action"); ActionRunner soundAction = new SoundAction("chatter", false); ActionRunner soundAction2 = new SoundAction("happy", false); IList <ActionRunner> list = new List <ActionRunner> (); list.Add(soundAction); list.Add(soundAction2); ActionRunner parAction = new ParallelAction(list); list = new List <ActionRunner> (); list.Add(parAction); list.Add(parAction); ActionRunner seqAction = new SequentialAction(list); seqAction.Start(); started = true; } }