예제 #1
0
        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);
        }
예제 #2
0
 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));
     }
 }
예제 #3
0
 // 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);
     }
 }
예제 #4
0
        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);
        }
예제 #5
0
 private void Start()
 {
     AnimationHandler.OverrideAnimations(GetComponent <Animator>(), ability.animationClip, "Attack");
 }