using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.InputSystem;

public class Player : MonoBehaviour
{

    public Vector2 inputVec;
    public float speed;
    public Scanner scanner;
    public Hand[] hands;
    public RuntimeAnimatorController[] animCon;

    public float dashSpeed;
    public float defaultTime;
    float dashTime;
    float defaultSpeed;

    bool isDash;

    public float coolTime;
    float waitTime;



    Rigidbody2D rigid;
    SpriteRenderer spriter;
    Animator anim;
    // Start is called before the first frame update

    private void Start()
    {
        defaultSpeed = speed;
        waitTime = coolTime;
    }

    void Awake()
    {
        rigid = GetComponent<Rigidbody2D>();
        spriter = GetComponent<SpriteRenderer>();
        anim = GetComponent<Animator>();
        scanner = GetComponent<Scanner>();
        hands = GetComponentsInChildren<Hand>(true);

    }

    private void OnEnable()
    {
        speed *= Character.Speed;
        anim.runtimeAnimatorController = animCon[GameManager.instance.playerId];
    }


    private void FixedUpdate()
    {
        waitTime += Time.deltaTime;



        if (!GameManager.instance.isLive)
            return;

        //힘을 준다
        //rigid.AddForce(inputVec);

        //속도 제어
        //rigid.velocity = inputVec;

        //위치 이동
        Vector2 nextVec = inputVec * speed * Time.fixedDeltaTime;
        rigid.MovePosition(rigid.position + nextVec);

        if (Input.GetKey(KeyCode.LeftShift) && waitTime >= coolTime)
        {
            isDash = true;
        }

        if (dashTime <= 0)
        {

            defaultSpeed = speed;

            if (isDash)
                dashTime = defaultTime;


        }
        else
        {
            dashTime -= Time.deltaTime;
            defaultSpeed = dashSpeed;
            waitTime = 0f;
        }
        isDash = false;

    }

    private void OnMove(InputValue value)
    {

        inputVec = value.Get<Vector2>();
    }

    private void LateUpdate()
    {
        if (!GameManager.instance.isLive)
            return;

        anim.SetFloat("Speed",inputVec.magnitude);

        if(inputVec.x != 0)
        {
            spriter.flipX = inputVec.x < 0;
        }
    }

    private void OnCollisionStay2D(Collision2D collision)
    {
        if (!GameManager.instance.isLive)
            return;

        GameManager.instance.health -= Time.deltaTime * 10;

        if (GameManager.instance.health < 0)
        {
            for (int index=2; index < transform.childCount; index++)
            {
                transform.GetChild(index).gameObject.SetActive(false);
            }

            anim.SetTrigger("Dead");
            GameManager.instance.GameOver();
        }
    }
}


에러가 나거나 하진 않는데 쉬프트 버튼을 눌러도 작동하질 않는데 그 이유를 도저히 모르겠네요.

혹시 새로운 인풋시스템을 사용한거 때문에 그런걸까요?

기존에 만들어 둔것에 대쉬기능만 추가 하려고 하니 어디부터 고쳐야 할지를 모르겠어서 답답하네요.