GameEventCenter.cs 522 B

12345678910111213141516171819
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4. public class GameEventCenter : MonoBehaviour
  5. {
  6. public System.Action<ArmBow, Arrow> onBowArrowShootOut;
  7. public System.Action<TargetAnimal, int> onTargetAnimalHurt;
  8. private static GameEventCenter _ins;
  9. public static GameEventCenter ins {
  10. get {
  11. if (!_ins) {
  12. _ins = new GameObject("GameEventCenter").AddComponent<GameEventCenter>();
  13. }
  14. return _ins;
  15. }
  16. }
  17. }