Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class BattleModelReference
- {
- public readonly RuntimeBattleHandler Model = RuntimeBattleHandler.Instance;
- }
- public class EventSystemBrooker
- {
- public readonly IEventSystemListener Listener;
- public EventSystemBrooker(IEventSystemListener L)
- {
- Listener = L;
- BattleEventSystem.Load().Subscribe(Listener);
- }
- ~EventSystemBrooker() => BattleEventSystem.Load().Unsubscribe(Listener);
- }
- public class UIFlashTileUnderMouse : MonoBehaviour, IEventSystemListener, ITileSelectionListener
- {
- protected readonly EventSystemBrooker Brooker = new EventSystemBrooker(this);
- }
- public class HeroSelector : MonoBehaviour
- {
- protected readonly BattleModelReference Battle = new BattleModelReference();
- public Update()
- {
- // Verifica se o mouse está sobre um herói e coloca o gameobject na variavel gObj
- var Hero = Battle.Model.FindHeroFromGameObject(bObj);
- Mechanics.SelectHero(Hero); // Dispara os eventos do EventSystem
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement