//Start void Start() { target = GameObject.FindGameObjectWithTag("Conductor"); patr = GetComponent <FollowWay>(); vel = patr.vel; tiros = gameObject.GetComponentInChildren <ParticleSystem>(); }
public void setDirection(int dir, FollowWay follow) { if (dir == 0) { follow.setNewDirection(getChildGameObject(directions, "Left"), wayLeft, isControlled); } else if (dir == 1) { follow.setNewDirection(getChildGameObject(directions, "Right"), wayRight, isControlled); } }
private void OnTriggerEnter(Collider other) { FollowWay next = (FollowWay)other.GetComponent(typeof(FollowWay)); next.decideWay(this); }
private void OnTriggerEnter(Collider other) { FollowWay next = (FollowWay)other.GetComponent(typeof(FollowWay)); next.setStreetDirection(direction); }