using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class NPCDestination : MonoBehaviour
{
    public int trigNum;

    private void OnTriggerEnter(Collider other)
    {
        if (other.tag == "NPC")
        {
            if (trigNum == 4)
            {

                trigNum = 0;
            }

            if (trigNum == 3)
            {
                this.gameObject.transform.position = new Vector3(27, 2, 35);
                trigNum = 4;
            }

            if (trigNum == 2)
            {
                this.gameObject.transform.position = new Vector3(35, 2, 29);
                trigNum = 3;
            }


            if (trigNum == 1)
            {
                this.gameObject.transform.position = new Vector3(35, 2, 18);
                trigNum = 2;
            }

            if (trigNum == 0)
            {
                this.gameObject.transform.position = new Vector3(17, 2, 32);
                trigNum = 1;
            }
        }
    }
}