Hi all,
II’m having a lot of problems when launching the second attack combo … the idea is that when you make the first attack if it is not finished and you press the button that launches the second if not do nothing.
No efficient solution:
foreach ( Touch touch in Input.touches){
if (touch.phase == TouchPhase.Began)
{
if(buttonA.HitTest(touch.position )){
Debug.Log ("primer toque");
anim.SetBool("Attack", true);
}
}
if (touch.phase == TouchPhase.Ended){
anim.SetBool("Attack", false);
}
if (currentExitTime >= 0.45f){
Debug.Log ("voy a combar");
if (anim.GetBool("Attack")) {
Debug.Log ("voy a combar2");
if (touch.phase == TouchPhase.Began)
{
if(buttonA.HitTest(touch.position )){
Debug.Log("2 toque");
anim.SetBool("Attack1", true);
}
}
if (touch.phase == TouchPhase.Ended){
anim.SetBool("Attack1", false);
}
}
}
if(currentBaseState.nameHash == attack01State){
if (!anim.IsInTransition(0)){
Debug.Log("ataque 1 NO");
anim.SetBool("Attack",false);
anim.SetBool("Attack1",false);
}
}
if (currentBaseState.nameHash == attack02State){
if (!anim.IsInTransition(0)){
Debug.Log("ataque 2 NO");
anim.SetBool("Attack1",false);
}
}
if (currentBaseState.nameHash == runState){
if (touch.phase == TouchPhase.Began)
{
if(buttonA.HitTest(touch.position )){
Debug.Log ("primer toque");
anim.SetBool("Attack", true);
}
}
if (touch.phase == TouchPhase.Ended){
anim.SetBool("Attack", false);
}
}
}
Im trying a lot of combinations including currentExitTime = currentTransition.normalizedTime; and more things but I cant get a optim solution. This is because guitexture not unlike a touch or other.
Thx and regards.