示例#1
0
        private void ContinueStateMachineSetup()
        {
            mZoneManager                = new ZoneIdManager();
            mSessionManager             = new SessionManager();
            mUsersManager               = new UsersManager(this);
            mServerObjectRepository     = new ServerObjectRepository(this);
            mDistributedObjectIdManager = new DistributedObjectIdManager();
            mServerEngine               = new ServerEngine(mSessionManager, mServerObjectRepository, SendMessageToReflector);
            mConnectionHandler          = new ConnectionHandler(this);

            // Extensions
            mRoomManager           = new RoomManager(this);
            mFashionMinigameServer = new FashionMinigameServer(this);
            mFriendsManager        = new FriendsManager(this);
            mFriendsManager.mFacebookFriendsReceivedEvent += mFashionMinigameServer.FacebookFriendsReady;
            mAvatarManager       = new AvatarManager(this);
            mPaymentItemsManager = new PaymentItemsManager(this);
            mEscrowManager       = new EscrowManager(this);
            mServerProcessingLoop.AddServerLoopWorker(RemoteCallToService.CallToServiceCallbackManager);
            mAdminManager = new AdminManager(this);

            // This needs to be called to instantiate the instance of TextFilter
            TextFilter tf = TextFilter.Instance;

            //this should be the last thing we create in our startup sequence!!  the server message processor kicks off a loop to process incoming messages
            mServerMessageProcessor = new ServerMessageProcessor(this);
            mServerProcessingLoop.AddServerLoopWorker(mServerMessageProcessor.ServerReflector);
        }
示例#2
0
 public AvatarManager(ServerStateMachine serverStateMachine)
 {
     mServerStateMachine         = serverStateMachine;
     mServerObjectRepository     = serverStateMachine.ServerObjectRepository;
     mServerEngine               = serverStateMachine.ServerEngine;
     mServerAssetRepository      = serverStateMachine.ServerAssetRepository;
     mDistributedObjectIdManager = serverStateMachine.DistributedObjectIdManager;
 }
示例#3
0
        public ServerDistributedRoom(ServerObjectRepository serverObjectRepository, AccountId roomOwnerAccountId, string roomName, RoomType roomType, RoomId roomId, PrivacyLevel privacyLevel, DistributedObjectId doId, XmlNode itemIdXml)
            : base(serverObjectRepository, doId)
        {
            mRoomPopulation = new List <Guid>();
            mRoomName       = roomName;
            mRoomType       = roomType;
            mRoomId         = roomId;
            mObjectType     = DistributedObjectTypes.Room;
            mPrivacyLevel   = privacyLevel;

            mObjectData.Add(mObjectType); //0
            mObjectData.Add("mock path");
            mObjectData.Add(mRoomType);
            mObjectData.Add(itemIdXml.OuterXml);
            mObjectData.Add(mPrivacyLevel);
            mObjectData.Add(mRoomName); //5
            mObjectData.Add(mRoomPopulation.Count);
            mObjectData.Add(mRoomId);
            mObjectData.Add(roomOwnerAccountId);
        }
示例#4
0
 public ServerEngine(SessionManager sessionManager, ServerObjectRepository serverObjectRepository, Hangout.Shared.Action <Message, List <Guid> > sendMessageToReflectorCallback)
 {
     mSessionManager                 = sessionManager;
     mServerObjectRepository         = serverObjectRepository;
     mSendMessageToReflectorCallback = sendMessageToReflectorCallback;
 }
        public ServerDistributedAvatar(DistributedObjectId doId, AvatarId avatarId, Guid localSessionId, string nickname, XmlDocument itemIdXml, ServerAccount serverAccount, ServerObjectRepository serverObjectRepository, ServerAssetRepository serverAssetRepository)
            : base(serverObjectRepository, doId)
        {
            mCurrentTelemetryData  = new List <object>();
            mObjectType            = DistributedObjectTypes.Avatar;
            mAvatarId              = avatarId;
            mAvatarName            = nickname;
            mServerAccount         = serverAccount;
            mServerAssetRepository = serverAssetRepository;

            mObjectData.Add(mObjectType);
            mObjectData.Add("Avatar/Avatar Rig");
            //UNCOMMENT THIS TO SEE WHICH SESSION THIS AVATAR BELONGS TO
            //Console.Write("creating server distributed avatar data with session id: " + localSessionId);
            mObjectData.Add(localSessionId);
            mObjectData.Add(itemIdXml.InnerXml);
            mObjectData.Add(mAvatarName);
        }
 public ServerDistributedObject(ServerObjectRepository serverObjectRepository, DistributedObjectId doId)
     : base(doId)
 {
     mServerObjectRepository = serverObjectRepository;
 }
 public ServerDistributedGreenScreenRoom(ServerObjectRepository serverObjectRepository, ServerAssetRepository serverAssetRepository, AccountId roomOwnerAccountId /*ServerAccount roomOwnerAccount*/, string roomName, RoomId roomId, PrivacyLevel privacyLevel, DistributedObjectId doId, XmlNode itemIdXml)
     : base(serverObjectRepository, roomOwnerAccountId, roomName, RoomType.GreenScreenRoom, roomId, privacyLevel, doId, itemIdXml)
 {
     mServerAssetRepository = serverAssetRepository;
     ParseItemsFromXml(itemIdXml);
 }
示例#8
0
 public ServerDistributedMiniGameRoom(ServerObjectRepository serverObjectRepository, AccountId roomOwnerAccountId /*ServerAccount roomOwnerAccount*/, string roomName, RoomId roomId, PrivacyLevel privacyLevel, DistributedObjectId doId, XmlNode itemIdXml)
     : base(serverObjectRepository, roomOwnerAccountId, roomName, RoomType.MiniGameRoom, roomId, privacyLevel, doId, itemIdXml)
 {
 }