Beispiel #1
0
    /// <summary>
    /// Update is called every frame, if the MonoBehaviour is enabled.
    /// </summary>
    void Update()
    {
        if (stopped)
        {
            return;
        }

        if (FindObjectOfType <DialogController>().isDialogOnScreen())
        {
            if (Input.GetKeyDown("e"))
            {
                FindObjectOfType <DialogController>().HideDialog();
                if (lasttime)
                {
                    sound.playSoundeffect(SoundController.SE.FLARE);
                    gc.END();
                }
            }
        }
        else
        {
            // Dialog on screen, don't move
            CalculateMovement();
            CalculatePickupBox();
            CalculatePointer();
            CreateFootPrint();
            if (Input.GetKeyDown("e"))
            {
                GetComponentInChildren <PickUpObject>().pickupTarget();
            }
        }
    }