CharacterColliders.cs 739 B

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