Ejemplo n.º 1
0
    private void resetNumberOfRollsRemaining()
    {
        GameObject numberRollsDisplay         = this.transform.FindChild("RollsRemaining").gameObject;
        RollsRemainingController rollsDisplay = numberRollsDisplay.GetComponent <RollsRemainingController>();

        rollsDisplay.rollsRemaining = NumberOfRerolls;
    }
Ejemplo n.º 2
0
    public void onTouch()
    {
        if (checkToResetAllDice())
        {
            // process!!
            OverlandTileView tileView = FindObjectOfType <OverlandTileView>();

            OverlandTurnProcessor turnProc = new OverlandTurnProcessor();
            turnProc.processSeries(theCrew, selectedDice, tileView.tileModel);

            // reset the number of rolls remaining
            GameObject numberRollsDisplay         = this.transform.FindChild("RollsRemaining").gameObject;
            RollsRemainingController rollsDisplay = numberRollsDisplay.GetComponent <RollsRemainingController>();
            rollsDisplay.rollsRemaining = 3;

            // then reset and banish until number of dice are selected
            foreach (DieModel die in dice)
            {
                die.dieState = edieState.inHand;
            }

            banishDiceInHand();
            resetDieNumberLocations();
            selectedDice.Clear();
            displayDice();

            OverlandGameController GC = this.transform.parent.GetComponent <OverlandGameController>();
            GC.updateHealthTracker();

            seriesRollNumber = 0;             // just processed
        }

        // we autoroll after resetting, we can change that later
        rollDice();
    }
Ejemplo n.º 3
0
    private void reduceNumberOfRollsRemaining()
    {
        GameObject numberRollsDisplay         = this.transform.FindChild("RollsRemaining").gameObject;
        RollsRemainingController rollsDisplay = numberRollsDisplay.GetComponent <RollsRemainingController>();

        if (rollsDisplay.rollsRemaining == 1)
        {
            rollsDisplay.rollsRemaining = 0;
        }
        else
        {
            rollsDisplay.rollsRemaining--;
        }
    }