SceneEventMassPointBLogic.cs 810 B

1234567891011121314151617181920212223242526
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4. using UnityGameFramework.Runtime;
  5. public class SceneEventMassPointBLogic : MonoBehaviour
  6. {
  7. private void Start()
  8. {
  9. SceneAnimationEvent animEvent = this.transform.Find("zhandou_jijiedian").GetComponent<SceneAnimationEvent>();
  10. animEvent.AnimEnd = AnimEnd;
  11. }
  12. public void OnTriggerEnter(Collider collider)
  13. {
  14. Role role = collider.GetComponent<Role>();
  15. if(role != null)
  16. {
  17. this.transform.Find("zhandou_jijiedian").GetComponent<Animator>().Play("zhandou_jijiedian_end");
  18. }
  19. }
  20. public void AnimEnd()
  21. {
  22. EventComponent nowEvent = GameEntry.GetComponent<EventComponent>();
  23. nowEvent.FireNow(this, new NoviceEventMassB(false));
  24. }
  25. }