/// <summary> /// Retrieve cutscene commands from a file. /// </summary> /// <param name="filePath">The file path.</param> /// <returns>The cutscene commands.</returns> public static List <CutsceneCommand> RetrieveCommands(string filePath) { //Read a file and return its commands. CutsceneFile b = new CutsceneFile(); b.Read(FileSystem.OpenFileStream(filePath)); return(b.Commands); }
/// <summary> /// Start a cutscene from a file. /// </summary> /// <param name="filePath">Path to the cutscene file.</param> /// <param name="customCommandInterpreter">The interpreter to interpret custom commands.</param> /// <param name="customCommandUpdater">The updater to execute the update cycle of custom commands.</param> /// <param name="currentCommandIndex">The command index to start with.</param> public void StartCutscene(string filePath, InterpretCustomCommand customCommandInterpreter = null, UpdateCustomCommand customCommandUpdater = null, int currentCommandIndex = 0) { StartCutscene(CutsceneFile.RetrieveCommands(filePath), customCommandInterpreter, customCommandUpdater, currentCommandIndex); }