Esempio n. 1
0
 // Use this for initialization
 void Start()
 {
     dest            = new NavMeshPath();
     interaction     = GetComponent <ObjectInteraction>();
     anim            = GetComponent <IiroAnimBehavior>();
     objManager      = GameObject.FindGameObjectWithTag("ObjectManager").GetComponent <ObjectManager>();
     agent           = GetComponent <NavMeshAgent>();
     tooltip         = GameObject.Find("Inventory").GetComponent <Tooltip>();
     defaultPosition = transform.position;
 }
Esempio n. 2
0
 public void Init(GameObject npc, int id)
 {
     targetNPC   = npc;
     this.id     = id;
     initialized = true;
     agent       = GetComponent <NavMeshAgent>();
     interaction = GetComponent <ObjectInteraction>();
     anim        = GetComponent <IiroAnimBehavior>();
     interaction.setTarget(targetNPC);
     if (id == 0)
     {
         trolley = transform.FindChild("Trolley");
     }
 }