Beispiel #1
0
    // Update is called once per frame
    void Update()
    {
        if (!GameManager.instance.in_dialogue)
        {
            input = new Vector3(Input.GetAxisRaw("Horizontal"), Input.GetAxisRaw("Vertical"), 0);


            if (inside_npc_radius && Input.GetKeyDown(KeyCode.Space))
            {
                Debug.Log("yo");
                StartNpcDialogue(current_npc_startNode);
                GameManager.instance.in_dialogue = true;
            }
        }
        else
        {
            if (Input.GetKeyDown(KeyCode.Space))
            {
                d_ui.MarkLineComplete();
            }
        }


        /*
         * if (Input.GetKeyDown(KeyCode.G) && collided_npc != null)
         * {
         *  Inventory.GetInstance().AddToInventory(collided_npc.GetItemToGive());
         *  InvenUI.GetInstance().ShowItem(collided_npc.inventoryIndex);
         *
         * }*/

        if (Input.GetKeyDown(KeyCode.Space) && collided_pick_up != null)
        {
            collided_pick_up.AddItemToInvenory(collided_pick_up.yarn_var);
            collided_pick_up.gameObject.SetActive(false);
        }
    }