combo optimization and correct set-up

At the moment I have my characters attack combos set up in a way that works but I am sure it isn’t optimal and am looking for a more correct solution. The current set up is an if statement in “update” that checks a the current attack number variable (an integer). When the attack is pressed the current time is kept as a float(attackInitTime) and the attack integer is set to 2. The next if statement in “update” is for the second attack. If the the attack button is pressed again, attack is equal to 2 and the current time is less then attackInitTime + 1,then queue attack number 2. If attack isn’t pressed then it is set back to 1. This might be a bit confusing but I wanted to add a description of the code.

if(Input.GetButtonDown("Attack") && currentAttack == 1 && animation.IsPlaying("Idle"))
{
	attacking = true;
	attackInitiated = Time.time;
	AttackAnimation1();
	currentAttackAnim = 1;
}

if(currentAttackAnim == 1 && currentAttack > 1 && Time.time < attackInitiated + 0.6)
{
	attacking = true;
	currentAttackAnim += 1;
	AttackAnimation2();
}

I didn’t include the entire code because I don’t think it is necessary but let me know if you think it may be important. Also, please use c# I am not good with js. Any help will be useful. Thanks!

plz post the hole code so maybe i can help you out

How many if statement are you running.
I dont know but if there are long combos there surely must be a better way