void BlockAction(Action slot) { enableIK = true; isBlocking = true; //If it's mirrored, than that means you're blocking with the left hand and vice versa isLeftHand = slot.mirror; animHook.currentHand = (isLeftHand) ? AvatarIKGoal.LeftHand : AvatarIKGoal.RightHand; animHook.InitIKForShield(isLeftHand); if (!blockAnim) { block_Idle_Anim = (!isTwoHanded) ? inventoryManager.GetCurrentWeapon(isLeftHand).oh_idle : inventoryManager.GetCurrentWeapon(isLeftHand).th_idle; block_Idle_Anim += (isLeftHand) ? StaticStrings._leftPrefix : StaticStrings._rightPrefix; string targetAnim = slot.firstStep.targetAnim; targetAnim += (isLeftHand) ? StaticStrings._leftPrefix : StaticStrings._rightPrefix; PlayAnimation(targetAnim); //animator.CrossFade(targetAnim, 0.1f); blockAnim = true; } }
void BlockAction(Action slot) { isBlocking = true; enableIK = true; isLeftHand = slot.mirror; a_hook.currentHand = (slot.mirror) ? AvatarIKGoal.LeftHand : AvatarIKGoal.RightHand; a_hook.InitIKForShield(slot.mirror); if (!blockAnim) { block_idle_anim = (!isTwoHanded) ? inventoryManager.GetCurrentWeapon(isLeftHand).oh_idle : inventoryManager.GetCurrentWeapon(isLeftHand).th_idle; block_idle_anim += (isLeftHand) ? "_l" : "_r"; string targetAnim = slot.firstStep.targetAnim; targetAnim += (isLeftHand) ? "_l" : "_r"; anim.CrossFade(targetAnim, 0.1f); blockAnim = true; } }