Beispiel #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();
    }
    // Use this for initialization
    void  Awake()
    {
        int timeRanOut = PlayerPrefs.GetInt(GlobalSaveVars.TIMERANOUTNAME, 0);

        if (timeRanOut == 1 && !disableTimeout)
        {
            MaxLoader.LoadAlternativeEndScene();
        }

        maxHand = this.transform.Find("MaxHand").GetComponent <Hand>();
        maxHand.AddEventListener(this.gameObject);
        textBoxManagerFirst = this.transform.Find("TextBoxManagerFirst").GetComponent <TextBoxManager>();

        textBoxManagerFirst.AddEventListener(this.gameObject);

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