Spirits_Float.cs 427 B

1234567891011121314151617
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4. public class Spirits_Float : MonoBehaviour
  5. {
  6. private bool once = true; //½öÒ»´Î³ö³¡Ð§¹û
  7. private void OnTriggerEnter(Collider other)
  8. {
  9. if (other.gameObject.layer == 8)
  10. {
  11. GameObject ga = other.transform.parent.parent.parent.gameObject;
  12. ga.GetComponent<Enemy>().FloatStateOn();
  13. }
  14. }
  15. }