Exemplo n.º 1
0
    private void Awake()
    {
        this.scriptGameDirector = this.objectGameDirector.GetComponent <GameDirector>();
        this.scriptScore        = this.objectGameDirector.GetComponent <Score>();
        this.scriptVaryPanel    = this.objectGameDirector.GetComponent <VaryPanel>();

        this.objectOptionManager = GameObject.FindWithTag("OptionManager");
        this.scriptGameOption    = this.objectOptionManager.GetComponent <GameOption>();

        this.objectBGMManager = GameObject.FindWithTag("BGMManager");
        this.scriptBGMManager = this.objectBGMManager.GetComponent <BGMManager>();

        this.objectSEManager = GameObject.FindWithTag("SEManager");
        this.scriptSEManager = this.objectSEManager.GetComponent <SEManager>();

        this.imageButtonDrop    = this.buttonDrop.GetComponent <Image>();
        this.imageButtonReplace = this.buttonReplace.GetComponent <Image>();
    }
Exemplo n.º 2
0
    // Awake Start Update

    private void Awake()
    {
        this.scriptScore     = this.GetComponent <Score>();
        this.scriptVaryPanel = this.GetComponent <VaryPanel>();

        this.objectOptionManager = GameObject.FindWithTag("OptionManager");
        this.scriptGameOption    = this.objectOptionManager.GetComponent <GameOption>();

        this.objectBGMManager = GameObject.FindWithTag("BGMManager");
        this.scriptBGMManager = this.objectBGMManager.GetComponent <BGMManager>();

        this.objectSEManager = GameObject.FindWithTag("SEManager");
        this.scriptSEManager = this.objectSEManager.GetComponent <SEManager>();

        this.imageDropButton    = this.objectDropButton.GetComponent <Image>();
        this.imageReplaceButton = this.objectReplaceButton.GetComponent <Image>();
        this.textDropButton     = this.objectDropButtonText.GetComponent <Text>();
        this.textReplaceButton  = this.objectReplaceButtonText.GetComponent <Text>();

        this.imageRetryInGameButton     = this.objectRetryInGameButton.GetComponent <Image>();
        this.imageTitleButton           = this.objectTitleButton.GetComponent <Image>();
        this.imageRetryInGameButtonIcon = this.objectRetryInGameButtonIcon.GetComponent <Image>();
        this.imageTitleButtonIcon       = this.objectTitleButtonIcon.GetComponent <Image>();

        this.imageTweetButton       = this.objectTweetButton.GetComponent <Image>();
        this.imageRankingButton     = this.objectRankingButton.GetComponent <Image>();
        this.imageRetryButton       = this.objectRetryButton.GetComponent <Image>();
        this.textTweetButton        = this.objectTweetButtonText.GetComponent <Text>();
        this.textRankingButton      = this.objectRankingButtonText.GetComponent <Text>();
        this.textRetryButton        = this.objectRetryButtonText.GetComponent <Text>();
        this.imageTweetButtonIcon   = this.objectTweetButtonIcon.GetComponent <Image>();
        this.imageRankingButtonIcon = this.objectRankingButtonIcon.GetComponent <Image>();
        this.imageRetryButtonIcon   = this.objectRetryButtonIcon.GetComponent <Image>();

        this.scriptGameButton     = this.objectCanvasButton.GetComponent <GameButton>();
        this.textTimer            = this.objectTextTimer.GetComponent <Text>();
        this.imageTimer           = this.objectImageTimer.GetComponent <Image>();
        this.imageTimerBack       = this.objectImageTimerBack.GetComponent <Image>();
        this.rendererPenaltyPanel = this.objectPenaltyPanel.GetComponent <SpriteRenderer>();

        this.cameraMain = this.objectMainCamera.GetComponent <Camera>();

        this.rendererBackgroundPanels     = this.objectBackgroundPanels.GetComponent <SpriteRenderer>();
        this.rendererBackgroundPhaseScore = this.objectBackgroundPhaseScore.GetComponent <SpriteRenderer>();
        this.rendererBackgroundTotalScore = this.objectBackgroundTotalScore.GetComponent <SpriteRenderer>();

        this.textPhaseScoreHeading = this.objectPhaseScoreHeading.GetComponent <Text>();
        this.textTotalScoreHeading = this.objectTextTotalScoreHeading.GetComponent <Text>();
        this.textTotalScoreValue   = this.objectTextTotalScoreValue.GetComponent <Text>();
        this.textRank        = this.objectTextRank.GetComponent <Text>();
        this.textNextRank    = this.objectTextNextRankl.GetComponent <Text>();
        this.textTipsHeading = this.objectTextTipsHeading.GetComponent <Text>();
        this.textTipsValue   = this.objectTextTipsValue.GetComponent <Text>();

        int indexPhaseScore = 0;

        foreach (Transform transformPhaseScore in this.objectPhaseScoreHeading.transform)
        {
            this.textPhaseScores[indexPhaseScore] = transformPhaseScore.gameObject.GetComponent <Text>();
            indexPhaseScore++;
        }

        this.IsRunning   = false;
        this.phase       = 1;
        this.HasSelected = false;

        this.Timer        = 10;
        this.TimerPenalty = 0;
        this.flagTimeSE   = false;
    }