Example #1
0
 private new void Init()
 {
     this.nowscene     = Question.SCENE.printing;
     this.fasepattern  = CommandMessage.FACEPATTERN.neutral;
     this.endprint     = 0;
     this.printfonts   = 0;
     this.arrowprint   = false;
     this.faseflame    = 0;
     this.frame        = 0;
     this.manyopen     = 0;
     this.fasewait     = 0;
     this.wait         = 0;
     this.cursor       = 0;
     this.cansel       = false;
     this.shortmassage = new string[3] {
         "", "", ""
     };
 }
Example #2
0
        public override void Update()
        {
            if (this.printfase)
            {
                this.FaseAnimation();
            }
            string[][] strArray = new string[3][]
            {
                this.ToDecomposition(this.massage[0]),
                this.ToDecomposition(this.massage[1]),
                this.ToDecomposition(this.massage[2])
            };
            if (Input.IsPress(Button._B) || Input.IsPress(Button._A) || this.fastprint)
            {
                this.endprint     = strArray.Length - 1;
                this.printfonts   = strArray[strArray.Length - 1].Length + 1;
                this.shortmassage = this.massage;
            }
            switch (this.nowscene)
            {
            case Question.SCENE.printing:
                ++this.printfonts;
                if (this.printfonts > strArray[this.endprint].Length)
                {
                    this.printfonts = 0;
                    ++this.endprint;
                    if (this.endprint < this.massage.Length)
                    {
                        break;
                    }
                    this.arrowprint = true;
                    this.nowscene   = Question.SCENE.pushA;
                    break;
                }
                // ISSUE: explicit reference operation
                this.shortmassage[this.endprint] += strArray[this.endprint][this.printfonts - 1];
                this.sound.PlaySE(SoundEffect.message);
                if (strArray[this.endprint][this.printfonts - 1] == "・")
                {
                    this.wait        = 30;
                    this.longwaiting = true;
                }
                else if (strArray[this.endprint][this.printfonts - 1] == "、")
                {
                    this.wait        = 15;
                    this.longwaiting = true;
                }
                else if (strArray[this.endprint][this.printfonts - 1] == "#")
                {
                    string s = "";
                    for (int index = 2; index < 100 && (this.printfonts + index < strArray[this.endprint].Length && !(strArray[this.endprint][this.printfonts + index] == "#")); ++index)
                    {
                        s += strArray[this.endprint][this.printfonts + index];
                    }
                    string str = strArray[this.endprint][this.printfonts];
                    if (str == "s")
                    {
                        try
                        {
                            this.sound.PlaySE((SoundEffect)Enum.Parse(typeof(SoundEffect), s));
                        }
                        catch { }
                    }
                    else if (str == "w")
                    {
                        try
                        {
                            this.wait        = int.Parse(s);
                            this.longwaiting = true;
                        }
                        catch { }
                    }
                    else if (str == "b")
                    {
                        try
                        {
                            this.canskip = bool.Parse(s);
                        }
                        catch { }
                    }
                    else if (str == "e")
                    {
                        this.Init();
                        this.EndCommand();
                        break;
                    }
                    do
                    {
                        ++this.printfonts;
                        // ISSUE: explicit reference operation
                        this.shortmassage[this.endprint] += strArray[this.endprint][this.printfonts - 1];
                    }while (strArray[this.endprint][this.printfonts - 1] != "#");
                }
                else
                {
                    this.wait        = 0;
                    this.longwaiting = false;
                }
                this.nowscene = Question.SCENE.wait;
                break;

            case Question.SCENE.wait:
                --this.wait;
                if (this.wait > 0)
                {
                    break;
                }
                this.wait     = 0;
                this.nowscene = Question.SCENE.printing;
                break;

            case Question.SCENE.pushA:
                this.FlameControl(4);
                if (!this.endok)
                {
                    if (this.frame <= 1)
                    {
                        break;
                    }
                    this.frame = 0;
                    this.endok = true;
                    break;
                }
                if (this.frame > 2)
                {
                    this.frame = 0;
                }
                this.Control();
                break;
            }
        }