how can i make simple combo attack,,
need help guys. I want to make simple combo attack, just like most game fighting. When i press onetime then playing attack1, when i press twotime then playing attack1 and attack2, and so on. Please help me,, this my script :
using UnityEngine;
using System.Collections;
public class Punch : MonoBehaviour
{
private Animator animator;
// Use this for initialization
void Start ()
{
animator = GetComponent<Animator>();
animator.SetBool ("Attack1", false);
animator.SetBool ("Attack2", false);
animator.SetBool ("Attack3", false);
animator.SetBool ("Attack4", false);
}
// Update is called once per frame
void Update ()
{
}
public void Attack1() //i'm gonna put this on ui image
{
animator.SetBool ("Attack1", true);
print("This Attack 1");
}
public void Attack2() //i'm gonna put this on ui image
{
animator.SetBool ("Attack2", true);
print("This Attack 2");
}
public void Attack3() //i'm gonna put this on ui image
{
animator.SetBool ("Attack3", true);
print("This Attack 3");
}
public void Attack4() //i'm gonna put this on ui image
{
animator.SetBool ("Attack4", true);
print("This Attack 4");
}
}
and this my animator :
animato-controller-example.png
(36.4 kB)
Comment
Your answer
Follow this Question
Related Questions
Problem with combo attack -1 Answers
how to make combo attack, 1 button do 3 things 2 Answers
find an especific multitouch wich is on a image in the canvas 0 Answers
Manipulate ui canvas button hitbox 2 Answers
How to make more combo attack,, 1 Answer