private void StaminaSkill() { if (staminaSkill.description == "Roll" && input.PlayerMain.StaminaSkill.triggered && !attacking) { Roll(); } Move(); if (staminaSkill.description == "Invisibility") { if (input.PlayerMain.StaminaSkill.triggered && !attacking) { if (!((PlayerSkills.Invisibility)staminaSkill).isActive && stats.Stamina.GetCalculatedStatValue() > 0) { skills.StartTransperency(); ((PlayerSkills.Invisibility)staminaSkill).isActive = true; } else { skills.EndTransperency(); ((PlayerSkills.Invisibility)staminaSkill).isActive = false; } } if (((PlayerSkills.Invisibility)staminaSkill).isActive && stats.Stamina.GetCalculatedStatValue() <= 0) { skills.EndTransperency(); ((PlayerSkills.Invisibility)staminaSkill).isActive = false; } if (((PlayerSkills.Invisibility)staminaSkill).isActive) { StartCoroutine(StaminaMod(-0.5f, 0.1f)); } } }