public void HealEffect()
        {
            playerStats.RestoreHP(amountToBeHealed);
            GameObject healFX = Instantiate(currentFX, playerStats.transform);

            Destroy(instantiatedFXModel.gameObject);
            Destroy(healFX, 4);
            weaponSlotManager.ReloadWeapons();
        }
Пример #2
0
        public override void SuccessfullyCastSpell(
            PlayerAnimatorManager animationHandler,
            PlayerStats playerStats,
            CameraHandler cameraHandler,
            WeaponSlotManager weaponSlotManager)
        {
            //whenever we use the successfully cast spell it will also fire this function from the class it derives from on Spell_Item
            base.SuccessfullyCastSpell(animationHandler, playerStats, cameraHandler, weaponSlotManager);
            GameObject instantiatedSpellFX = Instantiate(spellCastFX, animationHandler.transform);

            playerStats.RestoreHP(healAmount);
            Destroy(instantiatedSpellFX, 2);
            Debug.Log("Spell Cast Successful");
        }