UI button animation

Hey , can anyone help me with this problem
I will explain the problem in the example :
The player animation make a shot animation and stand with guns but I need to make the player to throw a bombs with a button with UI to make its animation
I attached the button with play string and called like a bombs and set the animation of shooting with SetInteger and script it with integer 0,2
It worked but there is alight problem that the shot made by clicked mouse and the when I clicked mouse the shot animation starting and then bombs
Ps : "I am beginner " and the game is ā€œ2dā€

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;

public class charanimation : MonoBehaviour {
private Rigidbody2D reg;
public Animator animvar;
public Button Btn;

// Use this for initialization
void Start () {
	animvar = GetComponent<Animator>();

}

// Update is called once per frame
public void Update () { 
	reg = GetComponent<Rigidbody2D> ();
	if (Input.GetButtonDown("Fire1")) {
		animvar.SetInteger ("AnimTrans", 2);

	}

	else {
		animvar.SetInteger ("AnimTrans", 0);
	} 
}

}