Beispiel #1
0
 private void OnTriggerExit(Collider other)
 {
     if (other.gameObject.name == PlayerName)
     {
         NPCDialogWindow npcDialogWindow = GameSceneUILauncher.windowManager.Find <NPCDialogWindow>();
         if (npcDialogWindow.Visibility)
         {
             npcDialogWindow.Hide();
         }
     }
 }
Beispiel #2
0
        private void OnTriggerEnter(Collider other)
        {
            Debug.Log("private void OnTriggerEnter(Collider other)");
            if (other.gameObject.name == PlayerName)
            {
                NPCDialogWindow npcDialogWindow = GameSceneUILauncher.windowManager.Find <NPCDialogWindow>();
                npcDialogWindow.Create();

                Messenger messenger = Messenger.Default;
                messenger.Publish(EventsNames.UI_RentCar, 1);//1为Dialog.csv里面的id
                Debug.Log("EventsNames.UI_RentCar已发送");
                npcDialogWindow.Show();
            }
        }