コード例 #1
0
    //You'll have to customize these methods with your specific integers if you want to use Dialogue Chains to adjust numbers or use their values as a requirement.
    //First: Add your possible ints to the enum ChainIntType (at the end of this script). Feel free to clear the enum of its original values.
    //Second: Adjust the switch statements to reflect your own integer variables. In the SetChainInt method, have each variable += amount
    public static int GetChainInt(ChainIntType chainInt)
    {
        switch (chainInt)
        {
        case ChainIntType.PlayerMelee:
            return(TempGameController.instance.player.GetComponent <TempPlayerInfo>().meleeStat);

        case ChainIntType.PlayerRanged:
            return(TempGameController.instance.player.GetComponent <TempPlayerInfo>().rangedStat);

        default:
            return(0);
        }
    }
コード例 #2
0
    public static void SetChainInt(ChainIntType chainInt, int amount)
    {
        switch (chainInt)
        {
        case ChainIntType.PlayerMelee:
            TempGameController.instance.player.GetComponent <TempPlayerInfo>().meleeStat += amount;
            break;

        case ChainIntType.PlayerRanged:
            TempGameController.instance.player.GetComponent <TempPlayerInfo>().rangedStat += amount;
            break;

        default:
            break;
        }
    }