temp
This commit is contained in:
23
Assets/Gameplay/Scripts/Frist/PlayerCtrl.cs
Normal file
23
Assets/Gameplay/Scripts/Frist/PlayerCtrl.cs
Normal file
@@ -0,0 +1,23 @@
|
||||
using UnityEngine;
|
||||
using UnityEngine.InputSystem;
|
||||
|
||||
public class PlayerCtrl : MonoBehaviour
|
||||
{
|
||||
InputAction inputAction;
|
||||
// Start is called once before the first execution of Update after the MonoBehaviour is created
|
||||
void Start()
|
||||
{
|
||||
inputAction = FindAnyObjectByType<PlayerInput>().actions["Move"];
|
||||
inputAction.performed += (ctx) =>
|
||||
{
|
||||
Vector2 value = ctx.ReadValue<Vector2>();
|
||||
Debug.Log(value);
|
||||
};
|
||||
}
|
||||
|
||||
// Update is called once per frame
|
||||
void Update()
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user