예제 #1
0
        private void RemoveAtCollection(CollectionRemoveEvent <T> removeEvent)
        {
            T obj = removeEvent.Value;

            obj.Reset();
            obj.gameObject.SetActive(true);
        }
    public void OnSelectedMonsterRemoved(CollectionRemoveEvent<MonsterModel> removedEvent)
    {
        MonsterModel model = removedEvent.Value;
        model.isSelected.Value = false;

        this.selectDone.Value = this.selectedMosnters.Count >= 3;
    }
예제 #3
0
        private void Remove(CollectionRemoveEvent <ICardModel> remove)
        {
            Verbose(10, $"HandAgent: Remove {remove.Value} @{remove.Index}");
            var index = remove.Index;

            _cards.RemoveAt(index);
        }
    public void OnSelectedMonsterRemoved(CollectionRemoveEvent <MonsterModel> removedEvent)
    {
        MonsterModel model = removedEvent.Value;

        model.isSelected.Value = false;

        this.selectDone.Value = this.selectedMosnters.Count >= 3;
    }
예제 #5
0
        void PieceRemoved(CollectionRemoveEvent <IPieceAgent> add)
        {
            var p = _pieces.ElementAt(add.Index);

            Assert.IsNotNull(p);
            _pieces.RemoveAt(add.Index);
            p.Destroy();
        }
예제 #6
0
 private void RemoveCard(CollectionRemoveEvent<ICardModel> remove)
 {
     Verbose(6, $"DeckAgent: Remove {remove.Value} @{remove.Index}");
     var index = remove.Index;
     //var card = _cards[index];
     //card.Destroy();
     _cards.RemoveAt(index);
 }
예제 #7
0
        private void Remove(CollectionRemoveEvent <ICardAgent> remove)
        {
            Verbose(5, $"HandView: Remove {remove.Value} @{remove.Index}");
            var view = _cards[remove.Index];

            _cards.RemoveAt(remove.Index);
            view.Destroy();
            Redraw();
        }
예제 #8
0
 // when an object is removed from the selection
 public void selectionRemoved(CollectionRemoveEvent <WARGridObject> gridObject)
 {
     // for each cell under the object
     foreach (var cellId in findCellsUnderObject(gridObject.Value))
     {
         // set the cell to be highlighted
         cells[cellId].highlighted.Value = false;
     }
 }
예제 #9
0
        private void PieceRemoved(CollectionRemoveEvent <IPieceAgent> add)
        {
            var p = _pieces.ElementAt(add.Index);

            Assert.IsNotNull(p);
            _pieces.RemoveAt(add.Index);
            p.Destroy();
            // TODO Agent.Model.TestForCheck(agent.Model.Color);
        }
예제 #10
0
        private void OnMovieRemove(CollectionRemoveEvent <MovieDataModel> removeEvent)
        {
            if (_reactiveDisposible.ContainsKey(removeEvent.Value))
            {
                _reactiveDisposible[removeEvent.Value].Dispose();
                _reactiveDisposible.Remove(removeEvent.Value);
            }

            SignalBus.Fire(new RemoveMovieFromGridSignal(removeEvent.Value));
        }
예제 #11
0
        private void OnRemoved(CollectionRemoveEvent <Card> removed)
        {
            IDisposable healthSubscription = healthSubscriptions[removed.Index];

            healthSubscription.Dispose();
            healthSubscriptions.RemoveAt(removed.Index);
            IDisposable droppedSubscription = droppedSubscriptions[removed.Index];

            droppedSubscription.Dispose();
            droppedSubscriptions.RemoveAt(removed.Index);
            cardSubscriptions.Remove(healthSubscription);
            cardSubscriptions.Remove(droppedSubscription);
        }
예제 #12
0
        private void OnRemoved(CollectionRemoveEvent <Card> removed)
        {
            if (removed.Value.IsDead.Value)
            {
                return;
            }

            Card card = removed.Value;

            subscriptions[card].Dispose();
            subscriptions.Remove(card);
            cardViews.Remove(card);
            RepositionCards();
        }
예제 #13
0
        public void SecondCollisionShouldDestroyCube()
        {
            var cube = _mainModel.Cubes.First();
            CollectionRemoveEvent <CubeModel> removeEvent = new CollectionRemoveEvent <CubeModel>();

            _mainModel.Cubes.ObserveRemove().Subscribe(x => removeEvent = x);

            cube.Collide();

            _mainModel.Cubes.ShouldContain(cube);

            cube.Collide();

            _mainModel.Cubes.ShouldNotContain(cube);
            removeEvent.Value.ShouldBe(cube);
        }
예제 #14
0
 private void PieceRemoved(CollectionRemoveEvent <IPieceModel> remove)
 {
     _pieces.RemoveAt(remove.Index);
 }
        public virtual ApplicationResult Apply(KSEQOperation <T> op, bool quiet = false)
        {
            switch (op.op)
            {
            case KSEQOperationTypes.Insert:
                if (m_Removed.Contains(op.id))
                {
                    break;
                }

                var indexAdded = Add(op.id, op.value);
                if (!quiet)
                {
                    var collectionAddEvent = new CollectionAddEvent <T>(indexAdded, op.value);
                    collectionAdd?.OnNext(collectionAddEvent);
                    countChanged?.OnNext(m_AtomList.Count);
                    if (op.replicaId == replicaId)
                    {
                        collectionThisReplicaAdded?.OnNext(collectionAddEvent);
                    }
                }

                return(new ApplicationResult()
                {
                    applied = true,
                    index = indexAdded
                });

            case KSEQOperationTypes.Remove:
                if (m_Removed.Contains(op.id))
                {
                    break;
                }

                m_Removed.Add(op.id);
                var indexRemoved = IndexOf(op.id);
                if (indexRemoved < 0)
                {
                    break;
                }

                var oldValue = m_AtomList[indexRemoved];
                m_AtomList.RemoveAt(indexRemoved);
                if (!quiet)
                {
                    var collectionRemoveEvent = new CollectionRemoveEvent <T>(indexRemoved, oldValue.value);
                    collectionRemove?.OnNext(collectionRemoveEvent);
                    countChanged?.OnNext(m_AtomList.Count);
                    if (op.replicaId == replicaId)
                    {
                        collectionThisReplicaRemoved?.OnNext(collectionRemoveEvent);
                    }
                }

                return(new ApplicationResult()
                {
                    applied = true,
                    index = indexRemoved
                });
            }

            return(new ApplicationResult()
            {
            });
        }
예제 #16
0
 public virtual void OnRemove_Numbers(CollectionRemoveEvent <int> e)
 {
 }
예제 #17
0
 private void RemoveAtCollection(CollectionRemoveEvent <Info> removeEvent)
 {
     removeEvent.Value.Dispose();
     m_Pool.ReturnObject(removeEvent.Value.BulletMono);
 }
예제 #18
0
 public virtual void OnRemove_DefaultCollection2(CollectionRemoveEvent <int> e)
 {
 }
예제 #19
0
 public virtual void OnRemove_DefaultCollection1(CollectionRemoveEvent <string> e)
 {
 }
예제 #20
0
 private void OnMovieRemoveFromStack(CollectionRemoveEvent <MovieDataModel> removeEvent)
 {
     OnMovieAdd(removeEvent.Value);
 }
예제 #21
0
 private void OnRemove(CollectionRemoveEvent <string> obj)
 {
     Debug.Log($"Remvoe {obj.Value} ");
 }
예제 #22
0
 public void EntityRemove(CollectionRemoveEvent <ActiveEffect> collectionRemoveEvent)
 {
     _effectSubscription[collectionRemoveEvent.Value].Dispose();
     _effectSubscription.Remove(collectionRemoveEvent.Value);
     RemoveViewForEffect(collectionRemoveEvent.Value);
 }
예제 #23
0
        private void RemoveHandler(CollectionRemoveEvent <T> collectionRemoveEvent)
        {
            var removedModel = collectionRemoveEvent.Value;

            RemoveItem(removedModel);
        }
예제 #24
0
 public virtual void OnRemove_IntList(CollectionRemoveEvent <int> e)
 {
 }
예제 #25
0
 public virtual void OnRemove_CurrentBullets(CollectionRemoveEvent <BulletViewModel> e)
 {
 }
예제 #26
0
 private void OnPopupRemove(CollectionRemoveEvent <PopupData> popupRemoveEventData)
 {
     _view.RemovePop(popupRemoveEventData.Value);
 }
예제 #27
0
 private void OnRemoveAoPackage(CollectionRemoveEvent <AoPackage> aoPackageRemoveEvent)
 {
     UnregisterAoPackage(aoPackageRemoveEvent.Value);
 }
 private void OnUserRemoved(CollectionRemoveEvent <UserModel> remove)
 {
     m_presenters[remove.Index].Hide();
 }