Пример #1
0
		private void LoadScriptFiles(IReader reader)
		{
			// Scripts are just loaded from scnr for now...
			if (_tags != null && _buildInfo.Layouts.HasLayout("scnr"))
			{
				int scnrCount = 0;
				
				IEnumerable<ITag> scnrs = _tags.FindTagsByClass("scnr");

				foreach (ITag aScnr in scnrs)
					scnrCount++;

				ScriptFiles = new IScriptFile[scnrCount];

				int i = 0;
				foreach (ITag aScnr in scnrs)
				{
					string tagname = _fileNames.GetTagName(aScnr.Index).TrimStart('\\');
					ScriptFiles[i] = new FourthGenScenarioScriptFile(aScnr, tagname, MetaArea, StringIDs, _buildInfo);
					i++;
				}

				return;

			//	ITag scnr = _tags.FindTagByClass("scnr");
			//	if (scnr != null)
			//	{
			//		ScriptFiles = new IScriptFile[1];
			//		ScriptFiles[0] = new FourthGenScenarioScriptFile(scnr, ScenarioName, MetaArea, StringIDs, _buildInfo);
			//		return;
			//	}
			}
			ScriptFiles = new IScriptFile[0];
		}
Пример #2
0
 private void LoadScriptFiles(IReader reader)
 {
     // Scripts are just loaded from scnr for now...
     if (_tags != null && _buildInfo.Layouts.HasLayout("scnr"))
     {
         ITag scnr = _tags.FindTagByClass("scnr");
         if (scnr != null)
         {
             ScriptFiles = new IScriptFile[1];
             ScriptFiles[0] = new FourthGenScenarioScriptFile(scnr, ScenarioName, MetaArea, StringIDs, _buildInfo);
             return;
         }
     }
     ScriptFiles = new IScriptFile[0];
 }