public EquipedWeapon Equip(Transform carrier, Transform rightHand, Transform leftHand, Animator animator) { AnimationHandler.OverrideAnimations(animator, animationClip, "Attack"); EquipedWeapon spawnedWeapon = Spawn(carrier, SelectTransform(rightHand, leftHand)); return(spawnedWeapon); }
private void Start() { for (int i = 0; i < startAbilities.Count; i++) { if (startAbilities[i] == null) { continue; } AnimationHandler.OverrideAnimations(animator, startAbilities[i].animationClip, "Cast" + (i + 1)); } }
// Start is called before the first frame update void Start() { animationHandler = GetComponent <AnimationHandler>(); controller = GetComponent <PlayerMovement>(); if (rightHandWeapon != null) { rightHandWeapon.Spawn(rightHand, GetComponent <Animator>(), Constants.WEAPON_RIGHT_HAND); } if (leftHandWeapon != null) { leftHandWeapon.Spawn(leftHand, GetComponent <Animator>(), Constants.WEAPON_LEFT_HAND); } }
public void SetNewAbility(AbilityGem gem, AbilityCooldownDisplay slot) { if (gem == null) { slot.SetAbility(null); return; } Ability abilityInstance = InstanciateAbility(gem.ability); slot.SetAbility(abilityInstance); abilityInstance.baseEffectValue = gem.baseEffectValue; abilityInstance.range = gem.ability.range; if (animator == null) { animator = GetComponentInChildren <Animator>(); } AnimationHandler.OverrideAnimations(animator, gem.ability.animationClip, "Cast" + slot.index); }
private void Start() { AnimationHandler.OverrideAnimations(GetComponent <Animator>(), ability.animationClip, "Attack"); }