AbstractUnit for cross team compatibility

+ New folder in Scripts
This commit is contained in:
Crizomb 2025-01-09 11:44:24 +01:00
parent 385d8669b1
commit f8e85d7134
18 changed files with 112 additions and 80 deletions

View file

@ -1,29 +0,0 @@
using UnityEngine;
using UnityEngine.InputSystem;
public class CameraMouvement : MonoBehaviour
{
[SerializeField] private float moveSpeed = 5f;
private Vector2 _moveInput;
public void HandleCameraMovement(InputAction.CallbackContext context)
{
_moveInput = Vector2.zero;
if (context.phase == InputActionPhase.Performed)
{
_moveInput = context.ReadValue<Vector2>();
}
}
// Start is called once before the first execution of Update after the MonoBehaviour is created
void Start()
{
}
// Update is called once per frame
void Update()
{
var mouvement = moveSpeed * Time.deltaTime * (new Vector3(_moveInput.y, 0, -_moveInput.x));
transform.Translate(mouvement, Space.World);
}
}