Exemplo n.º 1
0
 void Awake()
 {
     hintBox         = GameObject.FindGameObjectWithTag("HintBox").GetComponent <HintBoxController> ();
     flashText       = GameObject.FindGameObjectWithTag("FlashingTextBox").GetComponent <FlashingTextController> ();
     hint            = "You need a cage to trap the enemy.";
     flashingTextMsg = "Press e";
 }
Exemplo n.º 2
0
    void Awake()
    {
        GameObject temp = GameObject.FindGameObjectWithTag("HintBox");

        if (ErrorWindow <PowerUpGameObjects> .CanBeAssigned(temp, this, "HintBox"))
        {
            hintbox = temp.GetComponent <HintBoxController> ();
        }

        GameObject tempflash = GameObject.FindGameObjectWithTag("FlashingTextBox");

        if (ErrorWindow <PowerUpGameObjects> .CanBeAssigned(tempflash, this, "FlashingTextBox"))
        {
            flashText = tempflash.GetComponent <FlashingTextController> ();
        }

        GameObject soundDirObj = GameObject.FindGameObjectWithTag("SoundDirector");

        if (soundDirObj != null)
        {
            soundDirector = soundDirObj.GetComponent <SoundDirector> ();
        }
        else
        {
            Debug.Log("Cannot find the SoundDirector!");
        }
    }
Exemplo n.º 3
0
    // Use this for initialization
    void Awake()
    {
        GameObject soundDirObj = GameObject.FindGameObjectWithTag("SoundDirector");

        if (soundDirObj != null)
        {
            soundDirector = soundDirObj.GetComponent <SoundDirector> ();
        }
        else
        {
            Debug.Log("Cannot find the SoundDirector!");
        }

        GameObject directorObj = GameObject.FindGameObjectWithTag("Director");

        if (directorObj != null)
        {
            director = directorObj.GetComponent <Director> ();
        }
        else
        {
            Debug.Log("Cannot find the SoundDirector!");
        }



        pieces = new List <GameObject>();
        foreach (Transform child in transform)
        {
            if (child.tag == "hiddenPuzzlePieces")
            {
                pieces.Add(child.gameObject);
            }
        }
        totalPiecesLeft = pieces.Count;

        if (pieces.Count == 1)
        {
            onlyOneChild = true;
        }


        GameObject temp = GameObject.FindGameObjectWithTag("HintBox");

        if (ErrorWindow <PuzzlePlatform> .CanBeAssigned(temp, this, "HintBox"))
        {
            hintbox = temp.GetComponent <HintBoxController> ();
            hintbox.AddObj(gameObject);
        }

        GameObject tempFlash = GameObject.FindGameObjectWithTag("FlashingTextBox");

        if (ErrorWindow <PuzzlePlatform> .CanBeAssigned(tempFlash, this, "FlashingTextBox"))
        {
            flashText = tempFlash.GetComponent <FlashingTextController> ();
            flashText.AddObj(gameObject);
        }
    }
Exemplo n.º 4
0
    void Awake()
    {
        GameObject tempFlash = GameObject.FindGameObjectWithTag("FlashingTextBox");

        if (ErrorWindow <PuzzleInventory> .CanBeAssigned(tempFlash, this, "FlashingTextBox"))
        {
            flashText = tempFlash.GetComponent <FlashingTextController> ();

            flashText.AddObj(gameObject);
        }
    }
Exemplo n.º 5
0
    void Awake()
    {
        GameObject temp = GameObject.FindGameObjectWithTag("HintBox");

        if (ErrorWindow <MirrorScript> .CanBeAssigned(temp, this, "HintBox"))
        {
            hintbox = temp.GetComponent <HintBoxController> ();
        }

        GameObject tempFlash = GameObject.FindGameObjectWithTag("FlashingTextBox");

        if (ErrorWindow <MirrorScript> .CanBeAssigned(tempFlash, this, "FlashingTextBox"))
        {
            flashText = tempFlash.GetComponent <FlashingTextController> ();
        }
    }
Exemplo n.º 6
0
 void Awake()
 {
     flashText = GameObject.FindGameObjectWithTag("FlashingTextBox").GetComponent <FlashingTextController> ();
 }
Exemplo n.º 7
0
 void Awake()
 {
     hintBox       = GameObject.FindGameObjectWithTag("HintBox").GetComponent <HintBoxController> ();
     flashText     = GameObject.FindGameObjectWithTag("FlashingTextBox").GetComponent <FlashingTextController> ();
     soundDirector = GameObject.FindGameObjectWithTag("SoundDirector").GetComponent <SoundDirector> ();
 }