// Use this for initialization
    internal void Begin(CombinedShop shop)
    {
        combinedShop = shop;

        abilities = FindObjectOfType <AbilitiesManager>();

        list.BuildCharacter(parentOfTorso, this);

        tutorial = FindObjectOfType <monsterSteps>();

        changed = true;
    }
    //Set Health+time to full.
    public void ResetPlayer()
    {
        if (!list)
        {
            list = FindObjectOfType <equipmentList>();
        }

        if (avatar != null)
        {
            Destroy(avatar);
        }

        if (list)
        {
            avatar = list.BuildCharacter(container);
        }


        currentHealth = healthBar.maxValue = baseHealth;

        resetTime = 40;

        Timer = timeLeft.maxValue = resetTime;

        greenZone = resetTime * .80f;
        redZone   = resetTime * .25f;

        FindObjectOfType <TorsoPart>().Animate(Animations.Idle);
    }
Esempio n. 3
0
    //Set Health+time to full.
    public void ResetPlayer(bool a_boss)
    {
        bossFighting = a_boss;

        if (!list)
        {
            list = FindObjectOfType <equipmentList>();
        }

        if (avatar != null)
        {
            Destroy(avatar);
        }

        avatar = list.BuildCharacter(container);


        if (!abilities)
        {
            abilities = GetComponent <playerAbilities>();
            abilities.Begin();
            Debug.Log("abilities begun");
        }

        abilities.SetupAbilities(a_boss);
        if (!a_boss)
        {
            EndTurn(false);
        }

        Frozen = 0;
        if (!calculator)
        {
            calculator = FindObjectOfType <Calculator>();
        }

        calculator.AddInput("Cancel");

        maxHealth = baseHealth * abilities.EquipmentHealth();

        attackDamage = baseAttack * abilities.EquipmentAttack();

        currentHealth = maxHealth;
        Healthbar.setMaxHealth(maxHealth, true);

        resetTime = parent.quizRunning.levelTime + abilities.EquipmentTime();

        counterTimeModifier = abilities.CounterTimeModify();
        counterDamage       = baseAttack * abilities.EquipmentCounter();

        FindObjectOfType <TorsoPart>().Animate(Animations.Idle);

        parent.currentEnemy.loadMonster();
    }