Beispiel #1
0
        public void ResetPlayer()
        {
            PlayerInput.onDisableInput.Invoke();
            disableInvulnerability();

            rb.velocity = Vector2.zero;

            anim.SetBool("Death", false);
            anim.SetInteger("state", 0);

            foreach (Skill skill in skills)
            {
                skill.ResetCooldown();
                if (skill is ICharge)
                {
                    ICharge chargeSkill = skill as ICharge;
                    chargeSkill.RefillCharges();
                }
            }

            RefillCurrentHealth();
            combatState = CombatState.NonCombat;

            // Reset rotation and position
            transform.position = spawnPosition;
            transform.rotation = spawnRotation;
        }