Пример #1
0
    void Update()
    {
        Vector2 targetVelocity = new Vector2(Input.GetAxisRaw("Horizontal"), Input.GetAxisRaw("Vertical"));

        Move(targetVelocity);
        SetSortingOrder();

        if (Input.GetKeyDown(KeyCode.M))
        {
            if (!al.gameObject.activeSelf)
            {
                al.Menu();
                al.InTrigger(true);
                al.gameObject.SetActive(true);
            }
            else
            {
                al.InTrigger(false);
                al.gameObject.SetActive(false);
            }
        }
    }