private void OnWaveLeft()
    {
        if (!Active)
        {
            return;
        }
        cat.Dash(new Vector2(-1f, 1f).normalized);

        am.PlayWhoosh();
    }
예제 #2
0
    // Update is called once per frame
    void Update()
    {
        if (!Active)
        {
            return;
        }

        if (Input.GetKeyDown(KeyCode.W))
        {
            cat.Dash(Vector2.up.normalized);
        }
        else if (Input.GetKeyDown(KeyCode.A))
        {
            cat.Dash(new Vector2(-1f, 1f).normalized);
        }
        else if (Input.GetKeyDown(KeyCode.D))
        {
            cat.Dash(Vector2.one.normalized);
        }
    }