示例#1
0
    void Start()
    {
        sentences = new Queue <string>();

        GameObject tutorial = GameObject.Find("DialogueSystem");

        tutor = tutorial.GetComponent <TutorialGame>();
    }
示例#2
0
    // Use this for initialization
    void Start()
    {
        // Find and Store the mediator script.
        mediator = GameObject.Find("Mediator").GetComponent <Mediator>();

        // Find and Store the state manager's script.
        stateManager = GameObject.Find("Level").GetComponent <StateManager>();

        // Find and Store the inventory manager's script.
        inventoryManager = GameObject.Find("Inventory").GetComponent <InventoryManager>();

        // Find and Store the camera controller script.
        cameraController = Camera.main.GetComponent <CameraController>();

        // Find and Store the UI Text that displays the command.
        command = GameObject.Find("Command").GetComponent <Text>();

        // Store the animator.
        animator = this.GetComponent <Animator>();

        // Find and Store the blackboard.
        blackboard = GameObject.Find("Blackboard").GetComponent <Blackboard>();

        // See if you need to move the player.
        object spawn = blackboard.Get(stateManager.PlayerName);

        if (spawn != null)
        {
            Vector3 spawnPosition = (Vector3)spawn;
            GetComponent <Rigidbody2D>().MovePosition(spawnPosition);
        }

        // Get the tutorial game manager.
        tutorialGame = GameObject.Find("Level").GetComponent <TutorialGame>();

        // Get the quest action handler script
        questActionHandler = GameObject.Find("Dialogue Manager Custom").GetComponent <QuestActionHandler>();
    }
示例#3
0
 void Start()
 {
     dialogueManagerGO = GameObject.Find("DialogueManager");
     tutor             = GetComponent <TutorialGame>();
 }