CraftStation.cs 543 B

123456789101112131415161718192021222324
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4. public class CraftStation : MonoBehaviour
  5. {
  6. private void OnTriggerStay2D(Collider2D other)
  7. {
  8. if (other.tag == "Player")
  9. {
  10. //ui enable
  11. // other.GetComponent<CraftManager>().ShowCraftUI(this);
  12. }
  13. }
  14. private void OnTriggerExit2D(Collider2D other)
  15. {
  16. if (other.tag == "Player")
  17. {
  18. //ui disable
  19. other.GetComponent<CraftManager>().HideCraftUI();
  20. }
  21. }
  22. }