public Location(LocationDefinition p_Definition) { this.definition = p_Definition; this.storyHolder = new StoryHolder(this); /* * string voiceFolder = "Voices/" + definition.voiceType; * Object[] assets = Resources.LoadAll (voiceFolder); * int ii; * * audioClips = new AudioClip[assets.Length]; * * for (ii = 0; ii < assets.Length; ii++){ * audioClips[ii] = assets[ii] as AudioClip; * }; */ /* * var needParams = [email protected]; * * this.needs = new Need[needParams.needs.Length]; * this.needsDictionary = new Dictionary<string, Need>(needParams.needs.Length); * * for (int i = 0; i < needParams.needs.Length; i++) * { * needs[i] = new Need(this, needParams.needs[i]); * needsDictionary[needParams.needs[i]] = needs[i]; * } */ }
// Use this for initialization void Awake() { string storyName = BaseSaver.getSlideshow(); Glossary glossy = glossary.GetComponent <Glossary>(); meta = glossy.GetStory(storyName); textHolder = meta.textHolder; nextScene = meta.nextScene; clickToContinue = GameObject.Find("ClickToContinue"); int imgCount = 1; storyImages = new List <GameObject>(); while (true) { GameObject thisImg = GameObject.Find("StoryImage_0" + imgCount.ToString()); if (thisImg == null) { break; } imgCount++; storyImages.Add(thisImg); } clickToContinue.SetActive(false); }