예제 #1
0
    public void HintClick(bool isFree)
    {
        var line = lines.Find(x => !x.isShown);

        if (line != null)
        {
            if (!isFree)
            {
                CurrencyController.DebitBalance(Const.HINT_COST);
            }
            line.ShowHint();
            CheckGameComplete();
            Prefs.AddToNumHint(GameState.currentWorld, GameState.currentSubWorld, GameState.currentLevel);
        }
    }
예제 #2
0
    public void HintClick()
    {
        int ballance = CurrencyController.GetBalance();

        if (ballance >= Const.HINT_COST)
        {
            var line = lines.Find(x => !x.isShown);

            if (line != null)
            {
                line.ShowHint();
                CurrencyController.DebitBalance(Const.HINT_COST);
                CheckGameComplete();

                Prefs.AddToNumHint(GameState.currentWorld, GameState.currentSubWorld, GameState.currentLevel);
            }
        }
        else
        {
            DialogController.instance.ShowDialog(DialogType.Shop);
        }
        Sound.instance.PlayButton();
    }