예제 #1
0
    void  Start()
    {
        playButtons = this.transform.Find("PlayButtons");
        yesButton   = playButtons.GetComponentInChildren <YesButton>();
        yesButton.AddEventListener(this.gameObject);
        noButton = playButtons.GetComponentInChildren <NoButton>();
        noButton.AddEventListener(this.gameObject);

        playButtons.active = false;

        bombChain       = this.transform.Find("BombChain").gameObject;
        maxHand         = this.transform.Find("MaxHand").GetComponent <Hand>();
        bombAttachSound = this.transform.Find("BombAttachSound").GetComponent <SoundObject>();
        maxHand.AddEventListener(this.gameObject);
        chainHand = this.transform.Find("ChainHand").GetComponent <Hand>();
        chainHand.AddEventListener(this.gameObject);

        textBoxManagerAfterFirstDialogue = this.transform.Find("TextBoxManagerAfterFirstDialogue").GetComponent <TextBoxManager>();
        textBoxManagerAfterFirstDialogue.AddEventListener(this.gameObject);

        textBoxManagerAfterFirstDialogue.active = false;

        playerControl = this.GetComponentInChildren <MenuPlayerControl>();
        maxHand.AddEventListener(playerControl.gameObject);

        AttachChainToMax();
    }
예제 #2
0
    // Use this for initialization
    void Start()
    {
        playContainer            = this.transform.Find("PlayContainer");
        playContainerAltPosition = this.transform.Find("PlayContainerAltPosition");

        skipTutorialContainer = this.transform.Find("SkipTutorialContainer");
        backgroundMusic       = GameObject.Find("IntroMusic").GetComponent <AudioSource>();
        DontDestroyOnLoad(backgroundMusic.gameObject);

        yesButton = this.transform.Find("PlayContainer/Yes").GetComponent <YesButton>();
        yesButton.AddEventListener(this.gameObject);

        int tutorialPassed = PlayerPrefs.GetInt(GlobalSaveVars.TUTORIALFINISHED, 0);

        if (tutorialPassed == 1)
        {
            skipTutorialContainer.active = true;
            skipTutorialContainer.GetComponentInChildren <SkipTutorialButton>().AddEventListener(this.gameObject);
            playContainer.position = playContainerAltPosition.position;
        }
    }