SceneEventPointA2Logic.cs 809 B

123456789101112131415161718192021222324252627
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4. using UnityGameFramework.Runtime;
  5. public class SceneEventPointA2Logic : 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 NoviceEventMassA(false));
  24. }
  25. }