Complete reorga

This commit is contained in:
2026-03-09 17:55:23 +01:00
parent d9326e48cc
commit 10faf74405
703 changed files with 13040 additions and 1533 deletions
@@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 90903bdc4d0191b4ea676e8add9eec91
guid: 6e81c29b1e7997340a20f4c98069dc1c
folderAsset: yes
DefaultImporter:
externalObjects: {}
@@ -1,6 +1,6 @@
using UnityEngine;
namespace Unheimlich.Audio
namespace Unheimlich.Core.Audio
{
[CreateAssetMenu(fileName = "AudioEmitterData", menuName = "Unheimlich/Audio/Audio Emitter Data")]
public class AudioEmitterData : ScriptableObject
@@ -1,10 +1,10 @@
using System.Collections;
using UnityEngine;
using UnityEngine.InputSystem;
using Unheimlich.Utility;
using Unheimlich.Data.CameraSettings;
using Unheimlich.Core.Utils;
using Unheimlich.World.CameraSystem;
namespace Unheimlich.Audio
namespace Unheimlich.Core.Audio
{
public enum AudioEmitterType
{
@@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 3bc8e4216ee36534d89573f82ca94168
guid: 8f37ef6d86cfe0a48b2cc2ceff08765c
folderAsset: yes
DefaultImporter:
externalObjects: {}
@@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 305406de510d86a439ef94c61b9e08ea
guid: 765c25ede342e8a4c8ac75e1c6507592
folderAsset: yes
DefaultImporter:
externalObjects: {}
@@ -3,7 +3,8 @@ using OctoCore;
using OctoCore.Inputs;
using Unheimlich.Core;
namespace Unheimlich.Managers
namespace Unheimlich.Core.Input
{
/// <summary>
/// Unified input manager wrapping OctoCore inputs with Unheimlich-specific contexts.
@@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 41fba9d7fa6130e42bec85319cf9caf3
guid: 6ad37ffd053dea24999481ef2a838247
folderAsset: yes
DefaultImporter:
externalObjects: {}
@@ -1,9 +1,9 @@
using UnityEngine;
using Unheimlich.Core;
using Unheimlich.Utility;
using InputManager = Unheimlich.Managers.InputManager;
using Unheimlich.Core.Utils;
using InputManager = Unheimlich.Core.Input.InputManager;
namespace Unheimlich.Interactions.Core
namespace Unheimlich.Core.Interaction
{
public class InteractionHandler : Singleton<InteractionHandler>
{
@@ -1,6 +1,6 @@
using UnityEngine;
namespace Unheimlich.Interactions.Core
namespace Unheimlich.Core.Interaction
{
/// <summary>
/// Base class for all interactable objects in the game.
@@ -1,12 +1,14 @@
using UnityEngine;
using System.Collections.Generic;
using Unheimlich.Data.Dialogues;
using Unheimlich.Data.DetectiveBoard;
using Unheimlich.Gameplay.Player;
using Unheimlich.Managers;
using Unheimlich.Features.Dialogue.Data;
using Unheimlich.Features.DetectiveBoard.Data;
using Unheimlich.Features.DetectiveBoard;
using Unheimlich.Features.Player;
using Unheimlich.Features.Dialogue;
using Unheimlich.Features.Dialogue.UI;
using OctoCore.Localization;
namespace Unheimlich.Interactions.FloatingWords
namespace Unheimlich.Core.Interaction
{
public class ObjectDescriptionTrigger : MonoBehaviour
{
@@ -1,6 +1,6 @@
using UnityEngine;
namespace Unheimlich.Interactions.FloatingWords
namespace Unheimlich.Core.Interaction
{
public class ObjectDescriptionTriggerReference : MonoBehaviour
{
@@ -2,11 +2,11 @@ using System.Collections;
using UnityEngine;
using UnityEngine.InputSystem;
using Unheimlich.Core;
using Unheimlich.Gameplay.Items;
using Unheimlich.Gameplay.Player;
using InputManager = Unheimlich.Managers.InputManager;
using Unheimlich.Features.Items;
using Unheimlich.Features.Player;
using InputManager = Unheimlich.Core.Input.InputManager;
namespace Unheimlich.Interactions.Core
namespace Unheimlich.Core.Interaction
{
/// <summary>
/// Handles player item inspection mode.
@@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 4655ec1f5713c2240abc6ee0dabbf8df
guid: 49fb0f79c3b9b1142a8e1a2f7c71b843
folderAsset: yes
DefaultImporter:
externalObjects: {}
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 2640c02bccbc7f545bba42f68c183b79
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
@@ -1,6 +1,6 @@
using UnityEngine;
namespace Unheimlich.Utility
namespace Unheimlich.Core.Utils
{
/// <summary>
/// Utility functions for portal camera rendering and visibility calculations.
@@ -1,6 +1,6 @@
using UnityEngine;
namespace Unheimlich.Gameplay.Portals
namespace Unheimlich.Core.Utils
{
/// <summary>
/// Shared constants for the portal system.
@@ -1,6 +1,6 @@
using UnityEngine;
namespace Unheimlich.Utility
namespace Unheimlich.Core.Utils
{
public static class RaycastHelper
{
@@ -1,7 +1,7 @@
using UnityEngine;
using TMPro;
namespace Unheimlich.Utility
namespace Unheimlich.Core.Utils
{
public static class TweenHelper
{
@@ -1,6 +1,6 @@
using UnityEngine;
namespace Unheimlich.Utility
namespace Unheimlich.Core.Utils
{
public static class UnityExtensions
{
@@ -1,8 +0,0 @@
fileFormatVersion: 2
guid: b8187494b7ec5bb4cad805579f1a1789
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
-8
View File
@@ -1,8 +0,0 @@
fileFormatVersion: 2
guid: c07f3bd13606c2c4aa5fbbc6c175809e
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
+8
View File
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 19e29f2b592fdb44da1490d3f1d8befe
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 494acbc99a38a1f4dbbe46579e1a4d2c
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
@@ -1,7 +1,7 @@
using UnityEngine;
using Unheimlich.Gameplay.Player;
using Unheimlich.Features.Player;
namespace Unheimlich.Audio
namespace Unheimlich.Dev
{
public class AudioSourceDemo : MonoBehaviour
{
@@ -80,7 +80,7 @@ namespace Unheimlich.Audio
_hasStarted = true;
}
Player playerObj = Player.Instance;
PlayerController playerObj = PlayerController.Instance;
if (playerObj != null)
_player = playerObj.transform;
}
@@ -1,7 +1,8 @@
using UnityEngine;
using Unheimlich.Gameplay.Player;
namespace Unheimlich.Audio
using Unheimlich.Features.Player;
using Unheimlich.Features.Diapason;
using Unheimlich.Core.Audio;
namespace Unheimlich.Dev
{
public class DiapasonDebugger : MonoBehaviour
{
@@ -11,12 +12,12 @@ namespace Unheimlich.Audio
[SerializeField] private Color _listeningRangeColor = Color.cyan;
[SerializeField] private Color _activeTargetColor = Color.green;
private DiapasonListeningHandler _listeningHandler;
private DiapasonListeningHandlerV2 _listeningHandler;
private AudioListenable[] _allListenables;
private void Awake()
{
_listeningHandler = DiapasonListeningHandler.Instance;
_listeningHandler = DiapasonListeningHandlerV2.Instance;
}
private void Start()
@@ -0,0 +1,181 @@
using UnityEngine;
using Unheimlich.Features.OctoArms;
namespace Unheimlich.Dev
{
[ExecuteInEditMode]
public class DiapasonPoseTweaker : MonoBehaviour
{
[Header("References")]
[SerializeField] private OctoIkArmsImproved _armsSystem;
[SerializeField] private int _armIndex = 1;
[Header("Quick Presets")]
[SerializeField] private bool _applyPreset1 = false;
[SerializeField] private bool _applyPreset2 = false;
[SerializeField] private bool _applyPreset3 = false;
[Header("Live Tweaking (Runtime Only)")]
[SerializeField] private Vector3 _shoulderRotation = new Vector3(20, 0, -10);
[SerializeField] private Vector3 _elbowRotation = new Vector3(0, 0, 0);
[SerializeField] private Vector3 _wristRotation = new Vector3(0, 0, 90);
[Header("Preview")]
[SerializeField] private bool _previewPose = false;
private ArmEquipment _equipment;
private bool _wasPreviewActive = false;
void Update()
{
if (!Application.isPlaying)
return;
if (_armsSystem == null)
return;
if (_equipment == null)
{
var armRigField = typeof(OctoIkArmsImproved).GetField("_rightArm",
System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.Instance);
if (armRigField != null)
{
var armRig = armRigField.GetValue(_armsSystem);
var equipmentField = armRig.GetType().GetField("Equipment");
if (equipmentField != null)
{
_equipment = (ArmEquipment)equipmentField.GetValue(armRig);
}
}
}
if (_equipment == null)
return;
if (_previewPose && _equipment.State == ArmState.Environmental)
{
ApplyRotations();
_wasPreviewActive = true;
}
else if (_wasPreviewActive && !_previewPose)
{
ResetRotations();
_wasPreviewActive = false;
}
if (_equipment.State == ArmState.Equipped)
{
_equipment.ShoulderRotationOffset = _shoulderRotation;
_equipment.ElbowRotationOffset = _elbowRotation;
_equipment.WristRotationOffset = _wristRotation;
}
}
void OnValidate()
{
if (_applyPreset1)
{
_applyPreset1 = false;
ApplyPreset1();
}
if (_applyPreset2)
{
_applyPreset2 = false;
ApplyPreset2();
}
if (_applyPreset3)
{
_applyPreset3 = false;
ApplyPreset3();
}
}
private void ApplyPreset1()
{
_shoulderRotation = new Vector3(30, 0, -15);
_elbowRotation = new Vector3(0, 10, 0);
_wristRotation = new Vector3(0, 0, 90);
Debug.Log("[DiapasonPose] Applied Preset 1: Close to body, slight inward");
}
private void ApplyPreset2()
{
_shoulderRotation = new Vector3(20, -10, -20);
_elbowRotation = new Vector3(0, 0, 0);
_wristRotation = new Vector3(0, -15, 90);
Debug.Log("[DiapasonPose] Applied Preset 2: Further from left hand, angled");
}
private void ApplyPreset3()
{
_shoulderRotation = new Vector3(15, 0, -25);
_elbowRotation = new Vector3(0, 15, 0);
_wristRotation = new Vector3(0, 0, 85);
Debug.Log("[DiapasonPose] Applied Preset 3: Natural grip, centered");
}
private void ApplyRotations()
{
if (_equipment.ShoulderBone != null)
{
_equipment.ShoulderBone.localRotation = _equipment.OriginalShoulderRotation * Quaternion.Euler(_shoulderRotation);
}
if (_equipment.ElbowBone != null)
{
_equipment.ElbowBone.localRotation = _equipment.OriginalElbowRotation * Quaternion.Euler(_elbowRotation);
}
if (_equipment.WristBone != null)
{
_equipment.WristBone.localRotation = _equipment.OriginalWristRotation * Quaternion.Euler(_wristRotation);
}
}
private void ResetRotations()
{
if (_equipment.ShoulderBone != null)
{
_equipment.ShoulderBone.localRotation = _equipment.OriginalShoulderRotation;
}
if (_equipment.ElbowBone != null)
{
_equipment.ElbowBone.localRotation = _equipment.OriginalElbowRotation;
}
if (_equipment.WristBone != null)
{
_equipment.WristBone.localRotation = _equipment.OriginalWristRotation;
}
}
void OnGUI()
{
if (!Application.isPlaying)
return;
GUILayout.BeginArea(new Rect(10, 150, 350, 250));
GUILayout.Label("=== Diapason Pose Tweaker ===");
GUILayout.Label($"Shoulder: {_shoulderRotation}");
GUILayout.Label($"Elbow: {_elbowRotation}");
GUILayout.Label($"Wrist: {_wristRotation}");
GUILayout.Space(10);
GUILayout.Label("Tips:");
GUILayout.Label("• Shoulder X: + = down, - = up");
GUILayout.Label("• Shoulder Y: + = inward, - = outward");
GUILayout.Label("• Shoulder Z: + = twist out, - = twist in");
GUILayout.Label("• Elbow Y: + = bend out, - = bend in");
GUILayout.Label("• Wrist Z: rotation du diapason");
GUILayout.EndArea();
}
}
}
@@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: 8d1a1f500877b404fa6d23dff3bfa8c8
@@ -1,7 +1,7 @@
using UnityEngine;
using Unheimlich.Gameplay.Portals;
using Unheimlich.Features.Portals;
namespace Unheimlich.Audio
namespace Unheimlich.Dev
{
public class PortalAudioDebugger : MonoBehaviour
{
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: e0aa54a362183cc438127eed92b8ec3d
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,47 @@
using UnityEngine;
using UnityEngine.InputSystem;
using Unheimlich.Features.Diapason;
namespace Unheimlich.Dev
{
public class DiapasonEquipmentTester : MonoBehaviour
{
[Header("References")]
[SerializeField] private DiapasonEquipmentManager _equipmentManager;
[Header("Input")]
[SerializeField] private Key _equipKey = Key.E;
[SerializeField] private Key _unequipKey = Key.R;
void Update()
{
if (_equipmentManager == null)
return;
if (Keyboard.current[_equipKey].wasPressedThisFrame)
{
_equipmentManager.EquipDiapason();
}
if (Keyboard.current[_unequipKey].wasPressedThisFrame)
{
_equipmentManager.UnequipDiapason();
}
}
void OnGUI()
{
GUILayout.BeginArea(new Rect(10, 10, 350, 150));
GUILayout.Label("=== Diapason Equipment System ===");
GUILayout.Label($"Press {_equipKey} to Equip Diapason");
GUILayout.Label($"Press {_unequipKey} to Unequip Diapason");
GUILayout.Label("");
GUILayout.Label("When equipped:");
GUILayout.Label("• Move LEFT hand to touch AudioListenable");
GUILayout.Label("• LEFT CLICK to tap and activate");
GUILayout.EndArea();
}
}
}
@@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: 9279e0fb73118d14ba6f2cf05170a660
@@ -2,7 +2,7 @@ using UnityEngine;
using OctoCore.Localization;
using UnityEngine.InputSystem;
namespace Unheimlich.Tools
namespace Unheimlich.Dev
{
/// <summary>
/// Simple debug script to switch language at runtime.
@@ -1,6 +1,6 @@
using UnityEngine;
using UnityEditor;
using Unheimlich.Audio;
using Unheimlich.Core.Audio;
namespace Unheimlich.Editor
{
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 8de9ee5442f901b44a5eabaab4deebe8
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
@@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 82ca56838506a694196a2130ecff8694
guid: 3e30b918248fbaa45bd741cc5a8bbeac
folderAsset: yes
DefaultImporter:
externalObjects: {}
@@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: ca9f0ebb935bc2e4eab3700478b41297
guid: 41ce6b2bff04d1e4d9eb45ac2c7dd0d9
folderAsset: yes
DefaultImporter:
externalObjects: {}
@@ -1,6 +1,6 @@
using UnityEngine;
namespace Unheimlich.Data.DetectiveBoard
namespace Unheimlich.Features.DetectiveBoard.Data
{
[CreateAssetMenu(fileName = "ClueData", menuName = "Unheimlich/Detective Board/Clue Data")]
public class ClueData : ScriptableObject
@@ -1,9 +1,9 @@
using UnityEngine;
using System;
using System.Collections.Generic;
using Unheimlich.UI.DetectiveBoard;
using Unheimlich.Features.DetectiveBoard.UI;
namespace Unheimlich.Data.DetectiveBoard
namespace Unheimlich.Features.DetectiveBoard.Data
{
[Serializable]
public class PostItNodeData
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: a7317abe29dcd654f99d8d2ad8e1d179
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
@@ -1,6 +1,7 @@
using UnityEngine;
using UnityEditor;
using Unheimlich.Data.DetectiveBoard;
using Unheimlich.Features.DetectiveBoard.Data;
using Unheimlich.Features.DetectiveBoard;
namespace Unheimlich.Editor
{
@@ -26,7 +27,7 @@ namespace Unheimlich.Editor
{
if (Application.isPlaying)
{
Managers.DetectiveBoardManager.Instance?.UnlockClue(clueData);
DetectiveBoardManager.Instance?.UnlockClue(clueData);
}
else
{
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 81f81f88e30714043a121630f7bf7cb9
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
@@ -1,8 +1,8 @@
using UnityEngine;
using Unheimlich.Data.DetectiveBoard;
using Unheimlich.Managers;
using Unheimlich.Features.DetectiveBoard.Data;
using Unheimlich.Features.DetectiveBoard;
namespace Unheimlich.Handlers.DetectiveBoard
namespace Unheimlich.Features.DetectiveBoard
{
/// <summary>
/// Unlocks a clue when a specific audio source plays or finishes playing.
@@ -1,10 +1,10 @@
using UnityEngine;
using Unheimlich.Data.DetectiveBoard;
using Unheimlich.Interactions.Core;
using Unheimlich.Managers;
using Unheimlich.Gameplay.Items;
using Unheimlich.Features.DetectiveBoard.Data;
using Unheimlich.Core.Interaction;
using Unheimlich.Features.DetectiveBoard;
using Unheimlich.Features.Items;
namespace Unheimlich.Handlers.DetectiveBoard
namespace Unheimlich.Features.DetectiveBoard
{
/// <summary>
/// Unlocks a clue when the player interacts with this object.
@@ -1,8 +1,8 @@
using UnityEngine;
using Unheimlich.Data.DetectiveBoard;
using Unheimlich.Managers;
using Unheimlich.Features.DetectiveBoard.Data;
using Unheimlich.Features.DetectiveBoard;
namespace Unheimlich.Handlers.DetectiveBoard
namespace Unheimlich.Features.DetectiveBoard
{
/// <summary>
/// Generic trigger to unlock clues on the detective board.
@@ -1,11 +1,13 @@
using UnityEngine;
using Unheimlich.Core;
using Unheimlich.Data.CameraSettings;
using Unheimlich.Gameplay.Player;
using InputManager = Unheimlich.Managers.InputManager;
using Unheimlich.UI.DetectiveBoard;
using Unheimlich.World.CameraSystem;
using Unheimlich.Features.Player;
using Unheimlich.Features.OctoArms;
using InputManager = Unheimlich.Core.Input.InputManager;
using Unheimlich.Features.DetectiveBoard.UI;
using Unheimlich.Features.Dialogue.UI;
namespace Unheimlich.Gameplay.DetectiveBoard
namespace Unheimlich.Features.DetectiveBoard
{
/// <summary>
/// Controls player interaction with the detective board.
@@ -13,12 +15,14 @@ namespace Unheimlich.Gameplay.DetectiveBoard
public class DetectiveBoardController : Singleton<DetectiveBoardController>
{
[Header("Settings")]
[SerializeField] private CameraPanSettings _boardCameraPanSettings;
[SerializeField] private float _activationRange = 2f;
[SerializeField] private LayerMask _boardLayer;
[SerializeField] private CameraPanSettings _playerAlignmentSettings;
[Header("Virtual Camera")]
[SerializeField] private DetectiveBoardVirtualCamera _virtualCamera;
private bool _isBoardActive;
private CameraPanSettings _originalCameraPanSettings;
private CameraHeadBob _cameraHeadBob;
public bool IsBoardActive => _isBoardActive;
@@ -28,6 +32,12 @@ namespace Unheimlich.Gameplay.DetectiveBoard
_cameraHeadBob = FindFirstObjectByType<CameraHeadBob>();
}
void Start()
{
if(_virtualCamera == null)
_virtualCamera = DetectiveBoardVirtualCamera.Instance;
}
private void Update()
{
if (_isBoardActive)
@@ -75,9 +85,10 @@ namespace Unheimlich.Gameplay.DetectiveBoard
public void ActivateBoard()
{
if (_isBoardActive ||
PlayerController.Instance?.CameraPanController == null ||
PlayerController.Instance?.PlayerCamera == null ||
PlayerController.Instance?.CameraPanController == null ||
DetectiveBoardCanvas.Instance == null ||
_boardCameraPanSettings == null)
DetectiveBoardVirtualCamera.Instance == null)
{
Debug.LogError("[DetectiveBoardController] Missing required references!");
return;
@@ -85,38 +96,55 @@ namespace Unheimlich.Gameplay.DetectiveBoard
_isBoardActive = true;
// Disable OctoPlayer completely to prevent ANY input processing
if (PlayerController.Instance.Movement != null)
{
PlayerController.Instance.Movement.enabled = false;
}
var cameraPan = PlayerController.Instance.CameraPanController;
_originalCameraPanSettings = cameraPan.Settings;
cameraPan.Settings = _boardCameraPanSettings;
// Save state for return (before alignment)
cameraPan.SaveOriginalState();
// Align to target, then start pan AFTER alignment completes
cameraPan.AlignToTarget(DetectiveBoardCanvas.Instance.transform, () =>
OctoIkArmsImproved arms = PlayerController.Instance.GetComponentInChildren<OctoIkArmsImproved>();
if (arms != null)
{
// NOW start pan using the aligned rotation as base
cameraPan.StartPan();
});
arms.HideArms(3f);
}
InputManager.SetContext(InputManager.InputContext.Listening);
ApplyHeadBobSettings(_boardCameraPanSettings);
if (_cameraHeadBob != null)
{
_cameraHeadBob.SetMode(HeadBobMode.Disabled);
}
if (CrosshairController.Instance != null)
{
CrosshairController.Instance.Hide();
}
Cursor.lockState = CursorLockMode.None;
Cursor.visible = true;
var cameraPan = PlayerController.Instance.CameraPanController;
var originalSettings = cameraPan.Settings;
if (_playerAlignmentSettings != null)
cameraPan.Settings = _playerAlignmentSettings;
cameraPan.SaveOriginalState();
cameraPan.AlignToTarget(DetectiveBoardCanvas.Instance.transform, () =>
{
DetectiveBoardVirtualCamera.Instance.ActivateFromPlayerPosition(
PlayerController.Instance.PlayerCamera,
DetectiveBoardCanvas.Instance.transform,
DetectiveBoardCanvas.Instance.BoardRenderer
);
if (_playerAlignmentSettings != null)
cameraPan.Settings = originalSettings;
});
}
private void HandleBoardInteraction()
{
if (PlayerController.Instance?.CameraPanController != null)
{
PlayerController.Instance.CameraPanController.UpdatePan();
}
var exitAction = InputManager.GetExitAction();
if (exitAction != null && exitAction.WasPressedThisFrame())
{
@@ -126,22 +154,31 @@ namespace Unheimlich.Gameplay.DetectiveBoard
public void DeactivateBoard()
{
if (!_isBoardActive || PlayerController.Instance?.CameraPanController == null)
if (!_isBoardActive || DetectiveBoardVirtualCamera.Instance == null)
return;
_isBoardActive = false;
var cameraPan = PlayerController.Instance.CameraPanController;
cameraPan.StopPan();
cameraPan.ReturnToOriginalPosition(() =>
DetectiveBoardVirtualCamera.Instance.Deactivate(() =>
{
if (_originalCameraPanSettings != null)
var cameraPan = PlayerController.Instance?.CameraPanController;
if (cameraPan != null)
{
cameraPan.Settings = _originalCameraPanSettings;
OctoIkArmsImproved arms = PlayerController.Instance.GetComponentInChildren<OctoIkArmsImproved>();
if (arms != null)
{
arms.ShowArms(3f);
}
cameraPan.ReturnToOriginalPosition(() =>
{
if (PlayerController.Instance?.Movement != null)
{
PlayerController.Instance.Movement.enabled = true;
}
});
}
// Re-enable OctoPlayer AFTER the return animation completes
if (PlayerController.Instance?.Movement != null)
else if (PlayerController.Instance?.Movement != null)
{
PlayerController.Instance.Movement.enabled = true;
}
@@ -150,14 +187,14 @@ namespace Unheimlich.Gameplay.DetectiveBoard
InputManager.SetContext(InputManager.InputContext.Normal);
RestoreHeadBob();
}
private void ApplyHeadBobSettings(CameraPanSettings settings)
{
if (_cameraHeadBob == null || settings == null)
return;
_cameraHeadBob.SetMode(settings.HeadBobMode);
if (CrosshairController.Instance != null)
{
CrosshairController.Instance.Show();
}
Cursor.lockState = CursorLockMode.Locked;
Cursor.visible = false;
}
private void RestoreHeadBob()
@@ -1,9 +1,9 @@
using System.Collections.Generic;
using UnityEngine;
using Unheimlich.Core;
using Unheimlich.Data.DetectiveBoard;
using Unheimlich.Features.DetectiveBoard.Data;
namespace Unheimlich.Managers
namespace Unheimlich.Features.DetectiveBoard
{
/// <summary>
/// Manages the detective board state and clue unlocking system.
@@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: f422bd47f41542c4aa564d779e74f544
guid: 466fa804543e82c4483a22466a9bb484
folderAsset: yes
DefaultImporter:
externalObjects: {}
@@ -1,7 +1,7 @@
using UnityEngine;
using UnityEngine.UI;
namespace Unheimlich.UI.DetectiveBoard
namespace Unheimlich.Features.DetectiveBoard.UI
{
public enum LineColorState
{
@@ -1,7 +1,7 @@
using UnityEngine;
using Unheimlich.Managers;
using Unheimlich.Features.DetectiveBoard;
namespace Unheimlich.UI.DetectiveBoard
namespace Unheimlich.Features.DetectiveBoard.UI
{
/// <summary>
/// Renders a connection line between two clue nodes on the detective board.
@@ -2,12 +2,12 @@ using UnityEngine;
using UnityEngine.InputSystem;
using System.Collections.Generic;
using System.Linq;
using Unheimlich.Data.DetectiveBoard;
using Unheimlich.Managers;
using Unheimlich.Features.DetectiveBoard.Data;
using Unheimlich.Features.DetectiveBoard;
using Unheimlich.Core;
using Unheimlich.Gameplay.Player;
using Unheimlich.Features.Player;
namespace Unheimlich.UI.DetectiveBoard
namespace Unheimlich.Features.DetectiveBoard.UI
{
public class DetectiveBoardCanvas : Singleton<DetectiveBoardCanvas>
{
@@ -17,6 +17,7 @@ namespace Unheimlich.UI.DetectiveBoard
[Header("Layout References")]
[SerializeField] private RectTransform _boardArea;
[SerializeField] private Renderer _boardRenderer;
[Header("Auto-Placement Settings")]
[SerializeField] private float _leftMargin = 50f;
@@ -39,6 +40,7 @@ namespace Unheimlich.UI.DetectiveBoard
public bool IsConnectMode => _isConnectMode;
public RectTransform BoardArea => _boardArea;
public Renderer BoardRenderer => _boardRenderer;
public void OnLineClicked(ConnectionLine line)
{
@@ -1,12 +1,13 @@
using UnityEngine;
using UnityEngine.InputSystem;
using UnityEngine.UI;
using Unheimlich.Gameplay.DetectiveBoard;
using Unheimlich.Gameplay.Player;
using Unheimlich.Features.DetectiveBoard;
using Unheimlich.Features.Player;
using Unheimlich.World.CameraSystem;
using System.Collections.Generic;
using UnityEngine.EventSystems;
namespace Unheimlich.UI.DetectiveBoard
namespace Unheimlich.Features.DetectiveBoard.UI
{
/// <summary>
/// Handles mouse interaction for the detective board World Space canvas.
@@ -58,6 +59,7 @@ namespace Unheimlich.UI.DetectiveBoard
return;
}
UpdateCameraReference();
UpdateCanvasPlane();
if (_isDragging)
@@ -73,6 +75,22 @@ namespace Unheimlich.UI.DetectiveBoard
HandleClick();
}
private void UpdateCameraReference()
{
if (DetectiveBoardVirtualCamera.Instance != null && DetectiveBoardVirtualCamera.Instance.IsActive)
{
_camera = DetectiveBoardVirtualCamera.Instance.VirtualCamera;
}
else if (PlayerController.Instance != null)
{
_camera = PlayerController.Instance.PlayerCamera;
}
else if (_camera == null)
{
_camera = Camera.main;
}
}
private bool IsInBoardInteractionMode()
{
bool isActive = _boardController != null && _boardController.IsBoardActive;
@@ -1,9 +1,9 @@
using UnityEngine;
using UnityEngine.UI;
using TMPro;
using Unheimlich.Data.DetectiveBoard;
using Unheimlich.Features.DetectiveBoard.Data;
namespace Unheimlich.UI.DetectiveBoard
namespace Unheimlich.Features.DetectiveBoard.UI
{
public class PostItNode : MonoBehaviour
{
@@ -1,8 +1,8 @@
using UnityEngine;
using UnityEngine.UI;
using Unheimlich.Utility;
using Unheimlich.Core.Utils;
namespace Unheimlich.UI.DetectiveBoard
namespace Unheimlich.Features.DetectiveBoard.UI
{
public class PostItScribbleEffect : MonoBehaviour
{
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: bec178f6742a0e741973f0b0e91015ea
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 7d2498a28ae6dbe4e98260ebaf559261
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
@@ -1,6 +1,6 @@
using UnityEngine;
namespace Unheimlich.Data.Dialogues
namespace Unheimlich.Features.Dialogue.Data
{
/// <summary>
/// ScriptableObject configuration for dialogue choice spawn behavior and animations.
@@ -1,7 +1,7 @@
using UnityEngine;
using OctoCore.Localization;
namespace Unheimlich.Data.Dialogues
namespace Unheimlich.Features.Dialogue.Data
{
[System.Serializable]
public class DialogueChoiceData
@@ -2,7 +2,7 @@ using System.Collections.Generic;
using UnityEngine;
using OctoCore.Localization;
namespace Unheimlich.Data.Dialogues
namespace Unheimlich.Features.Dialogue.Data
{
[CreateAssetMenu(fileName = "NewConversation", menuName = "Unheimlich/Dialogue/Conversation")]
public class DialogueConversation : ScriptableObject
@@ -7,7 +7,7 @@ using UnityEditor;
using System.IO;
#endif
namespace Unheimlich.Data.Dialogues
namespace Unheimlich.Features.Dialogue.Data
{
public static class DialogueConversationBuilder
{

Some files were not shown because too many files have changed in this diff Show More