add unity project

add SOLID examples
This commit is contained in:
2025-04-09 07:49:12 +02:00
parent ff37858d12
commit a4f498a33d
102 changed files with 8244 additions and 0 deletions
@@ -0,0 +1,21 @@
using UnityEngine;
namespace DefaultNamespace.Solid
{
[RequireComponent(typeof(CharacterController))]
public class PlayerMovement : MonoBehaviour
{
private CharacterController _controller;
private void Awake()
{
_controller = GetComponent<CharacterController>();
}
public void MoveAndRotate(Vector3 movement, float rotation)
{
_controller.Move(movement);
_controller.transform.Rotate(Vector3.up, rotation);
}
}
}