예제 #1
0
    /****************************   HANDLES SETTING UP BATTLE   **********************************************/


    public void SetUpBattleScene()
    {
        //Find the stats
        _stats = GameObject.FindGameObjectWithTag("CombatStats").GetComponent <CombatStats>();
        foreach (Items i in itemList)
        {
            copyItems.Add(i);
        }

        //find the enemy parent
        _enemyParent  = GameObject.FindGameObjectWithTag("Enemy Parent");
        _enemyEffects = GameObject.FindGameObjectWithTag("Enemy Effects");

        PlaceEnemies();
        _stats.SetStats();

        _battleEnd   = _inBattle.Count - 1;
        _battleStart = 0;

        //Display player health
        GameManager.instance.healthParent.SetActive(true);
        GameManager.instance.battleAnimator.SetBool("IsOpen", true);

        ShowActionMenu();
    }
예제 #2
0
    /****************************   HANDLES RESTARTING BATTLE   **********************************************/


    //Holds all the values to reset the battle
    public void ResetBattle()
    {
        PlaceEnemies();
        itemList = new List <Items>();
        foreach (Items i in copyItems)
        {
            itemList.Add(i);
        }

        //Reset Stats
        _stats.SetStats();
        _stats.gameObject.GetComponent <Note>().ShowAttackBeats();
        _stats.RemoveEffect();
        ResetSlider();

        AudioManager.instance.StartCombatMusic();
        GameManager.instance.deathScreenParent.SetActive(false);

        StopAllCoroutines();

        ShowActionMenu();

        GameManager.instance.battleAnimator.SetBool("IsOpen", true);
    }