public void OnDestroy() { dataEntityCollection.EventDispatcher.RemoveListener <DataEntityEvents.ComponentAddedEvent <ServerObjectItemData> >(onServerObjectItemAdded); dataEntityCollection.EventDispatcher.RemoveListener <DataEntityEvents.EntityRemovedEvent>(onServerObjectRemoved); EventDispatcher.RemoveListener <IslandTargetsEvents.LocalPlayerHitTargetEvent>(onLocalPlayerHitTarget); CoroutineRunner.StopAllForOwner(this); }
private void onCoinDataChanged(int newCount) { int coinDelta = newCount - coinCount; CoroutineRunner.StopAllForOwner(this); CoroutineRunner.Start(animateCoinDelta(coinDelta), this, ""); }
private void onTargetHit(BeachBallTarget.TargetDefinition definition, BeachBall ball, BeachBallTarget target) { switch (definition.type) { case TargetType.Positive: scoreTarget += definition.pointValue; target.ScorePopUp.InitFloatingScoreText(target.transform, definition.pointValue); CoroutineRunner.StopAllForOwner(target); CoroutineRunner.Start(hideVisibleTarget(target, exitDelay), target, "HideBeachBallTarget"); punchScale(target); break; case TargetType.Negative: CoroutineRunner.StopAllForOwner(target); CoroutineRunner.Start(hideVisibleTarget(target, exitDelay), target, "HideBeachBallTarget"); punchScale(target); break; case TargetType.Shielded: if (definition.blockerLevel == 0) { scoreTarget += definition.pointValue; target.ScorePopUp.InitFloatingScoreText(target.transform, definition.pointValue); CoroutineRunner.StopAllForOwner(target); CoroutineRunner.Start(hideVisibleTarget(target, exitDelay), target, "HideBeachBallTarget"); } break; } }
private void OnDestroy() { dispatcher.RemoveListener <InputEvents.ActionEvent>(onActionEvent); CoroutineRunner.StopAllForOwner(this); changeToDefaultCamera(); LocomotionUtils.UnEquipProp(ClubPenguin.SceneRefs.ZoneLocalPlayerManager.LocalPlayerGameObject); }
private void OnDestroy() { onDestroy(); this.DoneOpen = null; this.DoneClose = null; CoroutineRunner.StopAllForOwner(this); }
private bool onHideCatalog(CatalogUIEvents.HideCatalog evt) { CoroutineRunner.StopAllForOwner(this); isStatsLoading = false; DestoryScroller(); return(false); }
protected override void destroy() { itemIdToItemGameObject.Clear(); removeListeners(); PartyGameUtils.RemoveParticipationFilter(localPlayerParticipationController); enableLocomotionControls(); changeToDefaultCamera(); PartyGameUtils.RemoveActionConfirmationFilter(); enableMainNavigation(); resetPropControls(); if (playerIdToRoleIndicators.Count > 0) { foreach (KeyValuePair <long, GameObject> playerIdToRoleIndicator in playerIdToRoleIndicators) { Service.Get <EventDispatcher>().DispatchEvent(new PlayerIndicatorEvents.RemovePlayerIndicator(playerIdToRoleIndicator.Key, isStored: false)); } playerIdToRoleIndicators.Clear(); } if (hudUI != null) { Object.Destroy(hudUI.gameObject); } Object.Destroy(parentTransform.gameObject); CoroutineRunner.StopAllForOwner(this); Service.Get <EventDispatcher>().DispatchEvent(new PartyGameEvents.PartyGameEnded(partyGameDefinition)); }
private void OnDestroy() { CoroutineRunner.StopAllForOwner(this); catalogScrollRect.onValueChanged.RemoveListener(onScrollRectValueChanged); PooledScrollRect.ObjectAdded -= onPooledObjectAdded; loadPanel.SetActive(value: true); }
private bool onBackButtonClicked(CatalogUIEvents.BackButtonClicked evt) { CoroutineRunner.StopAllForOwner(this); isStatsLoading = false; DestoryScroller(); return(false); }
private void OnDestroy() { CoroutineRunner.StopAllForOwner(this); UnityEngine.Object.Destroy(bubble); UnityEngine.Object.Destroy(bubbleMaterial); bubble = null; dispatcher.RemoveListener <InputEvents.ActionEvent>(OnAction); dispatcher.RemoveListener <DivingEvents.EnableLocalInfiniteAir>(onEnableLocalInfiniteAir); dispatcher.RemoveListener <DivingEvents.DisableLocalInfiniteAir>(onDisableLocalInfiniteAir); if (isLocalPlayer) { Service.Get <INetworkServicesManager>().PlayerStateService.RemoveAirBubble(); } else { AvatarDataHandle component = GetComponent <AvatarDataHandle>(); if (component != null && !component.Handle.IsNull) { AirBubbleData component2 = dataEntityCollection.GetComponent <AirBubbleData>(component.Handle); if (component2 != null) { component2.AirBubbleChanged -= OnRemotePlayerAirBubbleChanged; } } } foreach (DivingGameController overlappingBubble in overlappingBubbles) { if (overlappingBubble != null) { overlappingBubble.RemotePlayerRemoved(this); } } }
public void SendEvent(ExternalEvent evt, bool checkDependencies) { if (!stateMachines.ContainsKey(evt.Target)) { if (!stateMachineProxies.ContainsKey(evt.Target)) { throw new Exception("State machine of name, " + evt.Target + ", was not found in StateMachineContext: " + base.gameObject.name); } if (stateMachineProxies[evt.Target] != null) { stateMachineProxies[evt.Target].AddEvent(evt.Event); return; } stateMachineProxies.Remove(evt.Target); } StateMachine stateMachine = stateMachines[evt.Target]; if (checkDependencies) { CoroutineRunner.StopAllForOwner(stateMachine); CoroutineRunner.Start(stateMachine.CheckEventDependencies(evt), stateMachine, "Check event dependencies"); } else { stateMachine.SendEvent(evt.Event); } }
protected virtual void OnDestroy() { if (PooledScrollRect != null) { if (goPoolOverride != null) { PooledScrollRect.ResetContent(); } PooledScrollRect.ObjectAdded -= onObjectAdded; PooledScrollRect.ObjectRemoved -= onObjectRemoved; } if (eventDispatcher != null) { eventDispatcher.RemoveListener <TrayEvents.TrayOpened>(onTrayOpened); } isDestroyed = true; if (sceneStateDataListener != null) { sceneStateDataListener.StopListening(); } if (sceneLayoutDataListener != null) { sceneLayoutDataListener.StopListening(); } CoroutineRunner.StopAllForOwner(this); }
private void OnDestroy() { CoroutineRunner.StopAllForOwner(this); if (waitingForRewardScreen && rewardToShow != null) { new ShowRewardPopup.Builder(DRewardPopup.RewardPopupType.generic, rewardToShow).setHeaderText(RewardHeaderToken).Build().Execute(); } }
private void OnDestroy() { if (eventChannel != null) { eventChannel.RemoveAllListeners(); } CoroutineRunner.StopAllForOwner(this); }
private void onDestroy() { CoroutineRunner.StopAllForOwner(this); Timer.StopTimer(); TubeRaceLobbyMmoItemObserver mmoItemObserver = MmoItemObserver; mmoItemObserver.LobbyStartedAction = (Action <long>)Delegate.Remove(mmoItemObserver.LobbyStartedAction, new Action <long>(onLobbyStarted)); }
private void OnDestroy() { CoroutineRunner.StopAllForOwner(this); restoreCamera(); iTween.Stop(base.gameObject); this.EActionEventReceived = null; this.EUsed = null; }
private void OnDestroy() { if (coinsData != null) { coinsData.OnCoinsChanged -= onCoinDataChanged; } CoroutineRunner.StopAllForOwner(this); }
private void OnDestroy() { if (tubeData != null) { tubeData.OnTubeSelected -= onTubeSelected; } CoroutineRunner.StopAllForOwner(this); }
public override void Hide() { base.Hide(); ScrollerContainer.SetActive(value: false); destroyScroller(); SetChallengeVisiblity(isActive: false); CoroutineRunner.StopAllForOwner(this); }
public virtual void OnDestroy() { CoroutineRunner.StopAllForOwner(this); if (SceneRefs.ActionSequencer != null) { SceneRefs.ActionSequencer.SequenceCompleted -= OnActionSequencerSequenceCompleted; } }
private void OnDestroy() { ItemImageBuilder.release(); if (rewardRenderer != null) { CoroutineRunner.StopAllForOwner(rewardRenderer); } }
private void OnDestroy() { CoroutineRunner.StopAllForOwner(this); Service.Get <EventDispatcher>().RemoveListener <CollectibleEvents.CollectibleAdd>(onAddCollectible); PlayerPrefs.SetInt("CollectiblesTutorialCount", numCollectiblesSinceTutorial); PlayerPrefs.SetInt("CollectiblesTutorialsShown", numTutorialsShown); PlayerPrefs.SetInt("CollectiblesShowTutorial", ShouldShowCollectibleTutorial ? 1 : 0); }
public void Hide() { CoroutineRunner.StopAllForOwner(this); if (base.gameObject.activeSelf) { anim.SetBool("IsOpen", value: false); } }
private void OnDestroy() { CoroutineRunner.StopAllForOwner(this); if (currentLoadedWidget != null) { currentLoadedWidget.CountdownCompleteAction -= onWidgetCountdownComplete; } }
private void OnDestroy() { CoroutineRunner.StopAllForOwner(this); if (prop != null) { prop.EActionEventReceived -= onActionEventReceived; } }
private bool onEndGameResultsReceived(TubeRaceEvents.EndGameResultsReceived evt) { if (evt.PartyGameId == GameDefinition.Id && evt.PlayerResults.Count > 1) { CoroutineRunner.StopAllForOwner(this); CoroutineRunner.Start(showRaceResults(evt), this, "showFinishScreen"); } return(false); }
private void OnDestroy() { if (tubeData != null) { tubeData.OnTubeSelected -= onTubeSelected; } CoroutineRunner.StopAllForOwner(this); Service.Get <EventDispatcher>().RemoveListener <NetworkControllerEvents.LocalPlayerDataReadyEvent>(onLocalPlayerDataReady); }
public void OnDisable() { CoroutineRunner.StopAllForOwner(this); if (isInitialized) { dispatcher.RemoveListener <QuestEvents.QuestSyncCompleted>(onQuestSyncCompleted); dispatcher.RemoveListener <QuestEvents.QuestUpdated>(onQuestUpdated); } }
private void OnDestroy() { CoroutineRunner.StopAllForOwner(this); scrollRect.onValueChanged.RemoveListener(onScrollRectUpdate); this.ObjectAdded = null; this.ObjectRemoved = null; this.OnIsMovingChanged = null; this.OnRefreshCompleted = null; }
private void OnDestroy() { CoroutineRunner.StopAllForOwner(this); if (currentShot != null) { FishBucketCannonProjectile fishBucketCannonProjectile = currentShot; fishBucketCannonProjectile.ShotCompleteAction = (Action)Delegate.Remove(fishBucketCannonProjectile.ShotCompleteAction, new Action(onShotComplete)); } }