using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.UI; public class TargetFlow : MonoBehaviour { private Animator aniFlow; bool bShoot=false; //public Image imgTargetFlow; // Use this for initialization void Start () { aniFlow = this.gameObject.GetComponent(); aniFlow.SetInteger ("s", 1); } // Update is called once per frame void Update () { if (Input.GetMouseButtonDown (0)) { bShoot = true; } } public void SetState(int s) { if (bShoot == true) { aniFlow.SetInteger ("s", 0); } else { aniFlow.SetInteger ("s", s); } } }