Пример #1
0
    //Start
    void Start()
    {
        target = GameObject.FindGameObjectWithTag("Conductor");

        patr = GetComponent <FollowWay>();
        vel  = patr.vel;

        tiros = gameObject.GetComponentInChildren <ParticleSystem>();
    }
Пример #2
0
 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);
     }
 }
Пример #3
0
    private void OnTriggerEnter(Collider other)
    {
        FollowWay next = (FollowWay)other.GetComponent(typeof(FollowWay));

        next.decideWay(this);
    }
Пример #4
0
    private void OnTriggerEnter(Collider other)
    {
        FollowWay next = (FollowWay)other.GetComponent(typeof(FollowWay));

        next.setStreetDirection(direction);
    }