예제 #1
0
    public virtual void FinishTurn(int pointsAdded)
    {
        tokenInPlay = false;

        turnController.NextTurn(pointsAdded);

        ShowOverlay();

        turnController.UpdateUndoRedoButtons();
    }
예제 #2
0
        /// <summary>
        ///     Logica voor het update van de turn controller
        /// </summary>
        private void UpdateTurnController()
        {
            //Check of de tijd verstreken is.
            int timeLeft = turnController.GetTurnTimeInSeconds();

            //Als er geen tijd meer over is, volgende beurt.
            if (timeLeft <= 0)
            {
                turnController.NextTurn();
            }
        }
예제 #3
0
    IEnumerator Active()
    {
        while (transform.position.y < -1.75f)
        {
            transform.Translate(0f, Time.deltaTime * 16f, 0f);

            yield return(null);
        }
        while (transform.position.y > -2f)
        {
            transform.Translate(0f, -Time.deltaTime * 16f, 0f);

            yield return(null);
        }

        yield return(new WaitForSeconds(0.5f));

        initialise.Trash();
        OnPressed(new GameObject[] { turnController.boss });
        turnController.NextTurn();
    }
예제 #4
0
    public void TakeTurn()
    {
        //Dead people won't do shit
        if (stats.alive == false)
        {
            turnController.NextTurn();
            return;
        }

        //Burning status effect
        if (stats.burning && stats.burnCounter > 0)
        {
            stats.currentHP   -= 10;
            stats.burnCounter -= 1;
            if (stats.burnCounter == 0)
            {
                stats.burning = false;
            }
        }

        //Crit handle
        if (stats.crit && stats.critCount > 0)
        {
            stats.critCount -= 1;
        }
        else
        {
            stats.critMulti = 1;
        }

        //Sneak handle
        if (stats.sneak && stats.sneakCounter > 0)
        {
            stats.sneakCounter -= 1;
        }
        else
        {
            stats.sneak = false;
        }

        //Handling of turns
        if (characterType == CharacterType.NPC)
        {
            if (turnController.hero.GetComponent <Stats>().alive == false)
            {
                print("You have dieded");
                StartCoroutine(DeathScene());
            }
            else
            {
                StartCoroutine(EnemyAttack());
            }
        }
        else
        {
            if (turnController.boss.GetComponent <Stats>().alive == false)
            {
                print("You have wonnededed");
                StartCoroutine(OutroScene());
            }
            else
            {
                initialiseActionButtons.Initialise(GetComponent <Stats>().activeSkills);
            }
        }
        print(GetComponent <Stats>().currentHP);
    }
예제 #5
0
    public void Shtorm()
    {
        TurnController turnController = GameObject.Find("NextTurn").GetComponent <TurnController>();

        turnController.NextTurn();
    }