public void OnDestroy()
 {
     dataEntityCollection.EventDispatcher.RemoveListener <DataEntityEvents.ComponentAddedEvent <ServerObjectItemData> >(onServerObjectItemAdded);
     dataEntityCollection.EventDispatcher.RemoveListener <DataEntityEvents.EntityRemovedEvent>(onServerObjectRemoved);
     EventDispatcher.RemoveListener <IslandTargetsEvents.LocalPlayerHitTargetEvent>(onLocalPlayerHitTarget);
     CoroutineRunner.StopAllForOwner(this);
 }
Beispiel #2
0
        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);
 }
Beispiel #6
0
 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);
 }
Beispiel #9
0
 private bool onBackButtonClicked(CatalogUIEvents.BackButtonClicked evt)
 {
     CoroutineRunner.StopAllForOwner(this);
     isStatsLoading = false;
     DestoryScroller();
     return(false);
 }
Beispiel #10
0
 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);
         }
     }
 }
Beispiel #11
0
        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);
 }
Beispiel #15
0
        private void onDestroy()
        {
            CoroutineRunner.StopAllForOwner(this);
            Timer.StopTimer();
            TubeRaceLobbyMmoItemObserver mmoItemObserver = MmoItemObserver;

            mmoItemObserver.LobbyStartedAction = (Action <long>)Delegate.Remove(mmoItemObserver.LobbyStartedAction, new Action <long>(onLobbyStarted));
        }
Beispiel #16
0
 private void OnDestroy()
 {
     CoroutineRunner.StopAllForOwner(this);
     restoreCamera();
     iTween.Stop(base.gameObject);
     this.EActionEventReceived = null;
     this.EUsed = null;
 }
Beispiel #17
0
 private void OnDestroy()
 {
     if (coinsData != null)
     {
         coinsData.OnCoinsChanged -= onCoinDataChanged;
     }
     CoroutineRunner.StopAllForOwner(this);
 }
Beispiel #18
0
 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);
 }
Beispiel #20
0
 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);
 }
Beispiel #23
0
 public void Hide()
 {
     CoroutineRunner.StopAllForOwner(this);
     if (base.gameObject.activeSelf)
     {
         anim.SetBool("IsOpen", value: false);
     }
 }
Beispiel #24
0
 private void OnDestroy()
 {
     CoroutineRunner.StopAllForOwner(this);
     if (currentLoadedWidget != null)
     {
         currentLoadedWidget.CountdownCompleteAction -= onWidgetCountdownComplete;
     }
 }
 private void OnDestroy()
 {
     CoroutineRunner.StopAllForOwner(this);
     if (prop != null)
     {
         prop.EActionEventReceived -= onActionEventReceived;
     }
 }
Beispiel #26
0
 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);
 }
Beispiel #27
0
 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);
     }
 }
Beispiel #29
0
 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));
     }
 }