public void NeedleStops() { foreach (Transform child in transform) { NeedleAxis ne1 = child.GetComponent<NeedleAxis>(); ne1.needstop(); } }
IEnumerator NeedleMove() { foreach (Transform child in transform) { yield return new WaitForSeconds(0.5f); NeedleAxis ne1 = child.GetComponent<NeedleAxis>(); ne1.neel(); } }
private void OnTriggerEnter2D(Collider2D col) { if (col.gameObject.tag == "Wall" || col.gameObject.tag == "Stage") { stops = false; StartCoroutine("stoppsge"); } if (col.gameObject.tag == "Player0" || col.gameObject.tag == "Player1") { NeedleAxis nedcon = needlecon.GetComponent <NeedleAxis>(); nedcon.needCon(); } }