public void RunRoomSession()
        {
            MazeRoom currentroom = mazemap.GetRoomByIteration(player.X, player.Y);
            string   ScriptName  = currentroom.SessionName;

            //Only parse the script if the name isn't blank
            if (currentroom.SessionName != "")
            {
                ScriptRepresentation script = new ScriptRepresentation();
                //Initialize the script
                script.init(ScriptName);
                SpeechScriptInterpreter RoomRunner = new SpeechScriptInterpreter();
                if (FirstRun)
                {
                    RoomRunner.init();
                    FirstRun = false;
                }
                else
                {
                    RoomRunner.Init_Voice(Program.voicename);
                }
                RoomRunner.parse(ScriptName);
                //Console.WriteLine(ScriptName);
            }
            //Move the player again.
            Player_Move();
        }
Пример #2
0
        //Chains the script to the ScriptChainer List without any logic
        public void chain_script(string ScriptName)
        {
            ScriptRepresentation rep = new ScriptRepresentation();

            //string BaseFilename = Application.StartupPath;
            //BaseFilename += "/Scripts/"+ ScriptName;
            //rep.FileName = "/Scripts/Tags_Test.txt";
            rep.init(ScriptName);
            ScriptList.Add(rep);
        }