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; }
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; }
void PieceRemoved(CollectionRemoveEvent <IPieceAgent> add) { var p = _pieces.ElementAt(add.Index); Assert.IsNotNull(p); _pieces.RemoveAt(add.Index); p.Destroy(); }
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); }
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(); }
// 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; } }
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); }
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)); }
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); }
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(); }
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); }
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() { }); }
public virtual void OnRemove_Numbers(CollectionRemoveEvent <int> e) { }
private void RemoveAtCollection(CollectionRemoveEvent <Info> removeEvent) { removeEvent.Value.Dispose(); m_Pool.ReturnObject(removeEvent.Value.BulletMono); }
public virtual void OnRemove_DefaultCollection2(CollectionRemoveEvent <int> e) { }
public virtual void OnRemove_DefaultCollection1(CollectionRemoveEvent <string> e) { }
private void OnMovieRemoveFromStack(CollectionRemoveEvent <MovieDataModel> removeEvent) { OnMovieAdd(removeEvent.Value); }
private void OnRemove(CollectionRemoveEvent <string> obj) { Debug.Log($"Remvoe {obj.Value} "); }
public void EntityRemove(CollectionRemoveEvent <ActiveEffect> collectionRemoveEvent) { _effectSubscription[collectionRemoveEvent.Value].Dispose(); _effectSubscription.Remove(collectionRemoveEvent.Value); RemoveViewForEffect(collectionRemoveEvent.Value); }
private void RemoveHandler(CollectionRemoveEvent <T> collectionRemoveEvent) { var removedModel = collectionRemoveEvent.Value; RemoveItem(removedModel); }
public virtual void OnRemove_IntList(CollectionRemoveEvent <int> e) { }
public virtual void OnRemove_CurrentBullets(CollectionRemoveEvent <BulletViewModel> e) { }
private void OnPopupRemove(CollectionRemoveEvent <PopupData> popupRemoveEventData) { _view.RemovePop(popupRemoveEventData.Value); }
private void OnRemoveAoPackage(CollectionRemoveEvent <AoPackage> aoPackageRemoveEvent) { UnregisterAoPackage(aoPackageRemoveEvent.Value); }
private void OnUserRemoved(CollectionRemoveEvent <UserModel> remove) { m_presenters[remove.Index].Hide(); }