public IEnumerator PlayChangeGlass(bool leftSide, float time) { if (leftSide) { currentGlass = leftGlass; GetComponent <Transform>().localScale = new Vector3(-1 * Mathf.Abs(GetComponent <Transform>().localScale.x), GetComponent <Transform>().localScale.y, GetComponent <Transform>().localScale.z); StartCoroutine(MoveTo(leftPosition.position, time)); yield return(new WaitForSeconds(time)); anim.SetTrigger("changeGlass"); } else { currentGlass = rightGlass; GetComponent <Transform>().localScale = new Vector3(Mathf.Abs(GetComponent <Transform>().localScale.x), GetComponent <Transform>().localScale.y, GetComponent <Transform>().localScale.z); StartCoroutine(MoveTo(rightPosition.position, time)); yield return(new WaitForSeconds(time)); anim.SetTrigger("changeGlass"); } }
public void SetGlass(DrinkingTestGlassBehaviour param) { glass = param; glass.SetRightHandBone(rightHandBone); }