コード例 #1
0
    DatingSimOptionLine createLine(DatingSimCharacters.CharacterOption option)
    {
        var newLine = (Instantiate(optionLineProto) as GameObject).GetComponent <DatingSimOptionLine>();

        newLine.transform.parent = choiceMenu.transform;
        newLine.initialize(option);

        return(newLine);
    }
コード例 #2
0
ファイル: DatingSimHelper.cs プロジェクト: wattter/NitoriWare
 public static int getOptionIndex(DatingSimCharacters.CharacterOption option, bool right)
 {
     if (right)
     {
         return(getSelectedCharacter().rightOptions.IndexOf(option));
     }
     else
     {
         return(getSelectedCharacter().wrongOptions.IndexOf(option));
     }
 }
コード例 #3
0
    public void initialize(DatingSimCharacters.CharacterOption option)
    {
        right = DatingSimHelper.getOptionIsRight(option);
        index = DatingSimHelper.getOptionIndex(option, right);

        DatingSimHelper.getSelectedCharacter();

        if (textComp == null)
        {
            textComp = GetComponentInChildren <TMP_Text>();
        }
        if (cursor == null)
        {
            cursor = GetComponentInChildren <DatingSimCursorAnimation>();
            cursor.gameObject.SetActive(false);
        }
        SetText(DatingSimHelper.getSelectedCharacter().getLocalizedOptionDialogue(right, index, false));

        ShowCursor(false);
    }
コード例 #4
0
ファイル: DatingSimHelper.cs プロジェクト: wattter/NitoriWare
 public static int getOptionIndex(DatingSimCharacters.CharacterOption option)
 {
     return(getOptionIndex(option, getOptionIsRight(option)));
 }
コード例 #5
0
ファイル: DatingSimHelper.cs プロジェクト: wattter/NitoriWare
 public static bool getOptionIsRight(DatingSimCharacters.CharacterOption option)
 {
     return(getSelectedCharacter().rightOptions.Contains(option));
 }