public void StartVSNScript(string scriptToLoad, string waypointToStart) { StartVSNScript(scriptToLoad, 0); int lineToStart = OldVSNCommands.GetInstance().waypoints[waypointToStart]; OldVSNScriptReader.GetInstance().GoToLine(lineToStart); }
public void Goto_Command(string[] label) { if (waypoints.ContainsKey(label[0])) { int lineNumber = waypoints[label[0]]; // //Debug.log("The label " + label[0] + " has value: "+lineNumber); OldVSNScriptReader.GetInstance().GoToLine(lineNumber); } }
public void SendAnswerDuplicateError() { if (OldVSNCommands.GetInstance().waypoints.ContainsKey(sendAnswerDuplicateErrorWaypoint)) { int lineNumber = OldVSNCommands.GetInstance().waypoints[sendAnswerDuplicateErrorWaypoint]; OldVSNScriptReader.GetInstance().GoToLine(lineNumber); } else { Debug.Log("ERROR SENDING ANSWER ERROR"); } gameState = GameState.PlayingScript; }
public void StartVSNScript(string scriptToLoad, int lineToLoad) { // dialogBox.gameObject.SetActive(true); screen.gameObject.SetActive(true); gameState = GameState.PlayingScript; TextAsset asset = Resources.Load <TextAsset>(scriptToLoad); if (asset == null) { Debug.LogError("Error loading VSN Script: " + scriptToLoad); } reader.SetCurrentScript(asset); reader.scriptName = scriptToLoad; DebugMode.gameController = this; reader.LoadScript(); OldVSNScriptReader.GetInstance().GoToLine(lineToLoad); }
void GotoNextEndif() { int lineNumber = OldVSNScriptReader.GetInstance().GetEndifLine(); OldVSNScriptReader.GetInstance().GoToLine(lineNumber); }
public void CheckCommand(string line, int lineNumber) { //Debug.log("line " + lineNumber+": "+line ); string command = GetCommand(line); string[] param = GetParams(line); OldVSNScriptReader.GetInstance().GoToLine(lineNumber); switch (command) { case "player_prefs": Player_Prefs_Command(param); break; case "wait": Wait_Command(param); break; case "wait_answer_confirm": WaitAnswerConfirm_Command(param); break; case "bg": Bg_Command(param); break; case "fg": Fg_Command(param); break; case "move_x": Move_x_Command(param); break; case "move_y": Move_y_Command(param); break; case "mouth_anim": Mouth_Anim_Command(param); break; case "eye_blink_anim": Eye_Blink_Anim_Command(param); break; case "anim_alpha": AnimAlpha_Command(param); break; case "anim_scale": Anim_Scale_Command(param); break; case "music": Music_Command(param); break; case "ambience": Ambience_Command(param); break; case "fade_out_music": Fade_Out_Music_Command(param); break; case "sfx": Sfx_Command(param); break; case "say": Say_Command(param); break; case "say_sfx": Say_Sfx_Command(param); break; case "question": Question_Command(param); break; case "choices": Choices_Command(param); break; case "goto": Goto_Command(param); break; case "waypoint": break; case "screenshake": Screenshake_Command(param); break; case "fade_in": Fade_In_Command(param); break; case "fade_out": Fade_Out_Command(param); break; case "fade_to": Fade_To_Command(param); break; case "mirror": Mirror_Command(param); break; case "add_var": Add_Var_Command(param); break; case "if": If_Command(param); break; case "else": Else_Command(); break; case "set_var": Set_Var_Command(param); break; case "set_string": Set_String_Command(param); break; case "save_game": Save_Game_Command(param); break; case "end_script": EndScript_Command(); break; case "goto_script": GotoScript_Command(param); break; case "resume_script": ResumeScript_Command(param); break; default: //Debug.log("WRONG COMMAND: " + command); break; } }
public void Awake() { instance = this; }
public void GoToSelectedWaypoint(int wp) { OldVSNScriptReader.GetInstance().GoToLine(wp); gameState = GameState.PlayingScript; }
void AnswerQuestion(int choiceIndex) { OldVSNScriptReader.GetInstance().GoToLine(choices [choiceIndex]); gameState = GameState.PlayingScript; }