static void Main(string[] args) { Story1 flight1 = new Story1("1", "YUL", "YYZ", 1); Story1 flight2 = new Story1("2", "YUL", "YYC", 1); Story1 flight3 = new Story1("3", "YUL", "YVR", 1); Story1 flight4 = new Story1("4", "YUL", "YYZ", 2); Story1 flight5 = new Story1("5", "YUL", "YYC", 2); Story1 flight6 = new Story1("6", "YUL", "YVR", 2); Console.WriteLine("****** Story 1: ****** \n"); flight1.ShowStory(); flight2.ShowStory(); flight3.ShowStory(); flight4.ShowStory(); flight5.ShowStory(); flight6.ShowStory(); Console.WriteLine("****** Story 2: ****** \n"); Story2 story2 = new Story2(); story2.ShowStory(); Console.ReadLine(); }
// Use this for initialization void Start() { Story2 story2 = this.GetComponent <Story2>(); story2.enabled = false; //2秒後に動けるようになるようにする Invoke("StoryReMove2", 2.0f); }
private void initStory() { //获得剧本 story = storyReader.GetWholeStory(); nowIndex = 1; nowStatus = MyEnum.RunStatement.RUNNING; isStroyInitialized = true; ShowIndex(); }
private void OpenDefaultAVGS() { myStory = storyReader.GetWholeStory(); EnabledGroupBoxes(true); tsTextStatus.ForeColor = Color.Green; tsTextStatus.Text = "已加载默认AVGS"; RefreshIndex(); tbLength.Text = myStory.LineNumber.ToString(); }
private void CloseFile() { myStory = new Story2(); tsTextStatus.ForeColor = Color.Red; tsTextStatus.Text = "文件已关闭"; tbNowIndex.Text = ""; tbLength.Text = ""; index = 1; EnabledGroupBoxes(false); ProgressBar.Value = 0; textFakeConsole.Clear(); }
private void OpenOtherFils() { openFileDialog1.Multiselect = false; openFileDialog1.Title = "打开文本文件"; openFileDialog1.FileName = ""; openFileDialog1.Filter = "AVGS脚本文件(.avgs)|*.avgs|文本文件(.txt)|*.txt|所有文件|*.*"; if (openFileDialog1.ShowDialog() == DialogResult.OK) { myStory = GetOtherFile(openFileDialog1.FileName); } EnabledGroupBoxes(true); tsTextStatus.ForeColor = Color.DarkOrange; tsTextStatus.Text = "已加载" + openFileDialog1.FileName.ToString(); RefreshIndex(); tbLength.Text = myStory.LineNumber.ToString(); }
/// <summary> /// 获得全部的故事 /// </summary> /// <returns>返回故事对象</returns> public Story2 GetWholeStory() { Story2 story = new Story2(); StreamReader SR = new StreamReader(currentDir + @"DATA\AVGS\story.avgs", Encoding.GetEncoding("GB2312")); string tempStr; int index = 1; while ((tempStr = SR.ReadLine()) != null) { Line newLine = new Line(); newLine.index = index; newLine.text = tempStr; story.content.Add(newLine); index++; } story.LineNumber = index - 1; return(story); }
public Story2 GetOtherFile(string path) { Story2 story = new Story2(); StreamReader SR = new StreamReader(path, Encoding.GetEncoding("GB2312")); string tempStr; int index = 1; while ((tempStr = SR.ReadLine()) != null) { Line newLine = new Line(); newLine.index = index; newLine.text = tempStr; story.content.Add(newLine); index++; } story.LineNumber = index - 1; return(story); }
void StoryReMove2() { Story2 story2 = this.GetComponent <Story2>(); story2.enabled = true; }