Esempio n. 1
0
    void Update()
    {
        if (GameManager.instance.isStopped())
        {
            return;
        }

        if (canMove)
        {
            MovementInput();
        }

        HandleMovementAnimation();

        flashlight.HandleAim(transform.position);
    }
Esempio n. 2
0
    void Update()
    {
        if (GameManager.instance.isPaused)
        {
            return;
        }

        movement.x = Input.GetAxisRaw("Horizontal");
        movement.y = Input.GetAxisRaw("Vertical");

        if (movement != Vector2.zero)
        {
            ChangeMovementDirection();
        }

        flashlight.HandleAim(transform.position);

        if (Input.GetKeyDown(interactKey))
        {
            GetInteract();
        }
    }