示例#1
0
        /// <summary>
        /// Creates a new world from a init message
        /// </summary>
        /// <param name="client">The client</param>
        /// <param name="initMessage">The init message</param>
        internal World(FluidClient client, Message initMessage)
        {
            IsDatabaseWorld = false;

            this.m_Client = client;
            this.DeserializeInit(initMessage);
        }
示例#2
0
        /// <summary>
        /// Creates a new world from database data
        /// </summary>
        /// <param name="client">The client</param>
        /// <param name="worldObject">The world data</param>
        internal World(FluidClient client, DatabaseObject worldObject)
        {
            IsDatabaseWorld = true;

            this.m_Client = client;
            this.Deserialize(worldObject);
        }
示例#3
0
        /// <summary>
        /// Creates a new Fluid connection base
        /// </summary>
        /// <param name="client">The Fluid client</param>
        protected ConnectionBase(FluidClient client)
        {
            this.m_Client = client;

            this.m_MessageHandlers          = new Dictionary <string, IMessageHandler>();
            this.m_MessageAwaiters          = new Dictionary <Type, MessageReceivedEvent>();
            this.m_EventHandlers            = new Dictionary <Type, Delegate>();
            this.m_ServerEventHandlers      = new Dictionary <Type, Delegate>();
            this.m_GroupServerEventHandlers = new Dictionary <Type, EventHandler <IServerEvent> >();
        }
示例#4
0
        /// <summary>
        /// Creates a new Fluid connection
        /// </summary>
        /// <param name="client">The Fluid client</param>
        /// <param name="worldId">The world id</param>
        public WorldConnection(FluidClient client, string worldId) : base(client)
        {
            WorldID = worldId;

            Chat            = new ChatManager(this);
            Players         = new PlayerManager();
            Keys            = new KeyManager();
            Potions         = new PotionManager();
            Physics         = new PhysicsEngine(this);
            m_UploadManager = new BlockUploadManager(this);

            base.AddMessageHandler(new InitHandler());
            base.AddMessageHandler(new AddHandler());
            base.AddMessageHandler(new LeftHandler());
            base.AddMessageHandler(new CoinHandler());
            base.AddMessageHandler(new CrownHandler());
            base.AddMessageHandler(new SilverCrownHandler());
            base.AddMessageHandler(new FaceHandler());
            base.AddMessageHandler(new GodHandler());
            base.AddMessageHandler(new ModHandler());
            base.AddMessageHandler(new GuardianHandler());
            base.AddMessageHandler(new BackgroundColorHandler());
            base.AddMessageHandler(new SayHandler());
            base.AddMessageHandler(new OldSayHandler());
            base.AddMessageHandler(new UpdateMetaHandler());
            base.AddMessageHandler(new QuickChatHandler());
            base.AddMessageHandler(new ClearHandler());
            base.AddMessageHandler(new LoadLevelHandler());
            base.AddMessageHandler(new PotionHandler());
            base.AddMessageHandler(new BlockHandler());
            base.AddMessageHandler(new DoorGateBlockHandler());
            base.AddMessageHandler(new MusicBlockHandler());
            base.AddMessageHandler(new PortalBlockHandler());
            base.AddMessageHandler(new RotatableBlockHandler());
            base.AddMessageHandler(new LabelBlockHandler());
            base.AddMessageHandler(new TextBlockHandler());
            base.AddMessageHandler(new WorldPortalBlockHandler());
            base.AddMessageHandler(new AllowPotionsHandler());
            base.AddMessageHandler(new WootHandler());
            base.AddMessageHandler(new WootUpHandler());
            base.AddMessageHandler(new SavedHandler());
            base.AddMessageHandler(new UpgradeHandler());
            base.AddMessageHandler(new MovementHandler());
            base.AddMessageHandler(new HideHandler());
            base.AddMessageHandler(new ShowHandler());
            base.AddMessageHandler(new ConnectionCompleteHandler());
            base.AddMessageHandler(new InfoHandler());
            base.AddMessageHandler(new KillHandler());
            base.AddMessageHandler(new TeleportHandler());
            base.AddMessageHandler(new TeleHandler());
            base.AddMessageHandler(new AccessHandler());
            base.AddMessageHandler(new LostAccessHandler());
        }
示例#5
0
        /// <summary>
        /// Creates a new Fluid lobby connection
        /// </summary>
        /// <param name="client">The Fluid client</param>
        public LobbyConnection(FluidClient client) : base(client)
        {
            Timeout = 2500;

            base.AddMessageHandler(new ConnectionCompleteHandler());
            base.AddMessageHandler(new LobbyPropertiesHandler());
            base.AddMessageHandler(new GetProfileHandler());
            base.AddMessageHandler(new GetPlayerObjectHandler());
            base.AddMessageHandler(new GetShopHandler());
            base.AddMessageHandler(new GetFriendsHandler());
            base.AddMessageHandler(new GetPendingHandler());
            base.AddMessageHandler(new GetBlockedHandler());
            base.AddMessageHandler(new GetInvitesHandler());
            base.AddMessageHandler(new InfoHandler());
        }
示例#6
0
 /// <summary>
 /// Creates a new Fluid connection base
 /// </summary>
 /// <param name="client">The Fluid client</param>
 /// <param name="connection">The playerio connection</param>
 protected ConnectionBase(FluidClient client, Connection connection) : this(client)
 {
     SetConnection(connection);
 }
示例#7
0
 /// <summary>
 /// Creates a new Fluid lobby connection
 /// </summary>
 /// <param name="client">The Fluid client</param>
 /// <param name="connection">The playerio connection</param>
 public SecureConnection(FluidClient client, Connection connection)
     : base(client, connection)
 {
     base.AddMessageHandler(new ArmorgamesAuthHandler());
 }