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); }
public void Init() { _count = 0; _manager = PokemonBattleManager.Instance; }
private void Awake() { _manager = PokemonBattleManager.Instance; }