// Start is called before the first frame update void Start() { water = Tap.GetComponent <WaterDrip>(); startpos = transform.position; }
// OnStateEnter is called when a transition starts and the state machine starts to evaluate this state override public void OnStateEnter(Animator animator, AnimatorStateInfo stateInfo, int layerIndex) { if (drip == null) { drip = animator.GetComponent <WaterDrip>(); } readyDripTime = Random.Range(minReadyDrip, maxReadyDrip); lastReadyDripTime = Time.time + readyDripTime; }