public RpcComponent(NetComponent net) { m_Net = net; m_Net.RegisterOpenGeneric <RpcMessage <object> >(OnRpcMessage); m_Net.RegisterOpenGeneric <RpcSuccessMessage <object> >(OnRpcSuccessMessage); m_Net.Register <RpcFailureMessage>(OnRpcFailureMessage); }
public void Inject() { m_Net.Register <EventComponent.SubscribeToEvent>(OnSubscribeToEvent); m_Net.Register <EventComponent.UnsubscribeFromEvent>(OnUnsubscribeFromEvent); m_Net.RegisterOpenGeneric <EventMessage <object> >(OnEventMessage); }