SceneEventBombEntryLogic.cs 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4. using UnityEngine.UI;
  5. using UnityGameFramework.Runtime;
  6. /// <summary>
  7. /// 场景组件 炸弹
  8. /// </summary>
  9. public class SceneEventBombEntryLogic : MonoBehaviour
  10. {
  11. private List<Role> roleList;
  12. private void Awake()
  13. {
  14. this.roleList = new List<Role>();
  15. }
  16. // Start is called before the first frame update
  17. void Start()
  18. {
  19. }
  20. public List<Role> GetEntryRoleList()
  21. {
  22. return this.roleList;
  23. }
  24. public void OnTriggerEnter(Collider collider)
  25. {
  26. Role newRole = collider.GetComponent<Role>();
  27. if(newRole)
  28. {
  29. roleList.Add(newRole);
  30. }
  31. }
  32. public void OnTriggerExit(Collider collider)
  33. {
  34. Role newRole = collider.GetComponent<Role>();
  35. if(newRole)
  36. {
  37. roleList.Remove(newRole);
  38. }
  39. }
  40. public void EnableCollider()
  41. {
  42. }
  43. public void OnClickInteractive()
  44. {
  45. }
  46. }