Photon Bolt Engine API
Networking Middleware
Public Member Functions | List of all members
Bolt.IEventFilter Interface Reference

Interface that can be implemented to create custom event filtering rules More...

Inheritance diagram for Bolt.IEventFilter:
Bolt.DefaultEventFilter

Public Member Functions

bool EventReceived (Event ev)
 Called when a new event is recieved More...
 

Detailed Description

Interface that can be implemented to create custom event filtering rules

Example: An event filter that blocks chat events from a chat restricted player

1 public class ChatEventFilter : IEventFilter {
2  public bool EventReceived(Event evt) {
3  if(chatRestrictedPlayerList.ContainsKey(evt.RaisedBy)) {
4  return false;
5  }
6  else return true;
7  }
8 }

Member Function Documentation

bool Bolt.IEventFilter.EventReceived ( Event  ev)

Called when a new event is recieved

Parameters
evThe event data
Returns
Whether to accept or reject the event