restored from pc, added .editorconfig

This commit is contained in:
2025-05-26 17:08:43 +02:00
parent c11e51ec38
commit 62cb740f69
249 changed files with 2134 additions and 596 deletions

13
Assets/jelycho/Code/Player/PlayerController.cs Normal file → Executable file
View File

@@ -17,8 +17,6 @@ namespace RealityReboot.jelycho.Player {
readonly Config m_Config;
PlayerActor m_FPPActor;
[Inject] InputService m_InputService;
public PlayerController(Config config) {
m_Config = config;
}
@@ -27,8 +25,8 @@ namespace RealityReboot.jelycho.Player {
}
public async UniTask OnStart(CancellationToken cancellationToken) {
m_InputService.LockCursor();
m_InputService.EnableControls();
RR.Input.LockCursor();
RR.Input.EnableControls();
m_FPPActor = await RR.World.SpawnActor<PlayerActor>(m_Config.playerActorPrefab, cancellationToken);
m_FPPActor.Simulate = true;
@@ -37,8 +35,8 @@ namespace RealityReboot.jelycho.Player {
}
public void OnStop() {
m_InputService.DisableControls();
m_InputService.UnlockCursor();
RR.Input.DisableControls();
RR.Input.UnlockCursor();
Object.Destroy(m_FPPActor);
RR.World.KillActor(m_FPPActor);
@@ -57,8 +55,7 @@ namespace RealityReboot.jelycho.Player {
m_FPPActor.Look(lookInput * FPPConfig.s_MouseSensitivity.FloatValue);
Vector2 moveInput = m_Config.moveActionReference.action.ReadValue<Vector2>();
m_FPPActor.MoveRight(moveInput.x);
m_FPPActor.MoveForward(moveInput.y);
m_FPPActor.SetMoveInput(moveInput);
if (m_Config.jumpActionReference.action.WasPerformedThisFrame()) {
m_FPPActor.Jump();