示例#1
0
        protected override void OnAwake()
        {
            base.OnAwake();

            peerContainer      = ServerComponents.GetComponent <IPeerContainer>().AssertNotNull();
            clientPeerProvider = Components.GetComponent <IClientPeerProvider>().AssertNotNull();
        }
示例#2
0
        public UserProfileService()
        {
            var idGenerator = ServerComponents.GetComponent <IRandomNumberGenerator>().AssertNotNull();

            serverId = idGenerator.GenerateRandomNumber();

            peerContainer           = ServerComponents.GetComponent <IPeerContainer>().AssertNotNull();
            userIdToPeerIdConverter = ServerComponents.AddComponent(new UserIdToPeerIdConverter());
        }
示例#3
0
 public GameServerProviderService()
 {
     peerContainer = ServerComponents.GetComponent <IPeerContainer>().AssertNotNull();
     connections   = peerContainer.GetPeersCount();
 }
        public virtual void Startup()
        {
            peerContainer = ServerComponents.AddComponent(new PeerContainer());

            LogUtils.Log("An application has started.");
        }