Example #1
0
    private void ApplyInstructions(string instructions)
    {
        string[] instrList = instructions.Split(',');

        int numCharacters;

        // TODO Replace this with a twineParser.IsValidInstruction()
        if (!Int32.TryParse(instrList[0].Substring(1), out numCharacters))
        {
            // TODO: Handle error somehow
            Debug.Log("ERROR! Malformed input!");
            return;
        }

        //Debug.Log ("Number characters for this scene: " + numCharacters);

        dialogUI.clearLoveInterests();



        for (int i = 0; i < numCharacters; i++)
        {
            GameManager.LoveInterestName name     = twineParser.ParseName(twineParser.TrimTag(instrList [3 * i + 1]));
            DialogUI.ImagePositon        position = twineParser.ParsePos(twineParser.TrimTag(instrList [3 * i + 2]));
            LoveInterest.Emotion         emotion  = twineParser.ParseEmotion(twineParser.TrimTag(instrList [3 * i + 3]));

            dialogUI.displayLoveInterest(gameManager.getLoveInterest(name), emotion, position);
        }
    }
Example #2
0
 public LoveInterest getLoveInterest(GameManager.LoveInterestName name)
 {
     return(loveInterests[(int)name]);
 }
Example #3
0
 public void playTracks(GameManager.LoveInterestName loveInterestName = GameManager.LoveInterestName.Beauregard)
 {
     speakerIndex = (int)loveInterestName;
 }
Example #4
0
 private void ApplyEnding(string instructions)
 {
     GameManager.LoveInterestName name = twineParser.ParseName(instructions);
     GameManager.EndConversation();
     StartCoroutine(GameManager.BeginMarriage(gameManager.loveInterests[(int)name].marriageStory));
 }