Example #1
0
        public void AddEvents()
        {
            // Submit 이벤트(아이템 사용), Cancel 이벤트(뒤로 가기)
            PokemonBattleManager manager = PokemonBattleManager.Instance;

            EventTrigger trigger = GetComponent <EventTrigger>();

            EventTrigger.Entry entrySubmit = new EventTrigger.Entry();
            entrySubmit.eventID = EventTriggerType.Submit;
            entrySubmit.callback.AddListener((data) => manager._itemManager.UseItem(gameObject));
            trigger.triggers.Add(entrySubmit);

            EventTrigger.Entry entryCancel = new EventTrigger.Entry();
            entryCancel.eventID = EventTriggerType.Cancel;
            entryCancel.callback.AddListener((data) => manager.SelectAction());
            trigger.triggers.Add(entryCancel);
        }
Example #2
0
 public void Init()
 {
     _count   = 0;
     _manager = PokemonBattleManager.Instance;
 }
Example #3
0
 private void Awake()
 {
     _manager = PokemonBattleManager.Instance;
 }