Пример #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";
 }
Пример #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!");
        }
    }
Пример #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);
        }
    }
Пример #4
0
    void Awake()
    {
        GameObject temp = GameObject.FindGameObjectWithTag("HintBox");

        if (ErrorWindow <killNilan> .CanBeAssigned(temp, this, "HintBox"))
        {
            hintbox = temp.GetComponent <HintBoxController> ();
            //	hintbox.AddObj(gameObject);
        }
    }
Пример #5
0
    void Awake()
    {
        voidPosition = new Vector3(148f, -4.6f, 0);
        GameObject temp = GameObject.FindGameObjectWithTag("HintBox");

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

        shrink = GameObject.FindGameObjectWithTag("Player").GetComponent <ShrinkPlayer> ();
    }
Пример #6
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> ();
        }
    }
Пример #7
0
    void Awake()
    {
        print("puzzle inventory awake");
        GameObject temp = GameObject.FindGameObjectWithTag("HintBox");

        if (ErrorWindow <PuzzlePieceActivator> .CanBeAssigned(temp, this, "HintBox"))
        {
            hintbox = temp.GetComponent <HintBoxController> ();
        }
        GameObject soundDirObj = GameObject.FindGameObjectWithTag("SoundDirector");

        if (soundDirObj != null)
        {
            soundDirector = soundDirObj.GetComponent <SoundDirector> ();
        }
        else
        {
            Debug.Log("Cannot find the SoundDirector!");
        }
    }
Пример #8
0
 void Awake()
 {
     hintBox       = GameObject.FindGameObjectWithTag("HintBox").GetComponent <HintBoxController> ();
     flashText     = GameObject.FindGameObjectWithTag("FlashingTextBox").GetComponent <FlashingTextController> ();
     soundDirector = GameObject.FindGameObjectWithTag("SoundDirector").GetComponent <SoundDirector> ();
 }