Exemplo n.º 1
0
    private void Update()
    {
        if (transform.position == gControl.wayPoints[currPoint])
        {
            currPoint++;
            RotateObj();
            if (currPoint == gControl.wayPoints.Length)
            {
                currPoint--;
                IMob q = GameObject.Find("Mob_War").GetComponent <Mob_War>();
                q.testDeath();
            }
        }

        transform.position = Vector3.MoveTowards(transform.position, gControl.wayPoints[currPoint], currSpeed * Time.deltaTime);
    }