示例#1
0
            public void ReInitialize()
            {
                this.Cleanup();

                this.stateSubscriptionStorage = new StateSubscriptionStorage();

                var groupPublicState = LandClaimAreasGroup.GetPublicState(this.areasGroup);

                groupPublicState.ClientSubscribe(
                    o => o.LastRaidTime,
                    this.RefreshRaidedState,
                    this.stateSubscriptionStorage);

                this.RefreshRaidedState();
            }
            public Controller(
                ILogicObject areasGroup,
                WorldMapController worldMapController)
            {
                this.areasGroup               = areasGroup;
                this.worldMapController       = worldMapController;
                this.stateSubscriptionStorage = new StateSubscriptionStorage();

                var groupPublicState = LandClaimAreasGroup.GetPublicState(areasGroup);

                groupPublicState.ClientSubscribe(
                    o => o.LastRaidTime,
                    this.RefreshRaidedState,
                    this.stateSubscriptionStorage);

                this.RefreshRaidedState();
            }
示例#3
0
        protected override void OnEnable()
        {
            this.Reset();

            this.subscriptionStorage = new StateSubscriptionStorage();

            this.characterPrivateState = ClientCurrentCharacterHelper.PrivateState;
            this.characterPrivateState.ClientSubscribe(_ => _.LastDismountedVehicleMapMark,
                                                       _ => this.Refresh(),
                                                       this.subscriptionStorage);

            this.characterPublicState = ClientCurrentCharacterHelper.PublicState;
            this.characterPublicState.ClientSubscribe(_ => _.CurrentVehicle,
                                                      _ => this.Refresh(),
                                                      this.subscriptionStorage);

            this.Refresh();
        }
示例#4
0
 private void Reset()
 {
     this.subscriptionStorage?.Dispose();
     this.subscriptionStorage = null;
     this.RemoveMarker();
 }