Exemplo n.º 1
0
    // Use this for initialization
    void Start()
    {
        camera = GetComponent <Camera>();
        if (!camera)
        {
            Debug.LogError("There is no camera here!");
        }

        if (sightConeRadius <= 0)
        {
            sightConeRadius = 35;
            Debug.LogError("The sight line isn't set correctly. Setting to " + sightConeRadius);
        }
        if (!journal)
        {
            //Debug.LogError("Journal not found");
            journal = GameObject.Find("JournalPREFAB").GetComponent <Level_Journal>();
        }

        GameObject canvas = GameObject.Find("Reminder Text");

        if (canvas)
        {
            reminderText = canvas.GetComponent <Descriptor>();
        }
        else
        {
            Debug.LogError("The reminder text canvas isn't here!");
        }

        if (!reminderText)
        {
            Debug.LogError("The description canvas isn't attached!");
        }
    }
Exemplo n.º 2
0
    // Use this for initialization
    void Start()
    {
        Debug.Log("Starting the Journal");
        if (!player)
        {
            // Debug.LogError("Player not found");
            player = GameObject.Find("FirstPersonCharacter").GetComponent <Player>();
        }

        if (!currentLevel)
        {
            // Debug.LogError("currentlevel not found");
            currentLevel = GameObject.Find("JournalPREFAB").GetComponent <Level_Journal>();
        }

        newLevelStart = false;
        journalView   = GameObject.Find("JournalView");
        isEnabled     = false;
        journalView.SetActive(isEnabled);
    }