Ejemplo n.º 1
0
        private IEnumerator CoLeaveScoreCard()
        {
            followingCamera.transform.rotation = virtualFollowingCamera.transform.rotation;

            Vector3 desiredPosition = followingCamera.CalculateTargetPosition();

            if (followingCamera.UseBounds)
            {
                desiredPosition = followingCamera.ConstrainPositionInBounds(desiredPosition);
            }

            virtualFollowingCamera.transform.position = desiredPosition;

            timelineDirector.playableAsset = hideScoreCardTimeline;
            timelineDirector.Play();

            yield return(new WaitForSeconds((float)hideScoreCardTimeline.duration));

            isGamePlayActive = true;
            roundTimer       = 0f;

            RequiredMoney = CurrentDifficulty.ScaledMoneyGoal(currentRound);

            hud.UpdateMoneyText();

            EnableGamePlay();
        }
Ejemplo n.º 2
0
        private void Start()
        {
            scoreCard = Instantiate(scoreCardPrefab);
            scoreCard.gameObject.SetActive(false);
            gameOverPanel = Instantiate(gameOverPanelPrefab);
            gameOverPanel.gameObject.SetActive(false);

            scoreCard.OnNextRound   += HandleOnNextRound;
            Table.OnTablesDestroyed += HandleOnTablesDestroyed;

            followingCamera = Camera.main.GetComponent <FollowingCamera>();

            RequiredMoney = CurrentDifficulty.ScaledMoneyGoal(currentRound);
            SendNextDifficulty();
        }