diff --git a/.idea/.idea.Infra/.idea/workspace.xml b/.idea/.idea.Infra/.idea/workspace.xml
index b03d540..17e91e2 100644
--- a/.idea/.idea.Infra/.idea/workspace.xml
+++ b/.idea/.idea.Infra/.idea/workspace.xml
@@ -5,27 +5,42 @@
-
-
-
-
-
+
+
+
+
+
+
+
+
+
-
-
+
+
+
+
-
+
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
@@ -37,11 +52,14 @@
+
+
+
{
"associatedIndex": 2
@@ -51,20 +69,28 @@
- {
+ "keyToString": {
+ "Attach to Unity Editor.Attach to Unity Editor.executor": "Debug",
+ "RunOnceActivity.ShowReadmeOnStart": "true",
+ "git-widget-placeholder": "NotLiminalPCG",
+ "node.js.detected.package.eslint": "true",
+ "node.js.detected.package.tslint": "true",
+ "node.js.selected.package.eslint": "(autodetect)",
+ "node.js.selected.package.tslint": "(autodetect)",
+ "nodejs_package_manager_path": "npm",
+ "vue.rearranger.settings.migration": "true"
}
-}]]>
+}
+
+
+
+
+
+
+
+
@@ -91,10 +117,10 @@
-
+
-
+
@@ -128,23 +155,4 @@
-
-
-
-
- file://$PROJECT_DIR$/Assets/Code/Infrastructure/UI/UIFactory.cs
- 61
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/Assets/AddressableAssetsData/AddressableAssetSettings.asset b/Assets/AddressableAssetsData/AddressableAssetSettings.asset
index 8de6c68..7fed698 100644
--- a/Assets/AddressableAssetsData/AddressableAssetSettings.asset
+++ b/Assets/AddressableAssetsData/AddressableAssetSettings.asset
@@ -15,7 +15,7 @@ MonoBehaviour:
m_DefaultGroup: d790534e015d692428ac5a9ce7d2ceb6
m_currentHash:
serializedVersion: 2
- Hash: eca7c51e7f74c0fc63e5a8f984ad695f
+ Hash: 4373fbbf872dd1eb6fe127578e4c83de
m_OptimizeCatalogSize: 0
m_BuildRemoteCatalog: 0
m_CatalogRequestsTimeout: 0
@@ -103,6 +103,7 @@ MonoBehaviour:
- SceneConfig
- CameraConfig
- UIPanelConfig
+ - PostProccessVolume
m_SchemaTemplates: []
m_GroupTemplateObjects:
- {fileID: 11400000, guid: af0b5782a0090884db056705d7776701, type: 2}
diff --git a/Assets/AddressableAssetsData/AssetGroups/Default Local Group.asset b/Assets/AddressableAssetsData/AssetGroups/Default Local Group.asset
index 681d7c9..7187e47 100644
--- a/Assets/AddressableAssetsData/AssetGroups/Default Local Group.asset
+++ b/Assets/AddressableAssetsData/AssetGroups/Default Local Group.asset
@@ -25,6 +25,12 @@ MonoBehaviour:
m_ReadOnly: 0
m_SerializedLabels: []
FlaggedDuringContentUpdateRestriction: 0
+ - m_GUID: 30778c5a4d5c3f74bac4e5340344cdad
+ m_Address: Assets/Resources_moved/Configs/Volumes/MenuRetro.asset
+ m_ReadOnly: 0
+ m_SerializedLabels:
+ - PostProccessVolume
+ FlaggedDuringContentUpdateRestriction: 0
- m_GUID: 4a97987e3a94e0f43b1b57b6ddccac23
m_Address: Assets/Resources_moved/Configs/Camera/CameraSettingsConfig.asset
m_ReadOnly: 0
@@ -47,6 +53,11 @@ MonoBehaviour:
m_ReadOnly: 0
m_SerializedLabels: []
FlaggedDuringContentUpdateRestriction: 0
+ - m_GUID: ab3f2ccf1b11afd4a81cb222d4e4bc16
+ m_Address: Assets/Resources_moved/Volumes/MenuRetro.prefab
+ m_ReadOnly: 0
+ m_SerializedLabels: []
+ FlaggedDuringContentUpdateRestriction: 0
- m_GUID: becf493a34b841e4d8ea927261a05e9b
m_Address: Camera/Camera
m_ReadOnly: 0
diff --git a/Assets/AddressableAssetsData/ProfileDataSourceSettings.asset b/Assets/AddressableAssetsData/ProfileDataSourceSettings.asset
new file mode 100644
index 0000000..b674867
--- /dev/null
+++ b/Assets/AddressableAssetsData/ProfileDataSourceSettings.asset
@@ -0,0 +1,28 @@
+%YAML 1.1
+%TAG !u! tag:unity3d.com,2011:
+--- !u!114 &11400000
+MonoBehaviour:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 0}
+ m_Enabled: 1
+ m_EditorHideFlags: 0
+ m_Script: {fileID: 11500000, guid: 7e3976da977cb49238499ea3b4c237ae, type: 3}
+ m_Name: ProfileDataSourceSettings
+ m_EditorClassIdentifier: Unity.Addressables.Editor::UnityEditor.AddressableAssets.Settings.ProfileDataSourceSettings
+ profileGroupTypes:
+ - m_GroupTypePrefix: Built-In
+ m_Variables:
+ - m_Suffix: BuildPath
+ m_Value: '[UnityEngine.AddressableAssets.Addressables.BuildPath]/[BuildTarget]'
+ - m_Suffix: LoadPath
+ m_Value: '{UnityEngine.AddressableAssets.Addressables.RuntimePath}/[BuildTarget]'
+ environments: []
+ currentEnvironment:
+ id:
+ projectId:
+ projectGenesisId:
+ name:
+ isDefault: 0
diff --git a/Assets/AddressableAssetsData/ProfileDataSourceSettings.asset.meta b/Assets/AddressableAssetsData/ProfileDataSourceSettings.asset.meta
new file mode 100644
index 0000000..006ec8f
--- /dev/null
+++ b/Assets/AddressableAssetsData/ProfileDataSourceSettings.asset.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: a5b15ef261c372546828bde22c50fbb3
+NativeFormatImporter:
+ externalObjects: {}
+ mainObjectFileID: 11400000
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/AddressableAssetsData/Windows.meta b/Assets/AddressableAssetsData/Windows.meta
new file mode 100644
index 0000000..2261ace
--- /dev/null
+++ b/Assets/AddressableAssetsData/Windows.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: 5fd003c2e081890428485bfb959fa404
+folderAsset: yes
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Code/Infrastructure/App/PapaInstaller.cs b/Assets/Code/Infrastructure/App/PapaInstaller.cs
index d4747d3..bf219c3 100644
--- a/Assets/Code/Infrastructure/App/PapaInstaller.cs
+++ b/Assets/Code/Infrastructure/App/PapaInstaller.cs
@@ -1,75 +1,101 @@
+using System;
using Code.Infrastructure.Camera;
using Code.Infrastructure.Configs;
using Code.Infrastructure.Input;
using Code.Infrastructure.Loadings;
using Code.Infrastructure.SceneLoader;
using Code.Infrastructure.UI;
+using Code.Infrastructure.Volume;
using Reflex.Core;
using Reflex.Enums;
using UnityEngine;
+using UnityEngine.Rendering.Universal;
using Resolution = Reflex.Enums.Resolution;
namespace Code.Infrastructure.App
{
- public class PapaInstaller : MonoBehaviour, IInstaller,
+ public class PapaInstaller : MonoBehaviour, IInstaller,
ISceneConfigsLoadedHandle,
IInputServiceInitializedHandle,
ICameraInitializedHandle,
IUIInitializedHandle,
- IUIPanelLoaded
+ IUIPanelLoaded,
+ IVolumesInitializedHandle,
+ IVolumeLoaded
{
public void InstallBindings(ContainerBuilder containerBuilder)
{
containerBuilder.RegisterType(typeof(EventBus.EventBus), Lifetime.Singleton, Resolution.Eager);
- containerBuilder.RegisterType(typeof(ConfigLocator), new[] { typeof(IConfigLocator) }, Lifetime.Singleton, Resolution.Eager);
+ containerBuilder.RegisterType(typeof(ConfigLocator), new[] { typeof(IConfigLocator) }, Lifetime.Singleton,
+ Resolution.Eager);
containerBuilder.RegisterType(typeof(SceneLoader.SceneLoader), Lifetime.Singleton, Resolution.Eager);
- containerBuilder.RegisterType(typeof(InputService),new[] { typeof(IInputService) }, Lifetime.Singleton, Resolution.Eager);
-
+ containerBuilder.RegisterType(typeof(InputService), new[] { typeof(IInputService) }, Lifetime.Singleton,
+ Resolution.Eager);
+
containerBuilder.OnContainerBuilt += Bootstrap;
-
- containerBuilder.RegisterType(typeof(AppStateMachine), Lifetime.Singleton, Resolution.Lazy);
- containerBuilder.RegisterType(typeof(AppStateMachineContext), Lifetime.Singleton, Resolution.Lazy);
-
- containerBuilder.RegisterType(typeof(CameraFactory), Lifetime.Singleton, Resolution.Lazy);
- containerBuilder.RegisterType(typeof(CameraStateMachine), Lifetime.Singleton, Resolution.Lazy);
- containerBuilder.RegisterType(typeof(CameraStateMachineContext), Lifetime.Singleton, Resolution.Lazy);
-
- containerBuilder.RegisterType(typeof(UIFactory), new []{typeof(IUIFactory)}, Lifetime.Singleton, Resolution.Eager);
- containerBuilder.RegisterType(typeof(UIService), new []{typeof(IUIService)}, Lifetime.Singleton, Resolution.Eager);
-
+
+ containerBuilder.RegisterType(typeof(AppStateMachine), Lifetime.Singleton, Resolution.Lazy);
+ containerBuilder.RegisterType(typeof(AppStateMachineContext), Lifetime.Singleton, Resolution.Lazy);
+
+ containerBuilder.RegisterType(typeof(CameraFactory), Lifetime.Singleton, Resolution.Lazy);
+ containerBuilder.RegisterType(typeof(CameraStateMachine), Lifetime.Singleton, Resolution.Lazy);
+ containerBuilder.RegisterType(typeof(CameraStateMachineContext), Lifetime.Singleton, Resolution.Lazy);
+
+ containerBuilder.RegisterType(typeof(UIFactory), new[] { typeof(IUIFactory) }, Lifetime.Singleton,
+ Resolution.Eager);
+ containerBuilder.RegisterType(typeof(UIService), new[] { typeof(IUIService) }, Lifetime.Singleton,
+ Resolution.Eager);
+
+ containerBuilder.RegisterType(typeof(VolumeService), new[] { typeof(IVolumeService) }, Lifetime.Singleton,
+ Resolution.Lazy);
+ containerBuilder.RegisterType(typeof(VolumeFactory), new[] { typeof(IVolumeFactory) }, Lifetime.Singleton,
+ Resolution.Eager);
+
// UIFactory
// Logo
// Scene configs
// Input service
// Camera
- _initialLoading = new Loading(5, () => EssentialLoadEnded(_thatRightContainer));
+ // Volume Factory
+ // Loading volume
+ _initialLoading = new Loading(7, () => EssentialLoadEnded(_thatRightContainer));
+ _ui2CamLoading = new Loading(2,
+ () =>
+ {
+ _thatRightContainer.Resolve().SetCanvasCamera(_thatRightContainer
+ .Resolve().cameraLoadedData.Camera);
+
+ });
}
-
+
private Loading _initialLoading;
+ private Loading _ui2CamLoading;
private Container _thatRightContainer;
+
private void Bootstrap(Container container)
{
_thatRightContainer = container;
-
+
container.Resolve().Subscribe(this);
-
- container.Resolve().CreateCameraStateMachine(container.Resolve()).Forget();
-
+
+ container.Resolve().CreateCameraStateMachine(container.Resolve())
+ .Forget();
}
private void EssentialLoadEnded(Container container)
{
container.Resolve().Unsubscribe(this);
- container.Resolve().SwitchState(AppStates.Bootstrap).AllowStateTransition(AppStates.Gameplay);
+ container.Resolve().SwitchState(AppStates.Bootstrap)
+ .AllowStateTransition(AppStates.Gameplay);
}
public void SceneConfigsLoaded()
- {
+ {
_initialLoading.DoProgress();
}
public void InputServiceInitialized()
- {
+ {
_initialLoading.DoProgress();
}
@@ -77,34 +103,59 @@ namespace Code.Infrastructure.App
{
_thatRightContainer.Resolve().cameraLoadedData = data;
_thatRightContainer.Resolve().SwitchState(CameraMode.None)
- .AllowStateTransition(CameraMode.FirstPerson);
-
+ .AllowStateTransition(CameraMode.FirstPerson);
+
+ data.Camera.GetUniversalAdditionalCameraData().renderPostProcessing = true;
+
+ _ui2CamLoading.DoProgress();
_initialLoading.DoProgress();
}
public void UIInitialized()
{
+ _ui2CamLoading.DoProgress();
_initialLoading.DoProgress();
-
+
_thatRightContainer.Resolve().TryLoadPanel(UIPanelType.Logo);
_thatRightContainer.Resolve().TryLoadPanel(UIPanelType.Loading);
}
public void UILoaded(UIPanelType uiPanelType)
{
- if (_initialLoading.Completed) return;
-
switch (uiPanelType)
{
case UIPanelType.Logo:
_thatRightContainer.Resolve().OpenPanel(UIPanelType.Logo);
-
+
_initialLoading.DoProgress();
break;
case UIPanelType.Loading:
// _thatRightContainer.Resolve().OpenPanel(UIPanelType.Logo);
break;
+ default:
+ Application.Quit();
+ break;
}
}
- }
+
+ public void VolumesInitialized()
+ {
+ _initialLoading.DoProgress();
+
+ _thatRightContainer.Resolve().TryLoadVolume(VolumeId.MenuRetro);
+ }
+
+ public void VolumeLoaded(VolumeId volumeId)
+ {
+ switch (volumeId)
+ {
+ case VolumeId.MenuRetro:
+ _initialLoading.DoProgress();
+ break;
+ default:
+ Application.Quit();
+ break;
+ }
+ }
+ }
}
\ No newline at end of file
diff --git a/Assets/Code/Infrastructure/Generators/ConfigGenerator.cs b/Assets/Code/Infrastructure/Generators/ConfigGenerator.cs
index ef22d79..37cc2aa 100644
--- a/Assets/Code/Infrastructure/Generators/ConfigGenerator.cs
+++ b/Assets/Code/Infrastructure/Generators/ConfigGenerator.cs
@@ -1,3 +1,4 @@
+#if UNITY_EDITOR
using System.Linq;
using Unity.VisualScripting;
using UnityCodeGen;
@@ -106,4 +107,5 @@ public class {cfg.Name}Config : ScriptableObject
context.AddCode($"SystemConfigsReferences.Generated.cs", configOfConfigsCode);
}
}
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/Assets/Code/Infrastructure/Generators/SceneLoaderGenerator.cs b/Assets/Code/Infrastructure/Generators/SceneLoaderGenerator.cs
index 3b4cd1e..44f9843 100644
--- a/Assets/Code/Infrastructure/Generators/SceneLoaderGenerator.cs
+++ b/Assets/Code/Infrastructure/Generators/SceneLoaderGenerator.cs
@@ -1,5 +1,4 @@
-using System.Linq;
-using Unity.VisualScripting;
+#if UNITY_EDITOR
using UnityCodeGen;
using UnityEditor;
using UnityEngine;
@@ -145,4 +144,5 @@ partial void SetupScenesInfo(){{
// context.AddCode($"SystemConfigsReferences.Generated.cs", configOfConfigsCode);
}
}
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/Assets/Code/Infrastructure/Generators/StateMachineGenerator.cs b/Assets/Code/Infrastructure/Generators/StateMachineGenerator.cs
index aa9fcf9..648b56b 100644
--- a/Assets/Code/Infrastructure/Generators/StateMachineGenerator.cs
+++ b/Assets/Code/Infrastructure/Generators/StateMachineGenerator.cs
@@ -1,3 +1,4 @@
+#if UNITY_EDITOR
using System.Linq;
using Unity.VisualScripting;
using UnityCodeGen;
@@ -128,4 +129,5 @@ namespace {st.Namespace}
}
}
}
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/Assets/Code/Infrastructure/Loadings/Loading.cs b/Assets/Code/Infrastructure/Loadings/Loading.cs
index da0eb5f..1991beb 100644
--- a/Assets/Code/Infrastructure/Loadings/Loading.cs
+++ b/Assets/Code/Infrastructure/Loadings/Loading.cs
@@ -1,4 +1,5 @@
-using System;
+using System;
+using UnityEngine;
namespace Code.Infrastructure.Loadings
{
diff --git a/Assets/Code/Infrastructure/UI/Panels/LogoPanel.cs b/Assets/Code/Infrastructure/UI/Panels/LogoPanel.cs
index 9bff46d..c46ef2a 100644
--- a/Assets/Code/Infrastructure/UI/Panels/LogoPanel.cs
+++ b/Assets/Code/Infrastructure/UI/Panels/LogoPanel.cs
@@ -1,16 +1,22 @@
+using DG.Tweening;
using UnityEngine;
+using UnityEngine.UI;
namespace Code.Infrastructure.UI.Panels
{
public class LogoPanel : UIPanel
- {
+ {
+ [SerializeField] private Image image;
+ [SerializeField] private Color shownColor;
+ [SerializeField] private Color hiddenColor;
public override void Open()
- {
- Debug.Log("Logo panel opened");
+ {
+ image.DOColor(shownColor, 1f);
}
public override void Close()
{
+ image.DOColor(hiddenColor, 1f);
}
}
}
\ No newline at end of file
diff --git a/Assets/Code/Infrastructure/UI/UIFactory.cs b/Assets/Code/Infrastructure/UI/UIFactory.cs
index c97581f..79640e5 100644
--- a/Assets/Code/Infrastructure/UI/UIFactory.cs
+++ b/Assets/Code/Infrastructure/UI/UIFactory.cs
@@ -14,6 +14,7 @@ namespace Code.Infrastructure.UI
{
UniTaskVoid LoadPanel(UIPanelType panelType);
void ReleasePanel(UIPanel panel);
+ Canvas Canvas { get; }
}
public class UIFactory : IDisposable, IUIFactory
@@ -26,8 +27,11 @@ namespace Code.Infrastructure.UI
private AsyncOperationHandle> _configsHandle;
private AsyncOperationHandle _canvasSettingsHandle;
private CanvasSettingsConfig _canvasConfig;
+
private GameObject _canvas;
+ public Canvas Canvas { get; private set; }
+
public UIFactory(IConfigLocator configLocator, EventBus.EventBus eventBus)
{
_eventBus = eventBus;
@@ -63,6 +67,8 @@ namespace Code.Infrastructure.UI
_canvas = await Addressables.InstantiateAsync(_canvasConfig.Prefab).ToUniTask();
UnityEngine.Object.DontDestroyOnLoad(_canvas);
+
+ Canvas = _canvas.GetComponent