Пример #1
0
 public void Set_is2hRanged(GameObject currentWeapon) //Set on combat enter and combat end
 {
     if (currentWeapon && currentWeapon.GetComponent <Ranged>())
     {
         RangedAnimation rangedAnimation = currentWeapon.GetComponent <Ranged>().rangedAnimation;
         animator.SetBool("is2hRanged", rangedAnimation == RangedAnimation.Ranged_2H);
     }
     else
     {
         animator.SetBool("is2hRanged", false);
     }
 }
    public void UpdateAnimationPauseMenu()
    {
        UpdateMoveSpeed();
        currentWeapon = weaponController.getCurrentWeapon();

        if (currentWeapon && currentWeapon.GetComponent <Ranged>())
        {
            RangedAnimation rangedAnimation = currentWeapon.GetComponent <Ranged>().rangedAnimation;
            animator.SetBool("is2hRanged", rangedAnimation == RangedAnimation.Ranged_2H);
        }
        else
        {
            animator.SetBool("is2hRanged", false);
        }
    }
Пример #3
0
    private void CaptureBehaviour(Move move)
    {
        Field targetField = move.GetEnd(host.Board);
        Unit  targetUnit  = targetField.unit;

        // Animation
        RangedAnimation ra = host.GetAnimation <RangedAnimation>();

        if (Host.board.IsCopied() && ra != null)
        {
            Debug.Break();
        }
        ra?.Register(move);

        targetUnit.Kill(Host);
    }
Пример #4
0
 ///////////////Humanoid ONLY/////////////////////////
 public void RangedAttack(RangedAnimation rangedType)
 {
     animator.SetFloat("shootNum", (float)rangedType);
     animator.SetTrigger("shootAnim");
 }
 //////////////////////////
 public void RangedAttack(RangedAnimation rangedType, bool WeaponChargeAttack = false)
 {
     animator.SetFloat("shootNum", (float)rangedType);
     animator.SetTrigger("shootAnim");
     animator.SetBool("WeaponChargeAttack", WeaponChargeAttack);
 }