Пример #1
0
 private void OnInitComplete(InitReceiveEvent e)
 {
     this.StatusService.Add(this._onlinePlayers);
     this.StatusService.Add(this._plays);
     this.StatusService.Add(this._woots);
     this.StatusService.Add(this._totalWoots);
 }
Пример #2
0
        private void OnInit(InitReceiveEvent e)
        {
            this._inited = true;

            // Register remaining messages
            this.MessageManager.RegisterMessage<UpdateMetaReceiveEvent>("updatemeta");
            this.MessageManager.RegisterMessage<ShowKeyReceiveEvent>("show");
            this.MessageManager.RegisterMessage<HideKeyReceiveEvent>("hide");
            this.MessageManager.RegisterMessage<AddReceiveEvent>("add");
            this.MessageManager.RegisterMessage<LeftReceiveEvent>("left");
            this.MessageManager.RegisterMessage<MoveReceiveEvent>("m");
            this.MessageManager.RegisterMessage<FaceReceiveEvent>("face");
            this.MessageManager.RegisterMessage<PotionReceiveEvent>("p");
            this.MessageManager.RegisterMessage<CoinReceiveEvent>("c");
            this.MessageManager.RegisterMessage<CrownReceiveEvent>("k");
            this.MessageManager.RegisterMessage<SilverCrownReceiveEvent>("ks");
            this.MessageManager.RegisterMessage<MagicReceiveEvent>("w");
            this.MessageManager.RegisterMessage<GodModeReceiveEvent>("god");
            this.MessageManager.RegisterMessage<GuardianModeReceiveEvent>("guardian");
            this.MessageManager.RegisterMessage<ModModeReceiveEvent>("mod");
            this.MessageManager.RegisterMessage<WootUpReceiveEvent>("wu");
            this.MessageManager.RegisterMessage<KillReceiveEvent>("kill");
            this.MessageManager.RegisterMessage<AccessReceiveEvent>("access");
            this.MessageManager.RegisterMessage<LostAccessReceiveEvent>("lostaccess");
            this.MessageManager.RegisterMessage<ResetReceiveEvent>("reset");
            this.MessageManager.RegisterMessage<TeleportEveryoneReceiveEvent>("tele");
            this.MessageManager.RegisterMessage<TeleportUserReceiveEvent>("teleport");
            this.MessageManager.RegisterMessage<SaveDoneReceiveEvent>("saved");
            this.MessageManager.RegisterMessage<ClearReceiveEvent>("clear");
            this.MessageManager.RegisterMessage<SayReceiveEvent>("say");
            this.MessageManager.RegisterMessage<SayOldReceiveEvent>("say_old");
            this.MessageManager.RegisterMessage<AutoTextReceiveEvent>("autotext");
            this.MessageManager.RegisterMessage<WriteReceiveEvent>("write");
            this.MessageManager.RegisterMessage<BlockPlaceReceiveEvent>("b");
            this.MessageManager.RegisterMessage<CoinDoorPlaceReceiveEvent>("bc");
            this.MessageManager.RegisterMessage<SoundPlaceReceiveEvent>("bs");
            this.MessageManager.RegisterMessage<RotatablePlaceReceiveEvent>("br");
            this.MessageManager.RegisterMessage<PortalPlaceReceiveEvent>("pt");
            this.MessageManager.RegisterMessage<WorldPortalPlaceReceiveEvent>("wp");
            this.MessageManager.RegisterMessage<LabelPlaceReceiveEvent>("lb");
            this.MessageManager.RegisterMessage<SignPlaceReceiveEvent>("ts");
            this.MessageManager.RegisterMessage<GiveWizardReceiveEvent>("givewizard");
            this.MessageManager.RegisterMessage<GiveFireWizardReceiveEvent>("givewizard2");
            this.MessageManager.RegisterMessage<GiveDarkWizardReceiveEvent>("givedarkwizard");
            this.MessageManager.RegisterMessage<GiveWitchReceiveEvent>("givewitch");
            this.MessageManager.RegisterMessage<GiveGrinchReceiveEvent>("givegrinch");
            this.MessageManager.RegisterMessage<RefreshShopReceiveEvent>("refreshshop");

            // Send the init2 message
            this.Events.Raise(new Init2SendEvent());
        }
Пример #3
0
 private void OnInit(InitReceiveEvent e)
 {
     this.UpdateMeta(e);
 }
Пример #4
0
 private void OnInit(InitReceiveEvent e)
 {
     this.Events.Raise(new ChangeTitleEvent(e.WorldName));
 }
Пример #5
0
 private void OnInit(object sender, InitReceiveEvent e)
 {
     this.RoomWidth = e.RoomWidth;
     this.RoomHeight = e.RoomHeight;
     this.Events.Raise(new ResizeWorldEvent(e.RoomWidth, e.RoomHeight));
     this._blocks = ParseWorld(e.PlayerIOMessage, e.RoomWidth, e.RoomHeight, InitOffset);
 }
Пример #6
0
 private void OnInit(object sender, InitReceiveEvent e)
 {
     this.AllowPotions = e.AllowPotions;
     this.OnPotionCount(sender, e);
 }
Пример #7
0
 public InitJoinArgs(PlayerService playerService, InitReceiveEvent initReceiveEvent)
     : base(playerService)
 {
     this.InitReceiveEvent = initReceiveEvent;
 }
Пример #8
0
        private void OnInit(object sender, InitReceiveEvent e)
        {
            this.Owner = e.OwnerUsername;
            this.WorldName = e.WorldName;
            this.Plays = e.Plays;
            this.Encryption = Rot13(e.Encryption);
            this.IsTutorialRoom = e.IsTutorialRoom;
            this.GravityMultiplier = e.Gravity;
            this.CurrentWoots = e.CurrentWoots;
            this.TotalWoots = e.TotalWoots;

            if (e.IsOwner)
            {
                this.AccessRight = AccessRight.Owner;
            }
            else if (e.CanEdit)
            {
                this.AccessRight = AccessRight.Edit;
            }

            this.RaiseMeta(e);

            if (!this.InitComplete)
            {
                this.InitComplete = true;
            }
        }
Пример #9
0
 private void OnInitComplete(object sender, InitReceiveEvent e)
 {
     this.ResetUploaded(e.RoomWidth, e.RoomHeight);
 }
Пример #10
0
 private void OnInit(object sender, InitReceiveEvent e)
 {
     this.UpdateMeta(e);
 }