예제 #1
0
 private bool onGameRoundEnded(IslandTargetsEvents.GameRoundEnded evt)
 {
     RemoveListeners();
     if (localDamageCount < DamageCapacity)
     {
         CoroutineRunner.Start(AnimateOutOfViewDelayed(2f), this, "TargetAnimateOutDelayed");
     }
     else
     {
         CoroutineRunner.Start(AnimateOutOfView(), this, "TargetAnimateOut");
     }
     return(false);
 }
 private bool onRoundEnded(IslandTargetsEvents.GameRoundEnded evt)
 {
     if (gameState == TargetsGameState.FinalRound)
     {
         gameState = TargetsGameState.Idle;
         ClockTowerAnimator.speed = 1f;
         gameState = TargetsGameState.Idle;
         dispatcher.RemoveListener <IslandTargetsEvents.TargetHit>(onTargetHit);
         CoroutineRunner.Start(setClockTimerVisible(isVisible: false, RewardDelay), this, "setClockTimerVisible");
         ClockSmallHand.transform.localRotation = Quaternion.identity;
         if (animatorFloatingClock != null && !string.IsNullOrEmpty(ClockTriggerFlyBack))
         {
             animatorFloatingClock.SetTrigger(ClockTriggerFlyBack);
             animatorFloatingClock.ResetTrigger(ClockTriggerFlyOut);
         }
         CoroutineRunner.Start(setScarecrowVisible(isVisible: true, RewardDelay), this, "setScarecrowVisible");
         FinishCamera.SetActive(value: true);
         if (ClockController != null)
         {
             ClockController.StartClock();
         }
         for (int i = 0; i < SideScoreboards.Length; i++)
         {
             SideScoreboards[i].SetState(IslandTargetsSideScoreboard.SideScoreboardState.WonGame);
         }
         CoroutineRunner.Start(resetScoreboardState(RoundWinResetDelay), this, "ResetScoreboardState");
         CoroutineRunner.Start(showRewards(), this, "ShowTargetGameRewards");
         if (!string.IsNullOrEmpty(WinMusicName))
         {
             EventManager.Instance.PostEvent(MusicEventName, EventAction.SetSwitch, WinMusicName, createCoMusicTarget);
         }
         EventManager.Instance.PostEvent(WinSFXTrigger, EventAction.PlaySound, base.gameObject);
         LogBIDataForWin();
         CoroutineRunner.Start(SwitchBackToDefautMusic(ReturnToEvergreenMusicWait), this, "SwitchToEvergreenMusic");
     }
     else
     {
         for (int i = 0; i < SideScoreboards.Length; i++)
         {
             SideScoreboards[i].SetState(IslandTargetsSideScoreboard.SideScoreboardState.BetweenRounds);
         }
     }
     if (isPlayingLowTimeSFX)
     {
         EventManager.Instance.PostEvent(LowTimeSFXTrigger, EventAction.StopSound, base.gameObject);
         isPlayingLowTimeSFX = false;
     }
     InvokeRepeating("displayGameStartCountdown", 0f, 1f);
     return(false);
 }