private void AddBubble(ReactionPriority priority, Bubble bubble) { if (!handledBubbles.Contains(bubble)) { pending.Add(new Tuple <ReactionPriority, Bubble>(priority, bubble)); handledBubbles.Add(bubble); } }
public static void Dispatch(ReactionPriority priority, Bubble bubble) { var gameEvent = GlobalState.EventService.GetPooledEvent <BubbleReactionEvent>(); gameEvent.priority = priority; gameEvent.bubble = bubble; GlobalState.EventService.DispatchPooled(gameEvent); }
virtual public void Setup(ReactionPriority priority) { this.priority = priority; actions = new List <ReactionFunction>() { Reaction, PostReaction }; GlobalState.EventService.AddEventHandler <EventType>(OnReactionEvent); blockade = blockade ?? GlobalState.Instance.Services.Get <BlockadeService>(); }
public static void Dispatch(ReactionPriority priority, List <Bubble> bubbles, float delay) { var gameEvent = GlobalState.EventService.GetPooledEvent <BubbleGroupReactionEvent>(); gameEvent.priority = priority; gameEvent.bubbles = bubbles; gameEvent.delay = delay; GlobalState.EventService.DispatchPooled(gameEvent); }
public static void Dispatch(ReactionPriority priority, AnimationType animationType, GameObject gameObject) { var gameEvent = GlobalState.EventService.GetPooledEvent <AnimationReactionEvent>(); gameEvent.priority = priority; gameEvent.gameObject = gameObject; gameEvent.animationType = animationType; GlobalState.EventService.DispatchPooled(gameEvent); }
public ReactionHandlerAttribute(ReactionPriority priority) { Priority = priority; }