Example #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();
    }
Example #2
0
    public override void OnActivated()
    {
        if (SceneUtils.FindObject <CrossInputListener>())
        {
            SceneUtils.FindObject <CrossInputListener>().Show();
        }

        textBoxManager.AddEventListener(this.gameObject);
        textBoxManager.ResetShowAndActivate(0);
    }
Example #3
0
    public void OnTriggerEnter2D(Collider2D col)
    {
        PlayerControl player = col.gameObject.GetComponent <PlayerControl>();

        if (player)
        {
            collider2D.enabled    = false;
            textBoxManager.active = true;
            textBoxManager.AddEventListener(player.gameObject);
            textBoxManager.OnActivate();
            DispatchMessage("OnStartTutorialWithTextBox", null);
        }
    }
    // 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);
    }
Example #5
0
 // Use this for initialization
 void Start()
 {
     textBoxManager = this.GetComponentInChildren <TextBoxManager>();
     textBoxManager.AddEventListener(this.gameObject);
     textBoxManager.active = false;
 }
Example #6
0
 // Use this for initialization
 void Start()
 {
     talking        = this.GetComponentInChildren <PlayerTalking>();
     textBoxManager = SceneUtils.FindObjectOf <TextBoxManager>();
     textBoxManager.AddEventListener(this.gameObject);
 }