CharacterColliders.cs 698 B

123456789101112131415161718192021222324252627282930313233343536
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4. public class CharacterColliders : MonoBehaviour
  5. {
  6. public Character owner;
  7. private void Awake()
  8. {
  9. owner = GetComponentInParent<Character>();
  10. }
  11. public void Test()
  12. {
  13. }
  14. public void Attack1ShootEvent(int shootId)
  15. {
  16. if (owner == null)
  17. {
  18. owner = GetComponentInParent<Character>();
  19. }
  20. owner.AttackShootEvent(1, shootId);
  21. }
  22. public void Attack2ShootEvent(int shootId)
  23. {
  24. if (owner == null)
  25. {
  26. owner = GetComponentInParent<Character>();
  27. }
  28. owner.AttackShootEvent(2, shootId);
  29. }
  30. }