Compare commits
8
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
98e4a055fe | ||
|
|
4ecafef8ee | ||
|
|
a7872a0f8c | ||
|
|
653342d080 | ||
|
|
93819c1dd3 | ||
|
|
28125eb382 | ||
|
|
63c3549673 | ||
|
|
9f026b76d6 |
No files matched your search
Generated
+57
-95
@@ -5,51 +5,48 @@
|
||||
</component>
|
||||
<component name="ChangeListManager">
|
||||
<list default="true" id="7a4e4e1b-6c5f-4c8d-968e-512e90aa8c7c" name="Changes" comment="">
|
||||
<change afterPath="$PROJECT_DIR$/Assets/Code/Example/Race/Racer/AI/AICarDriver.cs" afterDir="false" />
|
||||
<change afterPath="$PROJECT_DIR$/Assets/Code/Example/Race/Racer/AI/AICarDriver.cs.meta" afterDir="false" />
|
||||
<change afterPath="$PROJECT_DIR$/Assets/Code/Example/Race/Racer/Player/PlayerRBCarController.cs" afterDir="false" />
|
||||
<change afterPath="$PROJECT_DIR$/Assets/Code/Example/Race/Racer/Player/PlayerRBCarController.cs.meta" afterDir="false" />
|
||||
<change afterPath="$PROJECT_DIR$/Assets/Code/Example/Race/UI/WinScreen.cs" afterDir="false" />
|
||||
<change afterPath="$PROJECT_DIR$/Assets/Code/Example/Race/UI/WinScreen.cs.meta" afterDir="false" />
|
||||
<change afterPath="$PROJECT_DIR$/Assets/Code/Example/Platformer/Entity/PlatformerPlayerFactory.cs" afterDir="false" />
|
||||
<change afterPath="$PROJECT_DIR$/Assets/Code/Example/Platformer/Entity/PlatformerPlayerFactory.cs.meta" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/.idea/.idea.Infra/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/.idea.Infra/.idea/workspace.xml" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/Assets/AddressableAssetsData/AddressableAssetSettings.asset" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/AddressableAssetsData/AddressableAssetSettings.asset" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/Assets/AddressableAssetsData/AssetGroups/Default Local Group.asset" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/AddressableAssetsData/AssetGroups/Default Local Group.asset" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/Assets/Code/Debug/SceneChooser.cs" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/Code/Debug/SceneChooser.cs" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/Assets/Code/Example/Race/RaceGame.cs" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/Code/Example/Race/RaceGame.cs" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/Assets/Code/Example/Race/RaceScores.cs" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/Code/Example/Race/RaceScores.cs" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/Assets/Code/Example/Race/Racer/AI/AIRacerID.cs" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/Code/Example/Race/Racer/AI/AIRacerID.cs" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/Assets/Code/Example/Race/Racer/AI/ID/Agent.cs" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/Code/Example/Race/Racer/AI/ID/Agent.cs" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/Assets/Code/Example/Race/Racer/AI/ID/Behaviours/Seek.cs" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/Code/Example/Race/Racer/AI/ID/Behaviours/Seek.cs" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/Assets/Code/Example/Race/Racer/Player/PlayerCarControllerRB.cs" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/Code/Example/Race/Racer/CarControllerRB.cs" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/Assets/Code/Example/Race/Racer/Player/PlayerCarControllerRB.cs.meta" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/Code/Example/Race/Racer/CarControllerRB.cs.meta" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/Assets/Code/Example/Race/Racer/Player/PlayerRacer.cs" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/Code/Example/Race/Racer/Player/PlayerRacer.cs" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/Assets/Code/Example/Race/Racer/Racer.cs" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/Code/Example/Race/Racer/Racer.cs" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/Assets/Code/Example/Race/Racer/RacerFactory.cs" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/Code/Example/Race/Racer/RacerFactory.cs" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/Assets/Code/Example/Race/Track/CheckPoint.cs" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/Code/Example/Race/Track/CheckPoint.cs" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/Assets/Code/Example/Race/Track/RaceTrackData.cs" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/Code/Example/Race/Track/RaceTrackData.cs" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/Assets/Code/Example/Race/UI/PlayerScoreCounter.cs" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/Code/Example/Race/UI/PlayerScoreCounter.cs" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/Assets/Code/Infrastructure/App/AppStateMachine.cs" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/Code/Infrastructure/App/AppStateMachine.cs" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/Assets/Code/Infrastructure/App/PapaInstaller.cs" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/Code/Infrastructure/App/PapaInstaller.cs" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/Assets/Code/Infrastructure/App/SceneInstallers/GameplaySceneInstaller.cs" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/Code/Infrastructure/App/SceneInstallers/GameplaySceneInstaller.cs" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/Assets/Code/Infrastructure/App/States/BootstrapState.cs" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/Code/Infrastructure/App/States/BootstrapState.cs" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/Assets/Code/Infrastructure/App/States/GameplayState.cs" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/Code/Infrastructure/App/States/GameplayState.cs" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/Assets/Code/Infrastructure/App/States/MainMenuState.cs" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/Code/Infrastructure/App/States/MainMenuState.cs" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/Assets/Code/Infrastructure/Audio/AudioFactory.cs" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/Code/Infrastructure/Audio/AudioFactory.cs" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/Assets/Code/Infrastructure/SceneLoader/SceneLoader.cs" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/Code/Infrastructure/SceneLoader/SceneLoader.cs" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/Assets/Code/Infrastructure/UI/Panels/DamnEmptyPanel.cs" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/Code/Infrastructure/UI/Panels/DamnEmptyPanel.cs" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/Assets/Code/Infrastructure/UI/Panels/MenuChoosePanel.cs" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/Code/Infrastructure/UI/Panels/MenuChoosePanel.cs" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/Assets/Code/Infrastructure/UI/UIFactory.cs" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/Code/Infrastructure/UI/UIFactory.cs" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/Assets/Code/Infrastructure/UI/UIPanelType.cs" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/Code/Infrastructure/UI/UIPanelType.cs" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/Assets/Code/Infrastructure/UI/UIService.cs" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/Code/Infrastructure/UI/UIService.cs" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/Assets/Resources/Example/Misc/Point.prefab" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/Resources/Example/Misc/Point.prefab" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/Assets/Code/Example/Platformer/Entity/PlatformerEntitySettings.cs" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/Code/Example/Platformer/Entity/PlatformerEntitySettings.cs" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/Assets/Code/Example/Platformer/Entity/PlayerEntity.cs" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/Code/Example/Platformer/Entity/PlayerEntity.cs" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/Assets/Code/Example/Platformer/PlatformerSceneInstaller.cs" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/Code/Example/Platformer/PlatformerSceneInstaller.cs" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/Assets/Code/Example/Platformer/PlatformerState.cs" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/Code/Example/Platformer/PlatformerState.cs" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/Assets/Code/Infrastructure/Generators/Attributes.cs" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/Code/Infrastructure/Generators/Attributes.cs" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/Assets/Code/Infrastructure/Generators/ConfigGenerator.cs" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/Code/Infrastructure/Generators/ConfigGenerator.cs" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/Assets/Resources/Example/Platformer/Characters/Player/Player.prefab" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/Assets/Resources/Example/Platformer/Characters/Player/Player.prefab.meta" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/Assets/Resources/SystemConfigsReferences.asset" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/Resources/SystemConfigsReferences.asset" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/Assets/Resources/UI/Fonts/Bebas Neue Cyrillic SDF.asset" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/Resources/UI/Fonts/Bebas Neue Cyrillic SDF.asset" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/Assets/Resources_moved/Example/Race/Configs/AIGreen.asset" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/Resources_moved/Example/Race/Configs/AIGreen.asset" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/Assets/Resources_moved/Example/Race/Configs/AIRed.asset" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/Resources_moved/Example/Race/Configs/AIRed.asset" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/Assets/Resources_moved/Example/Race/PlayerCounter.prefab" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/Resources_moved/Example/Race/PlayerCounter.prefab" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/Assets/Resources_moved/Example/Race/PlayerRacist.prefab" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/Resources_moved/Example/Race/PlayerRacist.prefab" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/Assets/Resources_moved/Example/Race/Racist (1).prefab" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/Resources_moved/Example/Race/Racist (1).prefab" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/Assets/Resources_moved/UI/Panels/SceneSelectPanel.prefab" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/Resources_moved/UI/Panels/SceneSelectPanel.prefab" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/Assets/Scenes/Gameplay.unity" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/Scenes/Gameplay.unity" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/Assets/Scenes/MainMenu.unity" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/Scenes/MainMenu.unity" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/Assets/Resources_moved/Example/Platformer/Bee.prefab" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/Assets/Resources_moved/Example/Platformer/Bee.prefab.meta" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/Assets/Resources_moved/Example/Platformer/Boar.prefab" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/Assets/Resources_moved/Example/Platformer/Boar.prefab.meta" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/Assets/Resources_moved/Example/Platformer/Cinemachine2DFollower.prefab" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/Resources_moved/Example/Platformer/Cinemachine2DFollower.prefab" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/Assets/Resources_moved/Example/Platformer/Configs/Enemies/Bee.asset" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/Resources_moved/Example/Platformer/Configs/Enemies/Bee.asset" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/Assets/Resources_moved/Example/Platformer/Configs/Enemies/Boar.asset" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/Resources_moved/Example/Platformer/Configs/Enemies/Boar.asset" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/Assets/Resources_moved/Example/Platformer/Configs/Enemies/Snail.asset" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/Resources_moved/Example/Platformer/Configs/Enemies/Snail.asset" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/Assets/Resources_moved/Example/Platformer/Platformer.unity" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/Resources_moved/Example/Platformer/Platformer.unity" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/Assets/Resources_moved/Example/Platformer/Snail.prefab" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/Assets/Resources_moved/Example/Platformer/Snail.prefab.meta" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/Assets/UnityCodeGen.Generated/AudioInfoConfig.Generated.cs" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/UnityCodeGen.Generated/AudioInfoConfig.Generated.cs" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/Assets/UnityCodeGen.Generated/AudioSourcePrefabConfig.Generated.cs" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/UnityCodeGen.Generated/AudioSourcePrefabConfig.Generated.cs" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/Assets/UnityCodeGen.Generated/AudioSourceSettingsConfig.Generated.cs" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/UnityCodeGen.Generated/AudioSourceSettingsConfig.Generated.cs" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/Assets/UnityCodeGen.Generated/CameraSettingsConfig.Generated.cs" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/UnityCodeGen.Generated/CameraSettingsConfig.Generated.cs" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/Assets/UnityCodeGen.Generated/CanvasSettingsConfig.Generated.cs" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/UnityCodeGen.Generated/CanvasSettingsConfig.Generated.cs" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/Assets/UnityCodeGen.Generated/ConfigLocator.Generated.cs" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/UnityCodeGen.Generated/ConfigLocator.Generated.cs" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/Assets/UnityCodeGen.Generated/GameCameraConfig.Generated.cs" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/UnityCodeGen.Generated/GameCameraConfig.Generated.cs" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/Assets/UnityCodeGen.Generated/InputServiceConfig.Generated.cs" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/UnityCodeGen.Generated/InputServiceConfig.Generated.cs" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/Assets/UnityCodeGen.Generated/LayerMasksConfigConfig.Generated.cs" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/UnityCodeGen.Generated/LayerMasksConfigConfig.Generated.cs" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/Assets/UnityCodeGen.Generated/PlatformerEntitySettingsConfig.Generated.cs" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/UnityCodeGen.Generated/PlatformerEntitySettingsConfig.Generated.cs" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/Assets/UnityCodeGen.Generated/PlatformerPlayerSettingsConfig.Generated.cs" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/UnityCodeGen.Generated/PlatformerPlayerSettingsConfig.Generated.cs" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/Assets/UnityCodeGen.Generated/RacerSettingsConfig.Generated.cs" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/UnityCodeGen.Generated/RacerSettingsConfig.Generated.cs" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/Assets/UnityCodeGen.Generated/SceneInfoConfig.Generated.cs" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/UnityCodeGen.Generated/SceneInfoConfig.Generated.cs" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/Assets/UnityCodeGen.Generated/SystemConfigsReferences.Generated.cs" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/UnityCodeGen.Generated/SystemConfigsReferences.Generated.cs" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/Assets/UnityCodeGen.Generated/UIPanelSettingsConfig.Generated.cs" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/UnityCodeGen.Generated/UIPanelSettingsConfig.Generated.cs" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/Assets/UnityCodeGen.Generated/VolumeSettingsConfig.Generated.cs" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/UnityCodeGen.Generated/VolumeSettingsConfig.Generated.cs" afterDir="false" />
|
||||
</list>
|
||||
<option name="SHOW_DIALOG" value="false" />
|
||||
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
||||
@@ -60,12 +57,11 @@
|
||||
<option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
|
||||
</component>
|
||||
<component name="HighlightingSettingsPerFile">
|
||||
<setting file="file://$PROJECT_DIR$/Assets/Code/Example/Race/PlayerPrefsRacePoopshitter.cs" root0="FORCE_HIGHLIGHTING" />
|
||||
<setting file="file://$PROJECT_DIR$/Assets/Code/Infrastructure/Audio/AudioFactory.cs" root0="FORCE_HIGHLIGHTING" />
|
||||
<setting file="file://$PROJECT_DIR$/Library/PackageCache/com.cysharp.unitask@a85b92a8e443/Runtime/UniTaskScheduler.cs" root0="SKIP_HIGHLIGHTING" />
|
||||
<setting file="file://C:/TEMP/SourceGeneratedDocuments/1A3209B82D230FF4FE3E50D7/InfraGens/Code.Infrastructure.Generators.SceneLoaderGenerator/SceneLoader.Generated.g.cs" root0="FORCE_HIGHLIGHTING" />
|
||||
<setting file="file://C:/TEMP/SourceGeneratedDocuments/1A3209B82D230FF4FE3E50D7/InfraGens/StateMachineGenerator/Code.Infrastructure.App.AppStateMachine.StateMachine.Generated.cs" root0="FORCE_HIGHLIGHTING" />
|
||||
<setting file="file://C:/TEMP/SourceGeneratedDocuments/1A3209B82D230FF4FE3E50D7/InfraGens/StateMachineGenerator/Code.Infrastructure.App.States.BootstrapState.State.Generated.cs" root0="FORCE_HIGHLIGHTING" />
|
||||
<setting file="file://C:/TEMP/SourceGeneratedDocuments/1A3209B82D230FF4FE3E50D7/InfraGens/StateMachineGenerator/Code.Infrastructure.Camera.CameraStateMachine.StateMachine.Generated.cs" root0="FORCE_HIGHLIGHTING" />
|
||||
<setting file="file://$PROJECT_DIR$/Library/PackageCache/com.gustavopsantos.reflex@fabfbc86f712/Generics/DisposableCollection.cs" root0="SKIP_HIGHLIGHTING" />
|
||||
<setting file="file://$PROJECT_DIR$/Library/PackageCache/com.gustavopsantos.reflex@fabfbc86f712/Injectors/MethodInjector.cs" root0="SKIP_HIGHLIGHTING" />
|
||||
<setting file="file://$APPLICATION_CONFIG_DIR$/resharper-host/DecompilerCache/decompiler/1eb9db207454431c84a47bcd81e79c3746ae00/50/ee0759d6/Dictionary`2.cs" root0="FORCE_HIGHLIGHTING" />
|
||||
<setting file="file://$APPLICATION_CONFIG_DIR$/resharper-host/DecompilerCache/decompiler/493b407efcb64dddad59f28bb0b831d3212400/94/af20347f/Object.cs" root0="FORCE_HIGHLIGHTING" />
|
||||
</component>
|
||||
@@ -100,7 +96,7 @@
|
||||
<method v="2" />
|
||||
</configuration>
|
||||
<configuration name="Start Unity" type="RunUnityExe" factoryName="Unity Executable">
|
||||
<option name="EXE_PATH" value="C:\Program Files\Unity\Hub\Editor\6000.3.5f2\Editor\Unity.exe" />
|
||||
<option name="EXE_PATH" value="C:\Program Files\Unity\Hub\Editor\6000.3.10f1\Editor\Unity.exe" />
|
||||
<option name="PROGRAM_PARAMETERS" value="-projectPath A:\Projects\Infra -debugCodeOptimization" />
|
||||
<option name="WORKING_DIRECTORY" value="A:\Projects\Infra" />
|
||||
<option name="PASS_PARENT_ENVS" value="1" />
|
||||
@@ -108,7 +104,7 @@
|
||||
<method v="2" />
|
||||
</configuration>
|
||||
<configuration name="Unit Tests (batch mode)" type="RunUnityExe" factoryName="Unity Executable">
|
||||
<option name="EXE_PATH" value="C:\Program Files\Unity\Hub\Editor\6000.3.5f2\Editor\Unity.exe" />
|
||||
<option name="EXE_PATH" value="C:\Program Files\Unity\Hub\Editor\6000.3.10f1\Editor\Unity.exe" />
|
||||
<option name="PROGRAM_PARAMETERS" value="-runTests -batchmode -projectPath A:\Projects\Infra -testResults Logs/results.xml -logFile Logs/Editor.log -testPlatform EditMode -debugCodeOptimization" />
|
||||
<option name="WORKING_DIRECTORY" value="A:\Projects\Infra" />
|
||||
<option name="PASS_PARENT_ENVS" value="1" />
|
||||
@@ -125,10 +121,10 @@
|
||||
</option>
|
||||
<method v="2" />
|
||||
</configuration>
|
||||
<configuration name="Attach to Unity Editor" type="UNITY_DEBUG_RUN_CONFIGURATION" factoryName="Unity Debug" show_console_on_std_err="false" show_console_on_std_out="false" port="50000" address="localhost" ignored-value-for-modified-check="6116">
|
||||
<configuration name="Attach to Unity Editor" type="UNITY_DEBUG_RUN_CONFIGURATION" factoryName="Unity Debug" show_console_on_std_err="false" show_console_on_std_out="false" port="50000" address="localhost" ignored-value-for-modified-check="3836">
|
||||
<option name="allowRunningInParallel" value="false" />
|
||||
<option name="listenPortForConnections" value="false" />
|
||||
<option name="pid" value="6116" />
|
||||
<option name="pid" value="3836" />
|
||||
<option name="projectPathOnTarget" />
|
||||
<option name="selectedOptions">
|
||||
<list />
|
||||
@@ -154,6 +150,11 @@
|
||||
<workItem from="1770407896165" duration="404000" />
|
||||
<workItem from="1770451319773" duration="10815000" />
|
||||
<workItem from="1770634886406" duration="8191000" />
|
||||
<workItem from="1771758321259" duration="9067000" />
|
||||
<workItem from="1772187561867" duration="2127000" />
|
||||
<workItem from="1773044760422" duration="3994000" />
|
||||
<workItem from="1773048811603" duration="11294000" />
|
||||
<workItem from="1773135989680" duration="4838000" />
|
||||
</task>
|
||||
<servers />
|
||||
</component>
|
||||
@@ -174,56 +175,17 @@
|
||||
<breakpoint-manager>
|
||||
<breakpoints>
|
||||
<line-breakpoint enabled="true" type="DotNet Breakpoints">
|
||||
<url>file://$PROJECT_DIR$/Assets/Code/Infrastructure/App/States/GameplayState.cs</url>
|
||||
<line>141</line>
|
||||
<properties documentPath="A:\Projects\Infra\Assets\Code\Infrastructure\App\States\GameplayState.cs" containingFunctionPresentation="Method 'EndTheGame'">
|
||||
<url>file://$PROJECT_DIR$/Assets/Code/Example/Platformer/PlatformerSceneInstaller.cs</url>
|
||||
<line>68</line>
|
||||
<properties documentPath="A:\Projects\Infra\Assets\Code\Example\Platformer\PlatformerSceneInstaller.cs" containingFunctionPresentation="Method 'Dispose'">
|
||||
<startOffsets>
|
||||
<option value="5436" />
|
||||
<option value="2442" />
|
||||
</startOffsets>
|
||||
<endOffsets>
|
||||
<option value="5530" />
|
||||
<option value="2491" />
|
||||
</endOffsets>
|
||||
</properties>
|
||||
<option name="timeStamp" value="13" />
|
||||
</line-breakpoint>
|
||||
<line-breakpoint enabled="true" type="DotNet Breakpoints">
|
||||
<url>file://$PROJECT_DIR$/Assets/Code/Infrastructure/App/States/GameplayState.cs</url>
|
||||
<line>62</line>
|
||||
<properties documentPath="A:\Projects\Infra\Assets\Code\Infrastructure\App\States\GameplayState.cs" containingFunctionPresentation="Method 'GameplayLoadingCompleted'">
|
||||
<startOffsets>
|
||||
<option value="2095" />
|
||||
</startOffsets>
|
||||
<endOffsets>
|
||||
<option value="2152" />
|
||||
</endOffsets>
|
||||
</properties>
|
||||
<option name="timeStamp" value="14" />
|
||||
</line-breakpoint>
|
||||
<line-breakpoint enabled="true" type="DotNet Breakpoints">
|
||||
<url>file://$PROJECT_DIR$/Assets/Code/Infrastructure/App/States/MainMenuState.cs</url>
|
||||
<line>60</line>
|
||||
<properties documentPath="A:\Projects\Infra\Assets\Code\Infrastructure\App\States\MainMenuState.cs" containingFunctionPresentation="Method 'OnReadyToPlay'">
|
||||
<startOffsets>
|
||||
<option value="2151" />
|
||||
</startOffsets>
|
||||
<endOffsets>
|
||||
<option value="2210" />
|
||||
</endOffsets>
|
||||
</properties>
|
||||
<option name="timeStamp" value="15" />
|
||||
</line-breakpoint>
|
||||
<line-breakpoint enabled="true" type="DotNet Breakpoints">
|
||||
<url>file://$PROJECT_DIR$/Assets/Code/Example/Race/RaceGame.cs</url>
|
||||
<line>62</line>
|
||||
<properties documentPath="A:\Projects\Infra\Assets\Code\Example\Race\RaceGame.cs" containingFunctionPresentation="Method 'PlaceRacers'">
|
||||
<startOffsets>
|
||||
<option value="1879" />
|
||||
</startOffsets>
|
||||
<endOffsets>
|
||||
<option value="2084" />
|
||||
</endOffsets>
|
||||
</properties>
|
||||
<option name="timeStamp" value="16" />
|
||||
<option name="timeStamp" value="1" />
|
||||
</line-breakpoint>
|
||||
</breakpoints>
|
||||
</breakpoint-manager>
|
||||
|
||||
+123
-41
@@ -5,38 +5,12 @@
|
||||
</component>
|
||||
<component name="ChangeListManager">
|
||||
<list default="true" id="ed1a3c4f-83ac-4211-ae32-004a26afd5d8" name="Changes" comment="">
|
||||
<change afterPath="$PROJECT_DIR$/Assets/Code/Example/Race/Racer/AI/AIRacerID.cs" afterDir="false" />
|
||||
<change afterPath="$PROJECT_DIR$/Assets/Code/Example/Race/Racer/AI/AIRacerID.cs.meta" afterDir="false" />
|
||||
<change afterPath="$PROJECT_DIR$/Assets/Code/Example/Race/Racer/AI/ID.meta" afterDir="false" />
|
||||
<change afterPath="$PROJECT_DIR$/Assets/Code/Example/Race/Racer/AI/ID/Agent.cs" afterDir="false" />
|
||||
<change afterPath="$PROJECT_DIR$/Assets/Code/Example/Race/Racer/AI/ID/Agent.cs.meta" afterDir="false" />
|
||||
<change afterPath="$PROJECT_DIR$/Assets/Code/Example/Race/Racer/AI/ID/AgentBehaviour.cs" afterDir="false" />
|
||||
<change afterPath="$PROJECT_DIR$/Assets/Code/Example/Race/Racer/AI/ID/AgentBehaviour.cs.meta" afterDir="false" />
|
||||
<change afterPath="$PROJECT_DIR$/Assets/Code/Example/Race/Racer/AI/ID/Behaviours.meta" afterDir="false" />
|
||||
<change afterPath="$PROJECT_DIR$/Assets/Code/Example/Race/Racer/AI/ID/Behaviours/Flee.cs" afterDir="false" />
|
||||
<change afterPath="$PROJECT_DIR$/Assets/Code/Example/Race/Racer/AI/ID/Behaviours/Flee.cs.meta" afterDir="false" />
|
||||
<change afterPath="$PROJECT_DIR$/Assets/Code/Example/Race/Racer/AI/ID/Behaviours/Seek.cs" afterDir="false" />
|
||||
<change afterPath="$PROJECT_DIR$/Assets/Code/Example/Race/Racer/AI/ID/Behaviours/Seek.cs.meta" afterDir="false" />
|
||||
<change afterPath="$PROJECT_DIR$/Assets/Code/Example/Race/Racer/AI/ID/Steering.cs" afterDir="false" />
|
||||
<change afterPath="$PROJECT_DIR$/Assets/Code/Example/Race/Racer/AI/ID/Steering.cs.meta" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/.idea/.idea.Infratest/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/.idea.Infratest/.idea/workspace.xml" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/Assets/AddressableAssetsData/AddressableAssetSettings.asset" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/AddressableAssetsData/AddressableAssetSettings.asset" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/Assets/Code/Example/Race/RaceGame.cs" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/Code/Example/Race/RaceGame.cs" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/Assets/Code/Example/Race/RaceScores.cs" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/Code/Example/Race/RaceScores.cs" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/Assets/Code/Example/Race/Racer/AI/PlayerRacer.cs" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/Code/Example/Race/Racer/Player/PlayerRacer.cs" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/Assets/Code/Example/Race/Racer/AI/PlayerRacer.cs.meta" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/Code/Example/Race/Racer/Player/PlayerRacer.cs.meta" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/Assets/Code/Example/Race/Racer/AI/Racer.cs" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/Code/Example/Race/Racer/Racer.cs" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/Assets/Code/Example/Race/Racer/AI/Racer.cs.meta" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/Code/Example/Race/Racer/Racer.cs.meta" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/Assets/Code/Example/Race/Racer/Player/PlayerCarControllerRB.cs" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/Code/Example/Race/Racer/Player/PlayerCarControllerRB.cs" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/Assets/Code/Example/Race/Racer/RacerFactory.cs" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/Code/Example/Race/Racer/RacerFactory.cs" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/Assets/Code/Example/Race/Track/CheckPoint.cs" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/Code/Example/Race/Track/CheckPoint.cs" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/Assets/Code/Example/Race/UI/PlayerScoreCounter.cs" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/Code/Example/Race/UI/PlayerScoreCounter.cs" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/Assets/Code/Infrastructure/App/States/GameplayState.cs" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/Code/Infrastructure/App/States/GameplayState.cs" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/Assets/Code/Infrastructure/UI/Panels/LoadingPanel.cs" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/Code/Infrastructure/UI/Panels/LoadingPanel.cs" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/Assets/Resources_moved/Example/Race/Configs/AIGreen.asset" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/Resources_moved/Example/Race/Configs/AIGreen.asset" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/Assets/Resources_moved/Example/Race/Configs/AIRed.asset" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/Resources_moved/Example/Race/Configs/AIRed.asset" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/Assets/Resources_moved/Example/Race/Racist (1).prefab" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/Resources_moved/Example/Race/Racist (1).prefab" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/Assets/Resources_moved/UI/Panels/LoadingPanel.prefab" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/Resources_moved/UI/Panels/LoadingPanel.prefab" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/Assets/Code/Example/Platformer/Entity/Entity.cs" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/Code/Example/Platformer/Entity/Entity.cs" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/Assets/Code/Example/Platformer/Entity/EntityHealth.cs" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/Code/Example/Platformer/Entity/EntityHealth.cs" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/Assets/Code/Example/Platformer/Entity/PlatformerEnemyFactory.cs" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/Code/Example/Platformer/Entity/PlatformerEnemyFactory.cs" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/Assets/Code/Example/Platformer/Entity/PlayerEntity.cs" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/Code/Example/Platformer/Entity/PlayerEntity.cs" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/Assets/Code/Example/Platformer/PlatformerState.cs" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/Code/Example/Platformer/PlatformerState.cs" afterDir="false" />
|
||||
</list>
|
||||
<option name="SHOW_DIALOG" value="false" />
|
||||
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
||||
@@ -50,8 +24,24 @@
|
||||
<option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
|
||||
</component>
|
||||
<component name="HighlightingSettingsPerFile">
|
||||
<setting file="file://$APPLICATION_CONFIG_DIR$/resharper-host/DecompilerCache/decompiler/1a795a29c7af4385b159eb69f68237b8468c00/4e/b1d2d6b8/CollectionExtensions.cs" root0="FORCE_HIGHLIGHTING" />
|
||||
<setting file="file://$APPLICATION_CONFIG_DIR$/resharper-host/DecompilerCache/decompiler/1a795a29c7af4385b159eb69f68237b8468c00/b1/26a57819/InvalidCastException.cs" root0="FORCE_HIGHLIGHTING" />
|
||||
<setting file="file://$APPLICATION_CONFIG_DIR$/resharper-host/DecompilerCache/decompiler/1a795a29c7af4385b159eb69f68237b8468c00/e6/7aba13ff/ThrowHelper.cs" root0="FORCE_HIGHLIGHTING" />
|
||||
<setting file="file://$APPLICATION_CONFIG_DIR$/resharper-host/DecompilerCache/decompiler/1a795a29c7af4385b159eb69f68237b8468c00/f4/be902eb3/List`1.cs" root0="FORCE_HIGHLIGHTING" />
|
||||
<setting file="file://$APPLICATION_CONFIG_DIR$/resharper-host/DecompilerCache/decompiler/30cb9806a8774f11bb35ea6b11076cb4110400/9e/e04a9ad9/Enumerable.cs" root0="FORCE_HIGHLIGHTING" />
|
||||
<setting file="file://$APPLICATION_CONFIG_DIR$/resharper-host/DecompilerCache/decompiler/6a608067b36b43a4b2b9c2c9f46aac8b212200/95/3a3a110c/Vector3.cs" root0="FORCE_HIGHLIGHTING" />
|
||||
<setting file="file://$APPLICATION_CONFIG_DIR$/resharper-host/DecompilerCache/decompiler/6a608067b36b43a4b2b9c2c9f46aac8b212200/ed/c16ca097/Vector2.cs" root0="FORCE_HIGHLIGHTING" />
|
||||
<setting file="file://$PROJECT_DIR$/Assets/Code/Example/Platformer/Entity/Enemies/Bee.cs" root0="FORCE_HIGHLIGHTING" />
|
||||
<setting file="file://$PROJECT_DIR$/Assets/Code/Example/Platformer/Entity/Enemies/BeeRadar.cs" root0="FORCE_HIGHLIGHTING" />
|
||||
<setting file="file://$PROJECT_DIR$/Assets/Code/Example/Platformer/Entity/Enemies/Snail.cs" root0="FORCE_HIGHLIGHTING" />
|
||||
<setting file="file://$PROJECT_DIR$/Assets/Code/Example/Platformer/Entity/Entity.cs" root0="FORCE_HIGHLIGHTING" />
|
||||
<setting file="file://$PROJECT_DIR$/Assets/Code/Example/Platformer/Entity/PlatformerEnemyFactory.cs" root0="FORCE_HIGHLIGHTING" />
|
||||
<setting file="file://$PROJECT_DIR$/Assets/Code/Example/Platformer/Entity/PlayerEntity.cs" root0="FORCE_HIGHLIGHTING" />
|
||||
<setting file="file://$PROJECT_DIR$/Assets/Code/Example/Platformer/Level/PlatformerLevelData.cs" root0="FORCE_HIGHLIGHTING" />
|
||||
<setting file="file://$PROJECT_DIR$/Assets/Code/Example/Platformer/PlatformerSceneData.cs" root0="FORCE_HIGHLIGHTING" />
|
||||
<setting file="file://$PROJECT_DIR$/Assets/Code/Example/Platformer/PlatformerSceneInstaller.cs" root0="FORCE_HIGHLIGHTING" />
|
||||
<setting file="file://$PROJECT_DIR$/Assets/Code/Example/Platformer/PlatformerState.cs" root0="FORCE_HIGHLIGHTING" />
|
||||
<setting file="file://$PROJECT_DIR$/Assets/Code/Example/Platformer/UI/PlatformerCanvas.cs" root0="FORCE_HIGHLIGHTING" />
|
||||
<setting file="file://$PROJECT_DIR$/Assets/Code/Example/Race/RaceGame.cs" root0="FORCE_HIGHLIGHTING" />
|
||||
<setting file="file://$PROJECT_DIR$/Assets/Code/Example/Race/RaceScores.cs" root0="FORCE_HIGHLIGHTING" />
|
||||
<setting file="file://$PROJECT_DIR$/Assets/Code/Example/Race/Racer/AI/AIDebugRacer.cs" root0="FORCE_HIGHLIGHTING" />
|
||||
@@ -59,12 +49,12 @@
|
||||
<setting file="file://$PROJECT_DIR$/Assets/Code/Example/Race/Racer/AI/ID/Agent.cs" root0="FORCE_HIGHLIGHTING" />
|
||||
<setting file="file://$PROJECT_DIR$/Assets/Code/Example/Race/Racer/AI/ID/AgentBehaviour.cs" root0="FORCE_HIGHLIGHTING" />
|
||||
<setting file="file://$PROJECT_DIR$/Assets/Code/Example/Race/Racer/AI/ID/Behaviours/Flee.cs" root0="FORCE_HIGHLIGHTING" />
|
||||
<setting file="file://$PROJECT_DIR$/Assets/Code/Example/Race/Racer/AI/ID/Behaviours/Pursue.cs" root0="FORCE_HIGHLIGHTING" />
|
||||
<setting file="file://$PROJECT_DIR$/Assets/Code/Example/Race/Racer/AI/ID/Behaviours/Seek.cs" root0="FORCE_HIGHLIGHTING" />
|
||||
<setting file="file://$PROJECT_DIR$/Assets/Code/Example/Race/Racer/AI/ID/Steering.cs" root0="FORCE_HIGHLIGHTING" />
|
||||
<setting file="file://$PROJECT_DIR$/Assets/Code/Example/Race/Racer/Car/CarWheelRotator.cs" root0="FORCE_HIGHLIGHTING" />
|
||||
<setting file="file://$PROJECT_DIR$/Assets/Code/Example/Race/Racer/Car/CarWheelRotatorPlayer.cs" root0="FORCE_HIGHLIGHTING" />
|
||||
<setting file="file://$PROJECT_DIR$/Assets/Code/Example/Race/Racer/Player/PlayerCarController.cs" root0="FORCE_HIGHLIGHTING" />
|
||||
<setting file="file://$PROJECT_DIR$/Assets/Code/Example/Race/Racer/Player/PlayerCarControllerRB.cs" root0="FORCE_HIGHLIGHTING" />
|
||||
<setting file="file://$PROJECT_DIR$/Assets/Code/Example/Race/Racer/RacerFactory.cs" root0="FORCE_HIGHLIGHTING" />
|
||||
<setting file="file://$PROJECT_DIR$/Assets/Code/Example/Race/Racer/RacerSettings.cs" root0="FORCE_HIGHLIGHTING" />
|
||||
<setting file="file://$PROJECT_DIR$/Assets/Code/Example/Race/Racer/RacerType.cs" root0="FORCE_HIGHLIGHTING" />
|
||||
@@ -73,22 +63,30 @@
|
||||
<setting file="file://$PROJECT_DIR$/Assets/Code/Example/Race/Track/RaceTrackData.cs" root0="FORCE_HIGHLIGHTING" />
|
||||
<setting file="file://$PROJECT_DIR$/Assets/Code/Example/Race/Track/WellEditor/CheckPointAsset.cs" root0="FORCE_HIGHLIGHTING" />
|
||||
<setting file="file://$PROJECT_DIR$/Assets/Code/Example/Race/UI/PlayerScoreCounter.cs" root0="FORCE_HIGHLIGHTING" />
|
||||
<setting file="file://$PROJECT_DIR$/Assets/Code/Infrastructure/App/AppStateMachine.cs" root0="FORCE_HIGHLIGHTING" />
|
||||
<setting file="file://$PROJECT_DIR$/Assets/Code/Infrastructure/App/SceneInstallers/GameplaySceneInstaller.cs" root0="FORCE_HIGHLIGHTING" />
|
||||
<setting file="file://$PROJECT_DIR$/Assets/Code/Infrastructure/App/States/BootstrapState.cs" root0="FORCE_HIGHLIGHTING" />
|
||||
<setting file="file://$PROJECT_DIR$/Assets/Code/Infrastructure/App/States/GameplayState.cs" root0="FORCE_HIGHLIGHTING" />
|
||||
<setting file="file://$PROJECT_DIR$/Assets/Code/Infrastructure/App/States/MainMenuState.cs" root0="FORCE_HIGHLIGHTING" />
|
||||
<setting file="file://$PROJECT_DIR$/Assets/Code/Infrastructure/Audio/AudioService.cs" root0="FORCE_HIGHLIGHTING" />
|
||||
<setting file="file://$PROJECT_DIR$/Assets/Code/Infrastructure/Audio/AudioSourcePool.cs" root0="FORCE_HIGHLIGHTING" />
|
||||
<setting file="file://$PROJECT_DIR$/Assets/Code/Infrastructure/Audio/AudioSourceSettings.cs" root0="FORCE_HIGHLIGHTING" />
|
||||
<setting file="file://$PROJECT_DIR$/Assets/Code/Infrastructure/Camera/CameraFactory.cs" root0="FORCE_HIGHLIGHTING" />
|
||||
<setting file="file://$PROJECT_DIR$/Assets/Code/Infrastructure/Camera/CameraStateMachine.cs" root0="FORCE_HIGHLIGHTING" />
|
||||
<setting file="file://$PROJECT_DIR$/Assets/Code/Infrastructure/Camera/CameraStates/BaseCameraState.cs" root0="FORCE_HIGHLIGHTING" />
|
||||
<setting file="file://$PROJECT_DIR$/Assets/Code/Infrastructure/Camera/CameraStates/CameraTemp.cs" root0="FORCE_HIGHLIGHTING" />
|
||||
<setting file="file://$PROJECT_DIR$/Assets/Code/Infrastructure/Camera/CameraStates/NoneCameraState.cs" root0="FORCE_HIGHLIGHTING" />
|
||||
<setting file="file://$PROJECT_DIR$/Assets/Code/Infrastructure/Camera/CameraStates/ThirdPersonState.cs" root0="FORCE_HIGHLIGHTING" />
|
||||
<setting file="file://$PROJECT_DIR$/Assets/Code/Infrastructure/Loadings/Loading.cs" root0="FORCE_HIGHLIGHTING" />
|
||||
<setting file="file://$PROJECT_DIR$/Assets/Code/Infrastructure/SceneLoader/SceneId.cs" root0="FORCE_HIGHLIGHTING" />
|
||||
<setting file="file://$PROJECT_DIR$/Assets/Resources/Example/Misc/CheckPointGTASA.shader" root0="FORCE_HIGHLIGHTING" />
|
||||
<setting file="file://$PROJECT_DIR$/Library/PackageCache/com.cysharp.unitask@a85b92a8e443/Runtime/External/Addressables/AddressablesAsyncExtensions.cs" root0="SKIP_HIGHLIGHTING" />
|
||||
<setting file="file://$PROJECT_DIR$/Library/PackageCache/com.cysharp.unitask@a85b92a8e443/Runtime/UniTaskScheduler.cs" root0="SKIP_HIGHLIGHTING" />
|
||||
<setting file="file://$PROJECT_DIR$/Library/PackageCache/com.gustavopsantos.reflex@fabfbc86f712/Core/Container.cs" root0="SKIP_HIGHLIGHTING" />
|
||||
<setting file="file://$PROJECT_DIR$/Library/PackageCache/com.gustavopsantos.reflex@fabfbc86f712/Core/ContainerBuilder.cs" root0="SKIP_HIGHLIGHTING" />
|
||||
<setting file="file://$PROJECT_DIR$/Library/PackageCache/com.gustavopsantos.reflex@fabfbc86f712/Core/IInstaller.cs" root0="SKIP_HIGHLIGHTING" />
|
||||
<setting file="file://$PROJECT_DIR$/Library/PackageCache/com.gustavopsantos.reflex@fabfbc86f712/Injectors/ConstructorInjector.cs" root0="SKIP_HIGHLIGHTING" />
|
||||
<setting file="file://$PROJECT_DIR$/Library/PackageCache/com.unity.addressables@13d9ede188ab/Runtime/Addressables.cs" root0="SKIP_HIGHLIGHTING" />
|
||||
<setting file="file://$PROJECT_DIR$/Library/PackageCache/com.unity.addressables@13d9ede188ab/Runtime/ResourceManager/AsyncOperations/AsyncOperationBase.cs" root0="SKIP_HIGHLIGHTING" />
|
||||
<setting file="file://$PROJECT_DIR$/Library/PackageCache/com.unity.addressables@13d9ede188ab/Runtime/ResourceManager/AsyncOperations/AsyncOperationHandle.cs" root0="SKIP_HIGHLIGHTING" />
|
||||
<setting file="file://$PROJECT_DIR$/Library/PackageCache/com.unity.addressables@13d9ede188ab/Runtime/ResourceManager/Util/MonoBehaviourCallbackHooks.cs" root0="SKIP_HIGHLIGHTING" />
|
||||
<setting file="file://$PROJECT_DIR$/Library/PackageCache/com.gustavopsantos.reflex@fabfbc86f712/Injectors/MethodInjector.cs" root0="SKIP_HIGHLIGHTING" />
|
||||
</component>
|
||||
<component name="ProjectColorInfo">{
|
||||
"customColor": "",
|
||||
@@ -116,6 +114,16 @@
|
||||
}
|
||||
}</component>
|
||||
<component name="RunManager" selected="Attach to Unity Editor.Attach to Unity Editor">
|
||||
<configuration name="Start Unity" type="RunUnityExe" factoryName="Unity Executable">
|
||||
<option name="EXE_PATH" value="$USER_HOME$/Unity/Hub/Editor/6000.3.10f1/Editor/Unity" />
|
||||
<option name="PROGRAM_PARAMETERS" value="-projectPath A:\Projects\Infratest -debugCodeOptimization" />
|
||||
<option name="WORKING_DIRECTORY" value="A:\Projects\Infratest" />
|
||||
<option name="PASS_PARENT_ENVS" value="1" />
|
||||
<option name="ENV_FILE_PATHS" value="" />
|
||||
<option name="REDIRECT_INPUT_PATH" value="" />
|
||||
<option name="MIXED_MODE_DEBUG" value="0" />
|
||||
<method v="2" />
|
||||
</configuration>
|
||||
<configuration name="Start Unity" type="RunUnityExe" factoryName="Unity Executable">
|
||||
<option name="EXE_PATH" value="$USER_HOME$/Unity/Hub/Editor/6000.3.5f2/Editor/Unity" />
|
||||
<option name="PROGRAM_PARAMETERS" value="-projectPath A:\Projects\Infratest -debugCodeOptimization" />
|
||||
@@ -126,6 +134,16 @@
|
||||
<option name="MIXED_MODE_DEBUG" value="0" />
|
||||
<method v="2" />
|
||||
</configuration>
|
||||
<configuration name="Unit Tests (batch mode)" type="RunUnityExe" factoryName="Unity Executable">
|
||||
<option name="EXE_PATH" value="$USER_HOME$/Unity/Hub/Editor/6000.3.10f1/Editor/Unity" />
|
||||
<option name="PROGRAM_PARAMETERS" value="-runTests -batchmode -projectPath A:\Projects\Infratest -testResults Logs/results.xml -logFile Logs/Editor.log -testPlatform EditMode -debugCodeOptimization" />
|
||||
<option name="WORKING_DIRECTORY" value="A:\Projects\Infratest" />
|
||||
<option name="PASS_PARENT_ENVS" value="1" />
|
||||
<option name="ENV_FILE_PATHS" value="" />
|
||||
<option name="REDIRECT_INPUT_PATH" value="" />
|
||||
<option name="MIXED_MODE_DEBUG" value="0" />
|
||||
<method v="2" />
|
||||
</configuration>
|
||||
<configuration name="Unit Tests (batch mode)" type="RunUnityExe" factoryName="Unity Executable">
|
||||
<option name="EXE_PATH" value="$USER_HOME$/Unity/Hub/Editor/6000.3.5f2/Editor/Unity" />
|
||||
<option name="PROGRAM_PARAMETERS" value="-runTests -batchmode -projectPath A:\Projects\Infratest -testResults Logs/results.xml -logFile Logs/Editor.log -testPlatform EditMode -debugCodeOptimization" />
|
||||
@@ -149,21 +167,48 @@
|
||||
</option>
|
||||
<method v="2" />
|
||||
</configuration>
|
||||
<configuration name="Attach to Unity Editor" type="UNITY_DEBUG_RUN_CONFIGURATION" factoryName="Unity Debug" show_console_on_std_err="false" show_console_on_std_out="false" port="50000" address="localhost" useMixedMode="false" ignored-value-for-modified-check="11838">
|
||||
<configuration name="Attach to Unity Editor & Play" type="UNITY_DEBUG_RUN_CONFIGURATION" factoryName="UNITY_ATTACH_AND_PLAY" show_console_on_std_err="false" show_console_on_std_out="false" port="50000" address="localhost" useMixedMode="false">
|
||||
<option name="allowRunningInParallel" value="false" />
|
||||
<option name="listenPortForConnections" value="false" />
|
||||
<option name="pid" value="11838" />
|
||||
<option name="pid" />
|
||||
<option name="projectPathOnTarget" />
|
||||
<option name="runtimes">
|
||||
<list>
|
||||
<MonoRuntime />
|
||||
</list>
|
||||
<list />
|
||||
</option>
|
||||
<option name="selectedOptions">
|
||||
<list />
|
||||
</option>
|
||||
<method v="2" />
|
||||
</configuration>
|
||||
<configuration name="Attach to Unity Editor" type="UNITY_DEBUG_RUN_CONFIGURATION" factoryName="Unity Debug" show_console_on_std_err="false" show_console_on_std_out="false" port="50000" address="localhost" useMixedMode="false">
|
||||
<option name="allowRunningInParallel" value="false" />
|
||||
<option name="listenPortForConnections" value="false" />
|
||||
<option name="pid" />
|
||||
<option name="projectPathOnTarget" />
|
||||
<option name="runtimes">
|
||||
<list />
|
||||
</option>
|
||||
<option name="selectedOptions">
|
||||
<list />
|
||||
</option>
|
||||
<method v="2" />
|
||||
</configuration>
|
||||
<configuration name="Attach to Unity Editor" type="UNITY_DEBUG_RUN_CONFIGURATION" factoryName="Unity Debug" show_console_on_std_err="false" show_console_on_std_out="false" port="50000" address="localhost" useMixedMode="false">
|
||||
<option name="allowRunningInParallel" value="false" />
|
||||
<option name="listenPortForConnections" value="false" />
|
||||
<option name="pid" />
|
||||
<option name="projectPathOnTarget" />
|
||||
<option name="runtimes">
|
||||
<list />
|
||||
</option>
|
||||
<option name="selectedOptions">
|
||||
<list />
|
||||
</option>
|
||||
<method v="2" />
|
||||
</configuration>
|
||||
<configuration name="Attach to" type="UnityDevicePlayer" factoryName="UnityAttachToDevicePlayer">
|
||||
<method v="2" />
|
||||
</configuration>
|
||||
<configuration name="Attach to" type="UnityDevicePlayer" factoryName="UnityAttachToDevicePlayer">
|
||||
<method v="2" />
|
||||
</configuration>
|
||||
@@ -236,6 +281,17 @@
|
||||
<workItem from="1770226628030" duration="3133000" />
|
||||
<workItem from="1770297444061" duration="2414000" />
|
||||
<workItem from="1770394380051" duration="4532000" />
|
||||
<workItem from="1770647985793" duration="3000" />
|
||||
<workItem from="1770649909847" duration="667000" />
|
||||
<workItem from="1770653445227" duration="6602000" />
|
||||
<workItem from="1770735223876" duration="2059000" />
|
||||
<workItem from="1770992672025" duration="8533000" />
|
||||
<workItem from="1771345358380" duration="3534000" />
|
||||
<workItem from="1771422036487" duration="1920000" />
|
||||
<workItem from="1771429673395" duration="3644000" />
|
||||
<workItem from="1771433586006" duration="1485000" />
|
||||
<workItem from="1773065611992" duration="4340000" />
|
||||
<workItem from="1773758943752" duration="396000" />
|
||||
</task>
|
||||
<servers />
|
||||
</component>
|
||||
@@ -267,6 +323,32 @@
|
||||
<properties documentPath="A:\Projects\Infratest\Assets\Code\Example\Liminal\Character\LiminalCharacterController.cs" containingFunctionPresentation="Method 'UpdateRotation'" />
|
||||
<option name="timeStamp" value="58" />
|
||||
</line-breakpoint>
|
||||
<line-breakpoint enabled="true" type="DotNet Breakpoints">
|
||||
<url>file://$PROJECT_DIR$/Assets/Code/Example/Platformer/PlatformerSceneInstaller.cs</url>
|
||||
<line>45</line>
|
||||
<properties documentPath="$PROJECT_DIR$/Assets/Code/Example/Platformer/PlatformerSceneInstaller.cs" containingFunctionPresentation="Method 'OnContainerBuild'">
|
||||
<startOffsets>
|
||||
<option value="1817" />
|
||||
</startOffsets>
|
||||
<endOffsets>
|
||||
<option value="1840" />
|
||||
</endOffsets>
|
||||
</properties>
|
||||
<option name="timeStamp" value="75" />
|
||||
</line-breakpoint>
|
||||
<line-breakpoint enabled="true" type="DotNet Breakpoints">
|
||||
<url>file://$PROJECT_DIR$/Assets/Code/Example/Platformer/PlatformerSceneInstaller.cs</url>
|
||||
<line>51</line>
|
||||
<properties documentPath="$PROJECT_DIR$/Assets/Code/Example/Platformer/PlatformerSceneInstaller.cs" containingFunctionPresentation="Method 'PlatformerEnemyFactoryInitialized'">
|
||||
<startOffsets>
|
||||
<option value="1967" />
|
||||
</startOffsets>
|
||||
<endOffsets>
|
||||
<option value="1991" />
|
||||
</endOffsets>
|
||||
</properties>
|
||||
<option name="timeStamp" value="77" />
|
||||
</line-breakpoint>
|
||||
<breakpoint enabled="true" type="DotNet_Exception_Breakpoints">
|
||||
<properties exception="System.OperationCanceledException" breakIfHandledByOtherCode="false" displayValue="System.OperationCanceledException" />
|
||||
<option name="timeStamp" value="62" />
|
||||
|
||||
@@ -15,7 +15,7 @@ MonoBehaviour:
|
||||
m_DefaultGroup: d790534e015d692428ac5a9ce7d2ceb6
|
||||
m_currentHash:
|
||||
serializedVersion: 2
|
||||
Hash: 00000000000000000000000000000000
|
||||
Hash: 6ac6f4ebd726e03a1c07efe42bb1b362
|
||||
m_OptimizeCatalogSize: 0
|
||||
m_BuildRemoteCatalog: 0
|
||||
m_CatalogRequestsTimeout: 0
|
||||
@@ -42,6 +42,7 @@ MonoBehaviour:
|
||||
m_BundleRedirectLimit: -1
|
||||
m_SharedBundleSettings: 0
|
||||
m_SharedBundleSettingsCustomGroupIndex: 0
|
||||
m_simulatedLoadDelay: 0.1
|
||||
m_ContiguousBundles: 1
|
||||
m_StripUnityVersionFromBundleBuild: 0
|
||||
m_DisableVisibleSubAssetRepresentations: 0
|
||||
@@ -107,6 +108,8 @@ MonoBehaviour:
|
||||
- AudioInfoConfig
|
||||
- AudioSettingsConfig
|
||||
- RacerConfig
|
||||
- LayerMaskConfig
|
||||
- PlatformerEntity
|
||||
m_SchemaTemplates: []
|
||||
m_GroupTemplateObjects:
|
||||
- {fileID: 11400000, guid: af0b5782a0090884db056705d7776701, type: 2}
|
||||
|
||||
@@ -15,16 +15,33 @@ MonoBehaviour:
|
||||
m_GroupName: Default Local Group
|
||||
m_GUID: d790534e015d692428ac5a9ce7d2ceb6
|
||||
m_SerializeEntries:
|
||||
- m_GUID: 00279b1c6fbb7ac80868388a292b0c44
|
||||
m_Address: Assets/Resources_moved/Example/Platformer/Configs/Enemies/Snail.asset
|
||||
m_ReadOnly: 0
|
||||
m_SerializedLabels:
|
||||
- PlatformerEntity
|
||||
FlaggedDuringContentUpdateRestriction: 0
|
||||
- m_GUID: 0d2cf1d8a32701f56851c8b734cf7928
|
||||
m_Address: Assets/Resources_moved/UI/Panels/PlayerCounter.prefab
|
||||
m_ReadOnly: 0
|
||||
m_SerializedLabels: []
|
||||
FlaggedDuringContentUpdateRestriction: 0
|
||||
- m_GUID: 0eb645a0c96b1c437bf0712d6b856b7c
|
||||
m_Address: Assets/Resources_moved/Example/Platformer/Bee.prefab
|
||||
m_ReadOnly: 0
|
||||
m_SerializedLabels: []
|
||||
FlaggedDuringContentUpdateRestriction: 0
|
||||
- m_GUID: 0f5388dd5b953e74281733a43c9bca5a
|
||||
m_Address: Audio/UI/01. Wake Up, Get Up, Get Out There
|
||||
m_ReadOnly: 0
|
||||
m_SerializedLabels: []
|
||||
FlaggedDuringContentUpdateRestriction: 0
|
||||
- m_GUID: 10228ea17914708e586b8da1daae92ec
|
||||
m_Address: Assets/Resources_moved/Example/Platformer/Configs/PlatformerCamera.asset
|
||||
m_ReadOnly: 0
|
||||
m_SerializedLabels:
|
||||
- CameraConfig
|
||||
FlaggedDuringContentUpdateRestriction: 0
|
||||
- m_GUID: 13852bf3f3ccace4e9deefd844eebb23
|
||||
m_Address: Assets/Resources_moved/UI/Panels/LoadingPanel.prefab
|
||||
m_ReadOnly: 0
|
||||
@@ -46,16 +63,32 @@ MonoBehaviour:
|
||||
m_ReadOnly: 0
|
||||
m_SerializedLabels: []
|
||||
FlaggedDuringContentUpdateRestriction: 0
|
||||
- m_GUID: 1dca3345d7b309d70a26b3f646ccad08
|
||||
m_Address: Assets/Resources_moved/Example/Platformer/CinemachineCamera.prefab
|
||||
m_ReadOnly: 0
|
||||
m_SerializedLabels: []
|
||||
FlaggedDuringContentUpdateRestriction: 0
|
||||
- m_GUID: 2044ec9a33380e7239855e26a9d8bcc5
|
||||
m_Address: Assets/Resources_moved/Audio/UI/launch_selectmenu.wav
|
||||
m_ReadOnly: 0
|
||||
m_SerializedLabels: []
|
||||
FlaggedDuringContentUpdateRestriction: 0
|
||||
- m_GUID: 234ab51636edcbab88dbadfdb7fbfe65
|
||||
m_Address: Example/Platformer/Characters/Player/Player
|
||||
m_ReadOnly: 0
|
||||
m_SerializedLabels: []
|
||||
FlaggedDuringContentUpdateRestriction: 0
|
||||
- m_GUID: 2471ee3760db4ecfe8c313bb2c00daf0
|
||||
m_Address: Assets/Resources_moved/Configs/Audio/Audio Source.prefab
|
||||
m_ReadOnly: 0
|
||||
m_SerializedLabels: []
|
||||
FlaggedDuringContentUpdateRestriction: 0
|
||||
- m_GUID: 292439c50bbcbb638889b0959c637d18
|
||||
m_Address: Example/Platformer/Configs/Platformer
|
||||
m_ReadOnly: 0
|
||||
m_SerializedLabels:
|
||||
- SceneConfig
|
||||
FlaggedDuringContentUpdateRestriction: 0
|
||||
- m_GUID: 29779120ceccabb0ab008e48b44a39f4
|
||||
m_Address: Example/Race/Configs/AIBot
|
||||
m_ReadOnly: 0
|
||||
@@ -68,6 +101,12 @@ MonoBehaviour:
|
||||
m_SerializedLabels:
|
||||
- AudioInfoConfig
|
||||
FlaggedDuringContentUpdateRestriction: 0
|
||||
- m_GUID: 2f99b96d93cb35086b74d1b8c4111f90
|
||||
m_Address: Assets/Resources_moved/Example/Race/SceneChooser.asset
|
||||
m_ReadOnly: 0
|
||||
m_SerializedLabels:
|
||||
- UIPanelConfig
|
||||
FlaggedDuringContentUpdateRestriction: 0
|
||||
- m_GUID: 30778c5a4d5c3f74bac4e5340344cdad
|
||||
m_Address: Assets/Resources_moved/Configs/Volumes/MenuRetro.asset
|
||||
m_ReadOnly: 0
|
||||
@@ -80,6 +119,12 @@ MonoBehaviour:
|
||||
m_SerializedLabels:
|
||||
- SceneConfig
|
||||
FlaggedDuringContentUpdateRestriction: 0
|
||||
- m_GUID: 3f2b0a19832dd31578147a7bb53cf931
|
||||
m_Address: Assets/Resources_moved/Example/Platformer/Configs/LayerMasks/GroundLayerMask.asset
|
||||
m_ReadOnly: 0
|
||||
m_SerializedLabels:
|
||||
- LayerMaskConfig
|
||||
FlaggedDuringContentUpdateRestriction: 0
|
||||
- m_GUID: 456d3ecaf92ca5a4a817184de151ad9f
|
||||
m_Address: Assets/Resources_moved/Camera/CinemachineCameraCarFollow.prefab
|
||||
m_ReadOnly: 0
|
||||
@@ -142,17 +187,39 @@ MonoBehaviour:
|
||||
m_ReadOnly: 0
|
||||
m_SerializedLabels: []
|
||||
FlaggedDuringContentUpdateRestriction: 0
|
||||
- m_GUID: 69e720c0a88f4f9499af76a887cd9fdf
|
||||
m_Address: Assets/Resources_moved/Example/Platformer/Configs/LayerMasks/Player.asset
|
||||
m_ReadOnly: 0
|
||||
m_SerializedLabels:
|
||||
- LayerMaskConfig
|
||||
FlaggedDuringContentUpdateRestriction: 0
|
||||
- m_GUID: 6a86e03165bcd491ba987514d0da38bd
|
||||
m_Address: Assets/Resources_moved/Configs/Audio/Infos/UI/launchSelect1.asset
|
||||
m_ReadOnly: 0
|
||||
m_SerializedLabels:
|
||||
- AudioInfoConfig
|
||||
FlaggedDuringContentUpdateRestriction: 0
|
||||
- m_GUID: 6c22f498979461d3ea35e12a19f9be78
|
||||
m_Address: Assets/Resources_moved/Example/Race/PlayerScores.prefab
|
||||
m_ReadOnly: 0
|
||||
m_SerializedLabels: []
|
||||
FlaggedDuringContentUpdateRestriction: 0
|
||||
- m_GUID: 749408a9b44d2581783d04d903ec0f72
|
||||
m_Address: Assets/Resources_moved/Audio/UI/valve_sound.wav
|
||||
m_ReadOnly: 0
|
||||
m_SerializedLabels: []
|
||||
FlaggedDuringContentUpdateRestriction: 0
|
||||
- m_GUID: 77a268730c52ad461920f3459fdda1a0
|
||||
m_Address: Assets/Resources_moved/Example/Platformer/Snail.prefab
|
||||
m_ReadOnly: 0
|
||||
m_SerializedLabels: []
|
||||
FlaggedDuringContentUpdateRestriction: 0
|
||||
- m_GUID: 78f36de38978ecc0a9d9dff2ca9cf488
|
||||
m_Address: Assets/Resources_moved/Example/Platformer/Configs/Enemies/Boar.asset
|
||||
m_ReadOnly: 0
|
||||
m_SerializedLabels:
|
||||
- PlatformerEntity
|
||||
FlaggedDuringContentUpdateRestriction: 0
|
||||
- m_GUID: 7a5ae0cc826b85108aa9f0681d7f85cc
|
||||
m_Address: Assets/Resources_moved/Example/Race/Configs/AIRed.asset
|
||||
m_ReadOnly: 0
|
||||
@@ -202,11 +269,6 @@ MonoBehaviour:
|
||||
m_SerializedLabels:
|
||||
- AudioInfoConfig
|
||||
FlaggedDuringContentUpdateRestriction: 0
|
||||
- m_GUID: a78f552da8f156b469b95652e4b0209d
|
||||
m_Address: DebugClassConfig
|
||||
m_ReadOnly: 0
|
||||
m_SerializedLabels: []
|
||||
FlaggedDuringContentUpdateRestriction: 0
|
||||
- m_GUID: a9d36f968917dc35cb0e534af9ea6e59
|
||||
m_Address: Assets/Resources_moved/Configs/Audio/Infos/UI/launchSelectMenu.asset
|
||||
m_ReadOnly: 0
|
||||
@@ -244,17 +306,23 @@ MonoBehaviour:
|
||||
m_ReadOnly: 0
|
||||
m_SerializedLabels: []
|
||||
FlaggedDuringContentUpdateRestriction: 0
|
||||
- m_GUID: cc76fd76d78cd364880ebe8330a05834
|
||||
m_Address: Assets/Resources_moved/Example/Platformer/Configs/LayerMasks/Enemies.asset
|
||||
m_ReadOnly: 0
|
||||
m_SerializedLabels:
|
||||
- LayerMaskConfig
|
||||
FlaggedDuringContentUpdateRestriction: 0
|
||||
- m_GUID: d0a994964f42e0c0dad3da32f7b52c90
|
||||
m_Address: Assets/Resources_moved/Example/Platformer/Boar.prefab
|
||||
m_ReadOnly: 0
|
||||
m_SerializedLabels: []
|
||||
FlaggedDuringContentUpdateRestriction: 0
|
||||
- m_GUID: d2750e654bd192d41a48144c43b41302
|
||||
m_Address: Assets/Resources_moved/Configs/UI/Logo.asset
|
||||
m_ReadOnly: 0
|
||||
m_SerializedLabels:
|
||||
- UIPanelConfig
|
||||
FlaggedDuringContentUpdateRestriction: 0
|
||||
- m_GUID: d54fabdcc748a594aa0551dcd235c7c2
|
||||
m_Address: ScenesAssetReferences
|
||||
m_ReadOnly: 0
|
||||
m_SerializedLabels: []
|
||||
FlaggedDuringContentUpdateRestriction: 0
|
||||
- m_GUID: d7dd69cfadda3d6e18ec390724be0d80
|
||||
m_Address: Assets/Resources_moved/Configs/Audio/AudioSourcePrefabConfig.asset
|
||||
m_ReadOnly: 0
|
||||
@@ -303,6 +371,17 @@ MonoBehaviour:
|
||||
m_SerializedLabels:
|
||||
- AudioSettingsConfig
|
||||
FlaggedDuringContentUpdateRestriction: 0
|
||||
- m_GUID: ef1b55458defd6ca99e4006b21b9cb02
|
||||
m_Address: Assets/Resources_moved/Example/Platformer/Configs/Enemies/Bee.asset
|
||||
m_ReadOnly: 0
|
||||
m_SerializedLabels:
|
||||
- PlatformerEntity
|
||||
FlaggedDuringContentUpdateRestriction: 0
|
||||
- m_GUID: f281706c5b7913f43891c237c5210d40
|
||||
m_Address: Assets/Resources_moved/Example/Platformer/Configs/PlayerSettings.asset
|
||||
m_ReadOnly: 0
|
||||
m_SerializedLabels: []
|
||||
FlaggedDuringContentUpdateRestriction: 0
|
||||
- m_GUID: f5d189d2c8569c2489fe942137ea0f24
|
||||
m_Address: Assets/Resources_moved/Camera/CinemachineCamera.prefab
|
||||
m_ReadOnly: 0
|
||||
@@ -319,6 +398,11 @@ MonoBehaviour:
|
||||
m_ReadOnly: 0
|
||||
m_SerializedLabels: []
|
||||
FlaggedDuringContentUpdateRestriction: 0
|
||||
- m_GUID: f75fc43e1e6bd3ca5b4c90a98a790033
|
||||
m_Address: Example/Platformer
|
||||
m_ReadOnly: 0
|
||||
m_SerializedLabels: []
|
||||
FlaggedDuringContentUpdateRestriction: 0
|
||||
- m_GUID: f7cebe94899e9257497d042d1ec4fd76
|
||||
m_Address: Assets/Resources_moved/Configs/Audio/Infos/UI/ButtonRollOver.asset
|
||||
m_ReadOnly: 0
|
||||
|
||||
@@ -26,6 +26,10 @@ namespace Code.Debug
|
||||
{
|
||||
_stateMachine.SwitchState(AppStates.Gameplay).AllowStateTransition(AppStates.MainMenu);
|
||||
}
|
||||
public void SwitchPlatformer()
|
||||
{
|
||||
_stateMachine.SwitchState(AppStates.Platformer).AllowStateTransition(AppStates.MainMenu);
|
||||
}
|
||||
|
||||
[SerializeField] private List<Button> buttons;
|
||||
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 36ea829cf56649b4a025c709390a457c
|
||||
timeCreated: 1770736333
|
||||
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 95e867912f25463e8ae222819491ee0d
|
||||
timeCreated: 1770905985
|
||||
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 9df78f95b3ad416cb1a0a786f0b22365
|
||||
timeCreated: 1771423438
|
||||
@@ -0,0 +1,62 @@
|
||||
using System.Collections.Generic;
|
||||
using PrimeTween;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Code.Example.Platformer.Entity.Enemies
|
||||
{
|
||||
public class Bee : Entity
|
||||
{
|
||||
[SerializeField] private List<Transform> partolPoints;
|
||||
[SerializeField] private bool onPatrol = true;
|
||||
private int _currentPatrolPoint;
|
||||
|
||||
private Vector3 _velocity = new Vector3(1,1,1);
|
||||
[SerializeField] private Transform _currentTarget;
|
||||
|
||||
private Tween _patrolAction;
|
||||
|
||||
protected override void Move()
|
||||
{
|
||||
if (onPatrol && !_patrolAction.isAlive)
|
||||
{
|
||||
_patrolAction = Tween
|
||||
.PositionAtSpeed(transform,partolPoints[_currentPatrolPoint].position, 0.5f)
|
||||
.OnComplete(target: this, target => target.OnControlPointReached());
|
||||
}
|
||||
else if(_currentTarget)
|
||||
{
|
||||
|
||||
var direction = _currentTarget.position - transform.position;
|
||||
direction.Normalize();
|
||||
var targetPosition = _currentTarget.position + direction * -2f;
|
||||
|
||||
UnityEngine.Debug.DrawLine(transform.position, targetPosition, Color.red);
|
||||
|
||||
transform.position = Vector3.SmoothDamp(transform.position,_currentTarget.position,ref _velocity, 1f);
|
||||
// Tween
|
||||
// .PositionAtSpeed(transform, _currentTarget.position, 1f).OnUpdate(transform, );
|
||||
// // .OnComplete(OnControlPointReached);
|
||||
}
|
||||
}
|
||||
|
||||
private void OnControlPointReached()
|
||||
{
|
||||
if (++_currentPatrolPoint >= partolPoints.Count) _currentPatrolPoint = 0;
|
||||
}
|
||||
|
||||
public void GotTarget(Transform other)
|
||||
{
|
||||
onPatrol = false;
|
||||
|
||||
_currentTarget = other;
|
||||
|
||||
_patrolAction.Stop();
|
||||
}
|
||||
|
||||
public void LostTarget()
|
||||
{
|
||||
onPatrol = true;
|
||||
_currentTarget = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 2abf74ae7a894c5abc850fe852fdf4e7
|
||||
timeCreated: 1771433363
|
||||
@@ -0,0 +1,14 @@
|
||||
using System;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Code.Example.Platformer.Entity.Enemies
|
||||
{
|
||||
public class BeeRadar : MonoBehaviour
|
||||
{
|
||||
[SerializeField] private Bee bee;
|
||||
|
||||
private void OnTriggerEnter2D(Collider2D other) => bee.GotTarget(other.transform);
|
||||
|
||||
private void OnTriggerExit2D(Collider2D other) => bee.LostTarget();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 582294c360404f6d952d9e28bde1fbea
|
||||
timeCreated: 1771434696
|
||||
@@ -0,0 +1,60 @@
|
||||
using Code.Infrastructure.Configs;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Code.Example.Platformer.Entity.Enemies
|
||||
{
|
||||
public class Boar : Entity
|
||||
{
|
||||
[SerializeField] private Vector2 groundLeft;
|
||||
[SerializeField] private Vector2 groundRight;
|
||||
private bool _directionRight;
|
||||
|
||||
private float _acceleration = 3f;
|
||||
|
||||
protected override void Move()
|
||||
{
|
||||
if (_target)
|
||||
{
|
||||
_directionRight = ((_target.position - transform.position)).x > float.Epsilon;
|
||||
UnityEngine.Debug.DrawLine(transform.position, (transform.position + (_target.position - transform.position)), Color.salmon);
|
||||
|
||||
CheckupDirection();
|
||||
|
||||
rigidbody2D.linearVelocityX = _directionRight ? 0.5f : -0.5f;
|
||||
rigidbody2D.linearVelocityX *= _acceleration;
|
||||
}
|
||||
else
|
||||
{
|
||||
CheckupDirection();
|
||||
|
||||
rigidbody2D.linearVelocityX = _directionRight ? 0.5f : -0.5f;
|
||||
}
|
||||
}
|
||||
|
||||
protected override void HandleFlipX() => spriteRenderer.flipX = rigidbody2D.linearVelocity.x > -0.01f;
|
||||
|
||||
private void CheckupDirection()
|
||||
{
|
||||
if (_directionRight)
|
||||
{
|
||||
if (!Physics2D.OverlapPoint((Vector2)transform.position + groundRight,
|
||||
LayerMasks.Masks[LayerMaskType.PlatformerGround]))
|
||||
_directionRight = false;
|
||||
}
|
||||
else if (!Physics2D.OverlapPoint((Vector2)transform.position + groundLeft,
|
||||
LayerMasks.Masks[LayerMaskType.PlatformerGround]))
|
||||
_directionRight = true;
|
||||
}
|
||||
|
||||
private Transform _target;
|
||||
|
||||
public void GotTarget(Transform target)
|
||||
{
|
||||
_target = target;
|
||||
}
|
||||
public void LostTarget()
|
||||
{
|
||||
_target = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 8a21daf0f518490daeacea92cc2dee2d
|
||||
timeCreated: 1772187830
|
||||
@@ -0,0 +1,19 @@
|
||||
using UnityEngine;
|
||||
|
||||
namespace Code.Example.Platformer.Entity.Enemies
|
||||
{
|
||||
public class BoarRadar : MonoBehaviour
|
||||
{
|
||||
[SerializeField] private Boar boar;
|
||||
|
||||
private void OnTriggerEnter2D(Collider2D other)
|
||||
{
|
||||
boar.GotTarget(other.transform);
|
||||
}
|
||||
|
||||
private void OnTriggerExit2D(Collider2D other)
|
||||
{
|
||||
boar.LostTarget();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e0976ba0c1904671ac17f194f8694aa1
|
||||
timeCreated: 1772187891
|
||||
@@ -0,0 +1,32 @@
|
||||
using Code.Infrastructure.Configs;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Code.Example.Platformer.Entity.Enemies
|
||||
{
|
||||
public class Snail : Entity
|
||||
{
|
||||
[SerializeField] private Vector2 groundLeft;
|
||||
[SerializeField] private Vector2 groundRight;
|
||||
[SerializeField] private bool _directionRight;
|
||||
|
||||
protected override void Move()
|
||||
{
|
||||
CheckupDirection();
|
||||
rigidbody2D.linearVelocityX = _directionRight ? 0.5f : -0.5f;
|
||||
}
|
||||
protected override void HandleFlipX() => spriteRenderer.flipX = rigidbody2D.linearVelocity.x > -0.01f;
|
||||
|
||||
private void CheckupDirection()
|
||||
{
|
||||
if (_directionRight)
|
||||
{
|
||||
if (!Physics2D.OverlapPoint((Vector2)transform.position + groundRight,
|
||||
LayerMasks.Masks[LayerMaskType.PlatformerGround]))
|
||||
_directionRight = false;
|
||||
}
|
||||
else if (!Physics2D.OverlapPoint((Vector2)transform.position + groundLeft,
|
||||
LayerMasks.Masks[LayerMaskType.PlatformerGround]))
|
||||
_directionRight = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 4bb753139de944f69f426cbc1ec9ec92
|
||||
timeCreated: 1771430576
|
||||
@@ -0,0 +1,53 @@
|
||||
using System;
|
||||
using Code.Infrastructure.Configs;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Code.Example.Platformer.Entity
|
||||
{
|
||||
public abstract class Entity : MonoBehaviour
|
||||
{
|
||||
private static readonly int VelocityY = Animator.StringToHash("VelocityY");
|
||||
private static readonly int VelocityX = Animator.StringToHash("VelocityX");
|
||||
private static readonly int OnGround = Animator.StringToHash("OnGround");
|
||||
|
||||
[SerializeField] protected Rigidbody2D rigidbody2D;
|
||||
[SerializeField] protected Animator animator;
|
||||
[SerializeField] protected SpriteRenderer spriteRenderer;
|
||||
[SerializeField] private Vector2 groundPoint;
|
||||
|
||||
private PlatformerEntityData _data;
|
||||
|
||||
public void SetData(PlatformerEntityData data)
|
||||
{
|
||||
_data = data;
|
||||
}
|
||||
|
||||
protected bool onGround;
|
||||
|
||||
protected virtual void Update()
|
||||
{
|
||||
animator.SetFloat(VelocityX, rigidbody2D.linearVelocityX);
|
||||
animator.SetFloat(VelocityY, rigidbody2D.linearVelocityY);
|
||||
}
|
||||
|
||||
protected virtual void HandleFlipX() => spriteRenderer.flipX = rigidbody2D.linearVelocity.x < 0.01f;
|
||||
|
||||
protected virtual void FixedUpdate()
|
||||
{
|
||||
onGround = CheckGround();
|
||||
animator.SetBool(OnGround, onGround);
|
||||
|
||||
Move();
|
||||
|
||||
if(rigidbody2D.linearVelocity.x is > 0.01f or < -0.01f) HandleFlipX();
|
||||
}
|
||||
|
||||
protected virtual bool CheckGround()
|
||||
{
|
||||
UnityEngine.Debug.DrawLine(transform.position,(Vector2)transform.position + groundPoint, Color.green);
|
||||
return Physics2D.OverlapPoint((Vector2)transform.position + groundPoint, LayerMasks.Masks[LayerMaskType.PlatformerGround]);
|
||||
}
|
||||
|
||||
protected abstract void Move();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f4b8cd0fdb9e4c258acd1f5898f193d1
|
||||
timeCreated: 1770905992
|
||||
@@ -0,0 +1,26 @@
|
||||
using UnityEngine;
|
||||
|
||||
namespace Code.Example.Platformer.Entity
|
||||
{
|
||||
public class EntityHealth : MonoBehaviour
|
||||
{
|
||||
private int _health;
|
||||
private int _maxHealth;
|
||||
public void SetMaxHealth(int maxHealth) => _maxHealth = maxHealth;
|
||||
public bool IsDead { get; private set; }
|
||||
|
||||
public void GiveDamage(int damage)
|
||||
{
|
||||
_health -= damage;
|
||||
|
||||
if(_health <= 0) IsDead = true;
|
||||
}
|
||||
|
||||
public void Heal(int heal)
|
||||
{
|
||||
if (IsDead) return;
|
||||
if (_health + heal > _maxHealth) _health = _maxHealth;
|
||||
else _health += heal;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: a3078030faef42b5bddd46a7c5c91d95
|
||||
timeCreated: 1773058870
|
||||
@@ -0,0 +1,114 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Code.Infrastructure.Configs;
|
||||
using Code.Infrastructure.EventBus;
|
||||
using Cysharp.Threading.Tasks;
|
||||
using UnityEngine;
|
||||
using UnityEngine.AddressableAssets;
|
||||
using UnityEngine.ResourceManagement.AsyncOperations;
|
||||
|
||||
namespace Code.Example.Platformer.Entity
|
||||
{
|
||||
public interface IPlatformerEnemyFactory
|
||||
{
|
||||
UniTaskVoid WarmEnemy(PlatformerEntityType enemyType);
|
||||
void ReleaseEnemy(PlatformerEntityType racerType);
|
||||
|
||||
UniTaskVoid SpawnEnemy(
|
||||
PlatformerEntityType enemyType,
|
||||
Vector3 position);
|
||||
}
|
||||
|
||||
public class PlatformerEnemyFactory : IPlatformerEnemyFactory, IDisposable
|
||||
{
|
||||
private EventBus _eventBus;
|
||||
|
||||
private string _enemyConfigsLabel;
|
||||
private AsyncOperationHandle<IList<PlatformerEntitySettingsConfig>> _enemyConfigsHandle;
|
||||
private Dictionary<PlatformerEntityType, AsyncOperationHandle<GameObject>> _enemyPrefabsHandle = new();
|
||||
|
||||
private Dictionary<PlatformerEntityType, PlatformerEntitySettingsConfig> _enemyConfigs;
|
||||
|
||||
public PlatformerEnemyFactory(IConfigLocator configLocator, EventBus eventBus)
|
||||
{
|
||||
_eventBus = eventBus;
|
||||
_enemyConfigsLabel = configLocator.TryGetManyConfigAssetReferences<PlatformerEntitySettingsConfig>();
|
||||
|
||||
LoadConfigs().Forget();
|
||||
}
|
||||
|
||||
private async UniTaskVoid LoadConfigs()
|
||||
{
|
||||
_enemyConfigsHandle = Addressables.LoadAssetsAsync<PlatformerEntitySettingsConfig>(_enemyConfigsLabel);
|
||||
|
||||
await _enemyConfigsHandle.ToUniTask();
|
||||
|
||||
_enemyConfigs = _enemyConfigsHandle.Result.ToDictionary(x => x.EntityData.type);
|
||||
|
||||
_eventBus.RaiseEvent<IPlatformerEnemyFactoryInitializedHandle>(x => x.PlatformerEnemyFactoryInitialized());
|
||||
}
|
||||
|
||||
public async UniTaskVoid WarmEnemy(PlatformerEntityType enemyType)
|
||||
{
|
||||
if (enemyType == PlatformerEntityType.Player) return;
|
||||
|
||||
if (_enemyPrefabsHandle.ContainsKey(enemyType))
|
||||
{
|
||||
_eventBus.RaiseEvent<IPlatformerEnemyLoadedHandle>(x => x.PlatformerEnemyLoaded(enemyType, null));
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
UnityEngine.Debug.LogWarning($"Enemy loaded {enemyType}");
|
||||
_enemyPrefabsHandle.Add(enemyType,
|
||||
Addressables.LoadAssetAsync<GameObject>(_enemyConfigs[enemyType].prefabReference));
|
||||
|
||||
await _enemyPrefabsHandle[enemyType].ToUniTask();
|
||||
|
||||
var entity = _enemyPrefabsHandle[enemyType].Result.GetComponent<Entity>();
|
||||
entity.SetData(_enemyConfigs[enemyType].EntityData);
|
||||
|
||||
var health = _enemyPrefabsHandle[enemyType].Result.GetComponent<EntityHealth>();
|
||||
health.SetMaxHealth(_enemyConfigs[enemyType].EntityData.maxHealth);
|
||||
|
||||
_eventBus.RaiseEvent<IPlatformerEnemyLoadedHandle>(x => x.PlatformerEnemyLoaded(enemyType, entity));
|
||||
}
|
||||
|
||||
public void ReleaseEnemy(PlatformerEntityType racerType)
|
||||
{
|
||||
_enemyPrefabsHandle[racerType].Release();
|
||||
_enemyPrefabsHandle.Remove(racerType);
|
||||
}
|
||||
|
||||
public async UniTaskVoid SpawnEnemy(
|
||||
PlatformerEntityType enemyType,
|
||||
Vector3 position)
|
||||
{
|
||||
if (enemyType == PlatformerEntityType.Player) return;
|
||||
|
||||
await Addressables.InstantiateAsync(_enemyConfigs[enemyType].prefabReference, position, Quaternion.identity);
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
UnityEngine.Debug.LogWarning($"Enemies released");
|
||||
foreach (var prefab in _enemyPrefabsHandle)
|
||||
prefab.Value.Release();
|
||||
|
||||
_enemyPrefabsHandle.Clear();
|
||||
|
||||
_enemyConfigsHandle.Release();
|
||||
}
|
||||
}
|
||||
|
||||
public interface IPlatformerEnemyFactoryInitializedHandle : IGlobalSubscriber
|
||||
{
|
||||
public void PlatformerEnemyFactoryInitialized();
|
||||
}
|
||||
|
||||
public interface IPlatformerEnemyLoadedHandle : IGlobalSubscriber
|
||||
{
|
||||
public void PlatformerEnemyLoaded(PlatformerEntityType type, Entity entity);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 49fd97d8a6464d3e86d6ea215949d1f5
|
||||
timeCreated: 1771423258
|
||||
@@ -0,0 +1,37 @@
|
||||
using System;
|
||||
using Code.Infrastructure.Generators;
|
||||
using UnityEngine.AddressableAssets;
|
||||
|
||||
namespace Code.Example.Platformer.Entity
|
||||
{
|
||||
|
||||
[Serializable]
|
||||
public struct PlatformerEntityData
|
||||
{
|
||||
public string name;
|
||||
public float speed;
|
||||
public float acceleration;
|
||||
public int damage;
|
||||
public PlatformerEntityType type;
|
||||
public int maxHealth;
|
||||
}
|
||||
|
||||
public enum PlatformerEntityType
|
||||
{
|
||||
Player,
|
||||
Boar,
|
||||
Bee,
|
||||
Snail
|
||||
}
|
||||
[Config("Configs/Gameplay/Platformer/EntitySettings", true)]
|
||||
public class PlatformerEntitySettings
|
||||
{
|
||||
[ToConfig] public PlatformerEntityData EntityData;
|
||||
|
||||
[ToConfig] public AssetReference prefabReference;
|
||||
}
|
||||
|
||||
[Config("", false, true)]
|
||||
public class PlatformerPlayerSettings
|
||||
{ }
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 6116fb7cbe9c49a9863b83f85375096a
|
||||
timeCreated: 1773066580
|
||||
@@ -0,0 +1,106 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Code.Infrastructure.Configs;
|
||||
using Code.Infrastructure.EventBus;
|
||||
using Cysharp.Threading.Tasks;
|
||||
using Reflex.Core;
|
||||
using Reflex.Injectors;
|
||||
using UnityEngine;
|
||||
using UnityEngine.AddressableAssets;
|
||||
using UnityEngine.ResourceManagement.AsyncOperations;
|
||||
using UnityEngine.SceneManagement;
|
||||
|
||||
namespace Code.Example.Platformer.Entity
|
||||
{
|
||||
public interface IPlatformerPlayerFactory
|
||||
{
|
||||
UniTaskVoid LoadPlayer();
|
||||
void ReleasePlayer();
|
||||
|
||||
UniTaskVoid SpawnPlayer(Vector3 position);
|
||||
}
|
||||
|
||||
public class PlatformerPlayerFactory : IPlatformerPlayerFactory, IDisposable
|
||||
{
|
||||
private EventBus _eventBus;
|
||||
|
||||
private AssetReference _playerConfigReference;
|
||||
private AsyncOperationHandle<PlatformerEntitySettingsConfig> _playerConfigHandle;
|
||||
private AsyncOperationHandle<GameObject> _playerPrefabHandle;
|
||||
|
||||
private PlatformerEntitySettingsConfig _playerConfig;
|
||||
|
||||
public PlatformerPlayerFactory(IConfigLocator configLocator, EventBus eventBus)
|
||||
{
|
||||
_eventBus = eventBus;
|
||||
_playerConfigReference = configLocator.TryGetConfigAssetReference<PlatformerPlayerSettingsConfig>();
|
||||
|
||||
LoadConfigs().Forget();
|
||||
}
|
||||
|
||||
private async UniTaskVoid LoadConfigs()
|
||||
{
|
||||
_playerConfigHandle = Addressables.LoadAssetAsync<PlatformerEntitySettingsConfig>(_playerConfigReference);
|
||||
|
||||
await _playerConfigHandle.ToUniTask();
|
||||
|
||||
_playerConfig = _playerConfigHandle.Result;
|
||||
|
||||
_eventBus.RaiseEvent<IPlatformerPlayerFactoryInitializedHandle>(x => x.PlatformerPlayerFactoryInitialized());
|
||||
}
|
||||
|
||||
public async UniTaskVoid LoadPlayer()
|
||||
{
|
||||
if (_playerPrefabHandle.IsValid())
|
||||
{
|
||||
_eventBus.RaiseEvent<IPlatformerPlayerLoadedHandle>(x => x.PlatformerPlayerLoaded());
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
UnityEngine.Debug.LogWarning($"Player loaded");
|
||||
_playerPrefabHandle = Addressables.LoadAssetAsync<GameObject>(_playerConfig.prefabReference);
|
||||
|
||||
await _playerPrefabHandle.ToUniTask();
|
||||
var racer = _playerPrefabHandle.Result.GetComponent<Entity>();
|
||||
racer.SetData(_playerConfig.EntityData);
|
||||
|
||||
_eventBus.RaiseEvent<IPlatformerPlayerLoadedHandle>(x => x.PlatformerPlayerLoaded());
|
||||
}
|
||||
|
||||
public void ReleasePlayer()
|
||||
{
|
||||
_playerPrefabHandle.Release();
|
||||
}
|
||||
|
||||
public async UniTaskVoid SpawnPlayer(Vector3 position)
|
||||
{
|
||||
var player = await Addressables.InstantiateAsync(_playerConfig.prefabReference, position, Quaternion.identity).ToUniTask();
|
||||
GameObjectInjector.InjectObject(player, Container.RootContainer); // TODO САМОЕ НЕСТАБИЛЬНОЕ ДЕРЬМО ВО ВСЕЛЕННОЙ КОНТЕЙНЕР ДОЛЖЕН БЫТЬ КОНТЕКСТНЫМ
|
||||
_eventBus.RaiseEvent<IPlatformerPlayerSpawnedHandle>(x => x.PlatformerPlayerSpawned(player.GetComponent<Entity>()));
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
UnityEngine.Debug.LogWarning($"Enemies released");
|
||||
_playerPrefabHandle.Release();
|
||||
|
||||
_playerConfigHandle.Release();
|
||||
}
|
||||
}
|
||||
|
||||
public interface IPlatformerPlayerFactoryInitializedHandle : IGlobalSubscriber
|
||||
{
|
||||
public void PlatformerPlayerFactoryInitialized();
|
||||
}
|
||||
|
||||
public interface IPlatformerPlayerLoadedHandle : IGlobalSubscriber
|
||||
{
|
||||
public void PlatformerPlayerLoaded();
|
||||
}
|
||||
public interface IPlatformerPlayerSpawnedHandle : IGlobalSubscriber
|
||||
{
|
||||
public void PlatformerPlayerSpawned(Entity entity);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 70a3deb8fbb44749b5aeea7b3997a459
|
||||
timeCreated: 1773136472
|
||||
@@ -0,0 +1,109 @@
|
||||
using Code.Infrastructure.Audio;
|
||||
using Code.Infrastructure.Camera;
|
||||
using Code.Infrastructure.Configs;
|
||||
using Code.Infrastructure.Input;
|
||||
using Reflex.Attributes;
|
||||
using UnityEngine;
|
||||
using UnityEngine.InputSystem;
|
||||
|
||||
namespace Code.Example.Platformer.Entity
|
||||
{
|
||||
public class PlayerEntity : Entity
|
||||
{
|
||||
private static readonly int OnAttack = Animator.StringToHash("OnAttack");
|
||||
private IInputService _inputService;
|
||||
|
||||
[Inject]
|
||||
private void Construct(IInputService inputService, IAudioService audioService)
|
||||
{
|
||||
_audioService = audioService;
|
||||
|
||||
_inputService = inputService;
|
||||
_inputService.BindActionPerformed((int)ActionMappings.Platformer, (int)PlatformerActions.Move,
|
||||
MovementPerformed);
|
||||
_inputService.BindActionCancelled((int)ActionMappings.Platformer, (int)PlatformerActions.Move,
|
||||
MovementCancelled);
|
||||
_inputService.BindActionPerformed((int)ActionMappings.Platformer, (int)PlatformerActions.Jump, JumpPerformed);
|
||||
_inputService.BindActionPerformed((int)ActionMappings.Platformer, (int)PlatformerActions.Attack, AttackPerformed);
|
||||
_inputService.BindActionPerformed((int)ActionMappings.Platformer, (int)PlatformerActions.Sprint, SprintPerformed);
|
||||
_inputService.BindActionCancelled((int)ActionMappings.Platformer, (int)PlatformerActions.Sprint, SprintCancelled);
|
||||
|
||||
//cameraFactory.GetCinematicCamera(CameraMode.Platformer).Follow = transform; , CameraFactory cameraFactory
|
||||
}
|
||||
|
||||
private void OnDestroy()
|
||||
{
|
||||
_inputService.UnbindActionPerformed((int)ActionMappings.Platformer, (int)PlatformerActions.Move,
|
||||
MovementPerformed);
|
||||
_inputService.UnbindActionCancelled((int)ActionMappings.Platformer, (int)PlatformerActions.Move,
|
||||
MovementCancelled);
|
||||
_inputService.UnbindActionPerformed((int)ActionMappings.Platformer, (int)PlatformerActions.Jump, JumpPerformed);
|
||||
_inputService.UnbindActionPerformed((int)ActionMappings.Platformer, (int)PlatformerActions.Attack, AttackPerformed);
|
||||
_inputService.UnbindActionPerformed((int)ActionMappings.Platformer, (int)PlatformerActions.Sprint, SprintPerformed);
|
||||
_inputService.UnbindActionCancelled((int)ActionMappings.Platformer, (int)PlatformerActions.Sprint, SprintCancelled);
|
||||
}
|
||||
|
||||
private float _acceleration = 1f;
|
||||
|
||||
protected override void Move()
|
||||
{
|
||||
rigidbody2D.linearVelocityX = _moveDirection.x * 2f * _acceleration;
|
||||
}
|
||||
|
||||
private Vector2 _moveDirection;
|
||||
private IAudioService _audioService;
|
||||
|
||||
private void MovementPerformed(InputAction.CallbackContext callbackContext) =>
|
||||
_moveDirection = callbackContext.ReadValue<Vector2>();
|
||||
|
||||
private void MovementCancelled(InputAction.CallbackContext callbackContext) =>
|
||||
_moveDirection = Vector2.zero;
|
||||
|
||||
private void JumpPerformed(InputAction.CallbackContext callbackContext)
|
||||
{
|
||||
if (!onGround) return;
|
||||
rigidbody2D.AddForceY(100f);
|
||||
|
||||
_acceleration = 1f;
|
||||
}
|
||||
|
||||
[SerializeField] private Vector2 attackOffset;
|
||||
|
||||
private void AttackPerformed(InputAction.CallbackContext callbackContext)
|
||||
{
|
||||
if (!onGround) return;
|
||||
//
|
||||
|
||||
//
|
||||
_audioService.PlayOneShot(AudioNames.UISounds, 1);
|
||||
animator.SetBool(OnAttack, true);
|
||||
}
|
||||
|
||||
public void CastAttack()
|
||||
{
|
||||
var damagedOnes =
|
||||
Physics2D.OverlapPointAll((Vector2)transform.position + attackOffset, LayerMasks.Masks[LayerMaskType.PlatformerEnemy]);
|
||||
|
||||
if (damagedOnes == null) return;
|
||||
|
||||
foreach (var damaged in damagedOnes)
|
||||
{
|
||||
damaged.gameObject.GetComponent<EntityHealth>().GiveDamage(1);
|
||||
_audioService.PlayOneShot(AudioNames.UISounds, 2);
|
||||
}
|
||||
}
|
||||
|
||||
private void SprintPerformed(InputAction.CallbackContext callbackContext)
|
||||
{
|
||||
if (!onGround) return;
|
||||
//
|
||||
_acceleration = 3f;
|
||||
}
|
||||
private void SprintCancelled(InputAction.CallbackContext callbackContext)
|
||||
{
|
||||
_acceleration = 1f;
|
||||
}
|
||||
|
||||
public void AttackEnd() => animator.SetBool(OnAttack, false);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 6d5abb60d772491cbad21bb3a3689054
|
||||
timeCreated: 1770908525
|
||||
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 50745373fe25451191a647170efe16d9
|
||||
timeCreated: 1773067033
|
||||
@@ -0,0 +1,13 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Code.Example.Platformer.Level
|
||||
{
|
||||
[Serializable]
|
||||
public struct PlatformerFirstLevelData
|
||||
{
|
||||
[SerializeField] public List<Transform> enemySpawnPoints;
|
||||
[SerializeField] public List<Transform> playerCheckPoints;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 23a7f57640a141dc866ceb89058c2f71
|
||||
timeCreated: 1773067046
|
||||
@@ -0,0 +1,16 @@
|
||||
using UnityEngine;
|
||||
|
||||
namespace Code.Example.Platformer
|
||||
{
|
||||
public class PlatformerSceneData : MonoBehaviour
|
||||
{
|
||||
public Transform Player;
|
||||
public LevelData levelData;
|
||||
}
|
||||
|
||||
[System.Serializable]
|
||||
public struct LevelData
|
||||
{
|
||||
// public List<Transform> enemyPoints;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: fdfd83cbde8f4fbd97802ac19f2f32e5
|
||||
timeCreated: 1771423037
|
||||
@@ -0,0 +1,72 @@
|
||||
using System;
|
||||
using Code.Example.Platformer.Entity;
|
||||
using Code.Example.Platformer.Level;
|
||||
using Code.Infrastructure.EventBus;
|
||||
using Code.Infrastructure.Loadings;
|
||||
using Code.Infrastructure.SceneLoader;
|
||||
using Reflex.Core;
|
||||
using Reflex.Enums;
|
||||
using UnityEngine;
|
||||
using Resolution = Reflex.Enums.Resolution;
|
||||
|
||||
namespace Code.Example.Platformer
|
||||
{
|
||||
public class PlatformerEnemySceneInstaller :
|
||||
MonoBehaviour,
|
||||
IInstaller,
|
||||
IPlatformerEnemyFactoryInitializedHandle,
|
||||
IPlatformerPlayerFactoryInitializedHandle,
|
||||
IDisposable
|
||||
{
|
||||
// [SerializeField] private PlatformerCanvas gameplayPlatformerCanvas;
|
||||
[SerializeField] private PlatformerFirstLevelData firstLevelData;
|
||||
|
||||
private Loading _sceneInit;
|
||||
|
||||
private void LoadingComplete()
|
||||
{
|
||||
_container.Resolve<EventBus>()
|
||||
.RaiseEvent<IOnPlatformerSceneLoadedHandler>(x => x.OnPlatformerSceneInitialized(_container));
|
||||
}
|
||||
|
||||
public void InstallBindings(ContainerBuilder containerBuilder)
|
||||
{
|
||||
// Enemies
|
||||
// Player
|
||||
// Container
|
||||
_sceneInit = new(3, LoadingComplete);
|
||||
|
||||
// containerBuilder.RegisterValue(gameplayPlatformerCanvas);
|
||||
containerBuilder.Parent.Resolve<EventBus>().Subscribe(this);
|
||||
|
||||
containerBuilder.RegisterValue(firstLevelData);
|
||||
containerBuilder.RegisterType(typeof(PlatformerEnemyFactory), new []{typeof(IPlatformerEnemyFactory)}, Lifetime.Scoped, Resolution.Eager);
|
||||
containerBuilder.RegisterType(typeof(PlatformerPlayerFactory), new []{typeof(IPlatformerPlayerFactory)}, Lifetime.Scoped, Resolution.Eager);
|
||||
containerBuilder.OnContainerBuilt += OnContainerBuild;
|
||||
}
|
||||
private Container _container;
|
||||
private void OnContainerBuild(Container container)
|
||||
{
|
||||
// gameplayPlatformerCanvas.GameplayPlatformerCanvas.worldCamera =
|
||||
// container.Resolve<CameraStateMachineContext>().cameraLoadedData.Camera;
|
||||
|
||||
_container = container;
|
||||
_sceneInit.DoProgress();
|
||||
}
|
||||
|
||||
public void PlatformerEnemyFactoryInitialized()
|
||||
{
|
||||
_sceneInit.DoProgress();
|
||||
}
|
||||
|
||||
public void PlatformerPlayerFactoryInitialized()
|
||||
{
|
||||
_sceneInit.DoProgress();
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
_container.Resolve<EventBus>().Unsubscribe(this);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 0aa23aea61d74467889be39a550c9922
|
||||
timeCreated: 1770736749
|
||||
@@ -0,0 +1,125 @@
|
||||
using Code.Example.Platformer.Entity;
|
||||
using Code.Example.Platformer.Level;
|
||||
using Code.Infrastructure.App;
|
||||
using Code.Infrastructure.Audio;
|
||||
using Code.Infrastructure.Camera;
|
||||
using Code.Infrastructure.EventBus;
|
||||
using Code.Infrastructure.Generators;
|
||||
using Code.Infrastructure.Input;
|
||||
using Code.Infrastructure.Loadings;
|
||||
using Code.Infrastructure.SceneLoader;
|
||||
using Code.Infrastructure.UI;
|
||||
using Reflex.Core;
|
||||
using Unity.Cinemachine;
|
||||
using UnityEngine.SceneManagement;
|
||||
|
||||
namespace Code.Example.Platformer
|
||||
{
|
||||
[State(typeof(AppStates),typeof(AppStateMachineContext))]
|
||||
[StateRaisingEvent]
|
||||
public partial class PlatformerState :
|
||||
IOnPlatformerSceneLoadedHandler,
|
||||
ICinematicMachineHandle,
|
||||
IPlatformerEnemyLoadedHandle,
|
||||
IPlatformerPlayerLoadedHandle,
|
||||
IPlatformerPlayerSpawnedHandle
|
||||
{
|
||||
public PlatformerState(AppStateMachineContext context, EventBus eventBus) : base(context, eventBus)
|
||||
{
|
||||
}
|
||||
|
||||
public override AppStates myState => AppStates.Platformer;
|
||||
protected override void OnEnterState()
|
||||
{
|
||||
EventBus.Subscribe(this);
|
||||
|
||||
// Scene
|
||||
// Camera
|
||||
// Enemy snail
|
||||
// Enemy bee
|
||||
// Enemy boar
|
||||
// Player
|
||||
_loading = new(6, LoadingCompleted);
|
||||
|
||||
Context.UIService.OpenPanel(UIPanelType.Loading);
|
||||
Context.SceneLoader.LoadSceneAsync(SceneId.Platformer, LoadSceneMode.Single).Forget();
|
||||
Context.InputService.EnableMap(ActionMappings.Platformer);
|
||||
Context.CameraFactory.LoadCinemachineCamera(CameraMode.Platformer).Forget();
|
||||
}
|
||||
private Loading _loading;
|
||||
|
||||
private void LoadingCompleted()
|
||||
{
|
||||
Context.AudioService.CancelMusic(AudioNames.UISounds,0);
|
||||
Context.UIService.ClosePanel(UIPanelType.Loading);
|
||||
|
||||
_enemyFactory.SpawnEnemy(PlatformerEntityType.Snail, _firstLevelData.enemySpawnPoints[0].position);
|
||||
|
||||
_playerFactory.SpawnPlayer(_firstLevelData.playerCheckPoints[0].position);
|
||||
}
|
||||
|
||||
|
||||
protected override void OnExitState()
|
||||
{
|
||||
_enemyFactory.ReleaseEnemy(PlatformerEntityType.Bee);
|
||||
_enemyFactory.ReleaseEnemy(PlatformerEntityType.Snail);
|
||||
_enemyFactory.ReleaseEnemy(PlatformerEntityType.Boar);
|
||||
|
||||
_playerFactory.ReleasePlayer();
|
||||
|
||||
Context.CameraFactory.ReleaseCinemachineCamera(CameraMode.Platformer);
|
||||
EventBus.Unsubscribe(this);
|
||||
Context.InputService.DisableMap(ActionMappings.Platformer);
|
||||
}
|
||||
|
||||
public void OnPlatformerSceneLoaded()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
private IPlatformerEnemyFactory _enemyFactory;
|
||||
private IPlatformerPlayerFactory _playerFactory;
|
||||
private PlatformerFirstLevelData _firstLevelData;
|
||||
|
||||
private Container _fixdamncontainer;
|
||||
|
||||
public void OnPlatformerSceneInitialized(Container container)
|
||||
{
|
||||
_fixdamncontainer = container;
|
||||
_firstLevelData = container.Resolve<PlatformerFirstLevelData>();
|
||||
_enemyFactory = container.Resolve<IPlatformerEnemyFactory>();
|
||||
|
||||
_enemyFactory.WarmEnemy(PlatformerEntityType.Bee);
|
||||
_enemyFactory.WarmEnemy(PlatformerEntityType.Boar);
|
||||
_enemyFactory.WarmEnemy(PlatformerEntityType.Snail);
|
||||
|
||||
_playerFactory = container.Resolve<IPlatformerPlayerFactory>();
|
||||
|
||||
_playerFactory.LoadPlayer();
|
||||
|
||||
_loading.DoProgress();
|
||||
}
|
||||
|
||||
|
||||
|
||||
public void CinemachineLoaded(CinemachineCamera cinemachineCamera)
|
||||
{
|
||||
_loading.DoProgress();
|
||||
}
|
||||
|
||||
public void PlatformerEnemyLoaded(PlatformerEntityType type, Entity.Entity entity)
|
||||
{
|
||||
if(entity) _loading.DoProgress();
|
||||
}
|
||||
|
||||
public void PlatformerPlayerLoaded()
|
||||
{
|
||||
_loading.DoProgress();
|
||||
}
|
||||
|
||||
public void PlatformerPlayerSpawned(Entity.Entity entity)
|
||||
{
|
||||
Context.CameraFactory.GetCinematicCamera(CameraMode.Platformer).Follow = entity.transform;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 823e3299b52c48a8869581e7c27ef9a8
|
||||
timeCreated: 1770736342
|
||||
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: b5da862624174a36ac3ace9058b79513
|
||||
timeCreated: 1770737039
|
||||
@@ -0,0 +1,10 @@
|
||||
using UnityEngine;
|
||||
|
||||
namespace Code.Example.Platformer.UI
|
||||
{
|
||||
public class PlatformerCanvas : MonoBehaviour
|
||||
{
|
||||
[SerializeField] private Canvas gameplayPlatformerCanvas;
|
||||
public Canvas GameplayPlatformerCanvas => gameplayPlatformerCanvas;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 964ac33334f64f8d917b153e9890e155
|
||||
timeCreated: 1770737062
|
||||
@@ -0,0 +1,65 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using Newtonsoft.Json;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Code.Example.Race
|
||||
{
|
||||
public class PlayerPrefsRacePoopshitter
|
||||
{
|
||||
private List<RaceData> _races = new();
|
||||
|
||||
public PlayerPrefsRacePoopshitter()
|
||||
{
|
||||
GetRaces();
|
||||
}
|
||||
public List<RaceData> GetRaces()
|
||||
{
|
||||
var path = Path.Combine(Application.persistentDataPath,"raceData.json");
|
||||
|
||||
using (StreamReader reader = new(path))
|
||||
{
|
||||
var json = reader.ReadToEnd();
|
||||
|
||||
_races = JsonConvert.DeserializeObject<List<RaceData>>(json);
|
||||
}
|
||||
|
||||
// for (int i = 0; i < _raceCount; i++)
|
||||
// races.Add(new(
|
||||
// PlayerPrefs.GetFloat($"Race{i}"),
|
||||
// PlayerPrefs.GetInt($"Place{i}")));
|
||||
|
||||
return _races;
|
||||
}
|
||||
|
||||
public void AddRace(RaceData race)
|
||||
{
|
||||
// PlayerPrefs.SetFloat($"Race{_raceCount}", race.raceTimeSeconds);
|
||||
// PlayerPrefs.SetInt($"Place{_raceCount}", race.place);
|
||||
// PlayerPrefs.SetInt("RaceCount", ++_raceCount);
|
||||
|
||||
_races.Add(race);
|
||||
|
||||
var json = JsonConvert.SerializeObject(_races, Formatting.Indented);
|
||||
|
||||
var path = Path.Combine(Application.persistentDataPath,"raceData.json");
|
||||
|
||||
using (StreamWriter writer = new(path))
|
||||
{
|
||||
writer.Write(json);
|
||||
}
|
||||
}
|
||||
}
|
||||
[Serializable]
|
||||
public struct RaceData
|
||||
{
|
||||
public float raceTimeSeconds;
|
||||
public int place;
|
||||
public RaceData(float raceTimeSeconds, int place)
|
||||
{
|
||||
this.raceTimeSeconds = raceTimeSeconds;
|
||||
this.place = place;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e984eddc1697449487c9a790345dfb0b
|
||||
timeCreated: 1770653240
|
||||
@@ -4,7 +4,8 @@ using System.Linq;
|
||||
using Code.Example.Race.Racer;
|
||||
using Code.Example.Race.Track;
|
||||
using Code.Infrastructure.EventBus;
|
||||
using Code.Infrastructure.Loadings;
|
||||
using Code.Infrastructure.Loadings;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Code.Example.Race
|
||||
{
|
||||
@@ -28,8 +29,12 @@ namespace Code.Example.Race
|
||||
RandomizeRacers(raceTrackData.trackData.RacerPoints.Count);
|
||||
}
|
||||
|
||||
private float _timeStart;
|
||||
public float RaceTime => Time.time - _timeStart;
|
||||
|
||||
public void StartRacers()
|
||||
{
|
||||
_timeStart = Time.time;
|
||||
foreach (var racer in PlacedRacers)
|
||||
{
|
||||
racer.StartRacer();
|
||||
|
||||
@@ -8,5 +8,29 @@ namespace Code.Example.Race.Racer.AI
|
||||
{
|
||||
SteeringInput = steeringLinear;
|
||||
}
|
||||
|
||||
protected override void Brake()
|
||||
{
|
||||
if (CarRb.linearVelocity.magnitude > 10f && (SteeringInput.y > CarRb.linearVelocity.y || SteeringInput.x > CarRb.linearVelocity.x))
|
||||
{
|
||||
foreach (var wheel in wheels)
|
||||
{
|
||||
wheel.wheelCollider.brakeTorque = 100 * racer.Data.brakeAcceleration * Time.fixedDeltaTime;
|
||||
}
|
||||
|
||||
// carLights.isBackLightOn = true;
|
||||
// carLights.OperateBackLights();
|
||||
}
|
||||
else
|
||||
{
|
||||
foreach (var wheel in wheels)
|
||||
{
|
||||
wheel.wheelCollider.brakeTorque = 0;
|
||||
}
|
||||
|
||||
// carLights.isBackLightOn = false;
|
||||
// carLights.OperateBackLights();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -11,6 +11,7 @@ namespace Code.Example.Race.Racer.AI
|
||||
{
|
||||
[Inject] private EventBus _eventBus;
|
||||
[SerializeField] private CarControllerRB carController;
|
||||
|
||||
public override void SetData(RacerData data)
|
||||
{
|
||||
Data = data;
|
||||
|
||||
@@ -10,7 +10,7 @@ namespace Code.Example.Race.Racer.AI.ID.Behaviours
|
||||
|
||||
steering.linear = transform.position - target.position;
|
||||
steering.linear.Normalize();
|
||||
steering.linear *= agent.Data.maxAcceleration;
|
||||
// steering.linear *= agent.Data.maxAcceleration;
|
||||
return steering;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,42 @@
|
||||
using UnityEngine;
|
||||
using System.Collections;
|
||||
|
||||
namespace Code.Example.Race.Racer.AI.ID.Behaviours
|
||||
{
|
||||
|
||||
public class Pursue : Seek
|
||||
{
|
||||
public float maxPrediction;
|
||||
private GameObject _targetAux;
|
||||
private GameObject _target;
|
||||
|
||||
public void Awake()
|
||||
{
|
||||
_targetAux = _target;
|
||||
_target = new GameObject();
|
||||
}
|
||||
|
||||
void OnDestroy()
|
||||
{
|
||||
Destroy(_targetAux);
|
||||
}
|
||||
|
||||
public override Steering GetSteering(Transform targetTransform)
|
||||
{
|
||||
var direction = _targetAux.transform.position - transform.position;
|
||||
var distance = direction.magnitude;
|
||||
var speed = agent.CarRigidbody.linearVelocity.magnitude;
|
||||
float prediction;
|
||||
|
||||
if (speed <= distance / maxPrediction)
|
||||
prediction = maxPrediction;
|
||||
else
|
||||
prediction = distance / speed;
|
||||
|
||||
_target.transform.position = _targetAux.transform.position;
|
||||
// _target.transform.position += targetAgent.velocity * prediction;
|
||||
|
||||
return base.GetSteering(_target.transform);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: c3a071d2cab443528dd16bdc044bab65
|
||||
timeCreated: 1770998212
|
||||
@@ -11,8 +11,7 @@ namespace Code.Example.Race.Racer.AI.ID.Behaviours
|
||||
steering.linear = target.position - transform.position;
|
||||
UnityEngine.Debug.DrawRay(transform.position, steering.linear, Color.yellow, 5f);
|
||||
// steering.linear *= agent.Data.maxAcceleration;
|
||||
steering.linear.Normalize();
|
||||
UnityEngine.Debug.Log(steering.linear);
|
||||
steering.linear.Normalize();
|
||||
return steering;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using DG.Tweening;
|
||||
using PrimeTween;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Code.Example.Race.Racer.Car
|
||||
@@ -15,7 +15,7 @@ namespace Code.Example.Race.Racer.Car
|
||||
{
|
||||
var wheelRotation = wheel.localRotation.eulerAngles;
|
||||
wheelRotation.y = amount;
|
||||
wheel.DOLocalRotate(wheelRotation, 1f);
|
||||
Tween.LocalRotation(wheel,wheelRotation, 1f);
|
||||
// wheel.localRotation = Quaternion.Euler(wheelRotation);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -34,7 +34,7 @@ namespace Code.Example.Race.Racer
|
||||
|
||||
public List<Wheel> wheels;
|
||||
|
||||
protected Rigidbody CarRb;
|
||||
protected Rigidbody CarRb;
|
||||
|
||||
protected Vector2 SteeringInput = Vector2.zero;
|
||||
public abstract void SetSteering(Vector2 steeringLinear);
|
||||
|
||||
@@ -15,10 +15,10 @@ namespace Code.Example.Race.Racer.Player
|
||||
public void Construct(IInputService inputService)
|
||||
{
|
||||
_inputService = inputService;
|
||||
_inputService.BindActionPerformed((int)ActionMappings.Gameplay, (int)GameplayActions.Move, MovementPerformed);
|
||||
_inputService.BindActionCancel((int)ActionMappings.Gameplay, (int)GameplayActions.Move, MovementEnded);
|
||||
_inputService.BindActionPerformed((int)ActionMappings.Gameplay, (int)GameplayActions.Brake, BrakePerformed);
|
||||
_inputService.BindActionCancel((int)ActionMappings.Gameplay, (int)GameplayActions.Brake, BrakeEnded);
|
||||
_inputService.BindActionPerformed((int)ActionMappings.Race, (int)RaceActions.Move, MovementPerformed);
|
||||
_inputService.BindActionCancelled((int)ActionMappings.Race, (int)RaceActions.Move, MovementEnded);
|
||||
_inputService.BindActionPerformed((int)ActionMappings.Race, (int)RaceActions.Brake, BrakePerformed);
|
||||
_inputService.BindActionCancelled((int)ActionMappings.Race, (int)RaceActions.Brake, BrakeEnded);
|
||||
}
|
||||
|
||||
private void MovementPerformed(InputAction.CallbackContext context) => MovementInput = context.ReadValue<Vector2>();
|
||||
@@ -32,10 +32,10 @@ namespace Code.Example.Race.Racer.Player
|
||||
private void OnDestroy()
|
||||
{
|
||||
if (_inputService == null) return;
|
||||
_inputService.UnbindActionPerformed((int)ActionMappings.Gameplay, (int)GameplayActions.Move, MovementPerformed);
|
||||
_inputService.UnbindActionCanceled((int)ActionMappings.Gameplay, (int)GameplayActions.Move, MovementEnded);
|
||||
_inputService.UnbindActionPerformed((int)ActionMappings.Gameplay, (int)GameplayActions.Brake, BrakePerformed);
|
||||
_inputService.UnbindActionCanceled((int)ActionMappings.Gameplay, (int)GameplayActions.Brake, BrakeEnded);
|
||||
_inputService.UnbindActionPerformed((int)ActionMappings.Race, (int)RaceActions.Move, MovementPerformed);
|
||||
_inputService.UnbindActionCancelled((int)ActionMappings.Race, (int)RaceActions.Move, MovementEnded);
|
||||
_inputService.UnbindActionPerformed((int)ActionMappings.Race, (int)RaceActions.Brake, BrakePerformed);
|
||||
_inputService.UnbindActionCancelled((int)ActionMappings.Race, (int)RaceActions.Brake, BrakeEnded);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -8,7 +8,7 @@ using UnityEngine;
|
||||
|
||||
namespace Code.Example.Race.UI
|
||||
{
|
||||
public class PlayerScoreCounter : UIPanel, IScoreChangedHandle
|
||||
public partial class PlayerScoreCounter : UIPanel, IScoreChangedHandle
|
||||
{
|
||||
[SerializeField] private TMP_Text playerScore;
|
||||
private EventBus _eventBus;
|
||||
|
||||
@@ -0,0 +1,40 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Code.Infrastructure.UI;
|
||||
using PrimeTween;
|
||||
using TMPro;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
|
||||
namespace Code.Example.Race.UI
|
||||
{
|
||||
public partial class PlayerScores : UIPanel
|
||||
{
|
||||
[SerializeField] private Image image;
|
||||
[SerializeField] private TMP_Text scoreText;
|
||||
[SerializeField] private Color shownColor;
|
||||
[SerializeField] private Color hiddenColor;
|
||||
|
||||
public void SetText(List<RaceData> scores)
|
||||
{
|
||||
scoreText.text = "";
|
||||
foreach (var score in scores)
|
||||
{
|
||||
var t = TimeSpan.FromSeconds(score.raceTimeSeconds);
|
||||
scoreText.text += $@"{score.place} место за {t:mm\:ss\:fff}\n";
|
||||
}
|
||||
}
|
||||
public override void Open(Action callback = null)
|
||||
{
|
||||
Tween.Color(image,shownColor, 1f);
|
||||
Tween.Color(scoreText,shownColor, 1f).OnComplete( () => callback?.Invoke());
|
||||
}
|
||||
|
||||
public override void Close(Action callback = null)
|
||||
{
|
||||
Tween.Color(image,hiddenColor, 1f);
|
||||
Tween.Color(scoreText,hiddenColor, 1f).OnComplete( () => callback?.Invoke());
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 250fd47281f3493e86590f89511bba17
|
||||
timeCreated: 1770654299
|
||||
@@ -1,13 +1,13 @@
|
||||
using System;
|
||||
using Code.Infrastructure.UI;
|
||||
using DG.Tweening;
|
||||
using PrimeTween;
|
||||
using TMPro;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
|
||||
namespace Code.Example.Race.UI
|
||||
{
|
||||
public class WinScreen : UIPanel
|
||||
public partial class WinScreen : UIPanel
|
||||
{
|
||||
[SerializeField] private Image image;
|
||||
[SerializeField] private TMP_Text winText;
|
||||
@@ -17,14 +17,14 @@ namespace Code.Example.Race.UI
|
||||
public void SetText(string text) => winText.text = text;
|
||||
public override void Open(Action callback = null)
|
||||
{
|
||||
image.DOColor(shownColor, 1f).onComplete = () => callback?.Invoke();
|
||||
winText.DOColor(shownColor, 1f).onComplete = () => callback?.Invoke();
|
||||
Tween.Color(image,shownColor, 1f);
|
||||
Tween.Color(winText,shownColor, 1f).OnComplete( () => callback?.Invoke());
|
||||
}
|
||||
|
||||
public override void Close(Action callback = null)
|
||||
{
|
||||
image.DOColor(hiddenColor, 1f).onComplete = () => callback?.Invoke();
|
||||
winText.DOColor(hiddenColor, 1f).onComplete = () => callback?.Invoke();
|
||||
Tween.Color(image,hiddenColor, 1f);
|
||||
Tween.Color(winText,hiddenColor, 1f).OnComplete( () => callback?.Invoke());
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -10,7 +10,8 @@ namespace Code.Infrastructure.App
|
||||
{
|
||||
Bootstrap,
|
||||
Gameplay,
|
||||
MainMenu
|
||||
MainMenu,
|
||||
Platformer
|
||||
}
|
||||
|
||||
public class AppStateMachineContext
|
||||
|
||||
@@ -6,12 +6,15 @@ using Code.Infrastructure.Input;
|
||||
using Code.Infrastructure.Loadings;
|
||||
using Code.Infrastructure.SceneLoader;
|
||||
using Code.Infrastructure.UI;
|
||||
using Code.Infrastructure.UI.Panels;
|
||||
using Code.Infrastructure.Volume;
|
||||
using Reflex.Core;
|
||||
using Reflex.Enums;
|
||||
using Reflex.Injectors;
|
||||
using Unity.Cinemachine;
|
||||
using UnityEngine;
|
||||
using UnityEngine.Rendering.Universal;
|
||||
using UnityEngine.SceneManagement;
|
||||
using Resolution = Reflex.Enums.Resolution;
|
||||
|
||||
namespace Code.Infrastructure.App
|
||||
@@ -21,15 +24,19 @@ namespace Code.Infrastructure.App
|
||||
IInputServiceInitializedHandle,
|
||||
ICameraInitializedHandle,
|
||||
IUIInitializedHandle,
|
||||
IUIPanelLoaded,
|
||||
ILoadingPanelCreatedHandle,
|
||||
ILogoPanelCreatedHandle,
|
||||
IVolumesInitializedHandle,
|
||||
IVolumeLoaded,
|
||||
IAudioSourcePoolInitializedHandle,
|
||||
IAudioConfigsLoadedHandle,
|
||||
ICinematicMachineHandle
|
||||
ICinematicMachineHandle,
|
||||
ILayerMasksInitializedHandle
|
||||
{
|
||||
public void InstallBindings(ContainerBuilder containerBuilder)
|
||||
{
|
||||
if(SceneManager.GetActiveScene().buildIndex != 0) SceneManager.LoadScene(0, LoadSceneMode.Single);
|
||||
|
||||
InitLoadings();
|
||||
|
||||
containerBuilder.RegisterType(typeof(EventBus.EventBus), Lifetime.Singleton, Resolution.Eager);
|
||||
@@ -64,7 +71,6 @@ namespace Code.Infrastructure.App
|
||||
Resolution.Eager);
|
||||
containerBuilder.RegisterType(typeof(AudioService), new[] { typeof(IAudioService) }, Lifetime.Singleton,
|
||||
Resolution.Eager);
|
||||
|
||||
}
|
||||
|
||||
private void InitLoadings()
|
||||
@@ -79,8 +85,9 @@ namespace Code.Infrastructure.App
|
||||
// Audio Factory
|
||||
// Audio Pool
|
||||
// Cinemachine Camera
|
||||
_initialLoading = new Loading(10, () => EssentialLoadEnded(_thatRightContainer));
|
||||
|
||||
// Layer masks
|
||||
_initialLoading = new Loading(11, () => EssentialLoadEnded(_thatRightContainer));
|
||||
|
||||
_ui2CamLoading = new Loading(2,
|
||||
() =>
|
||||
{
|
||||
@@ -99,7 +106,9 @@ namespace Code.Infrastructure.App
|
||||
_thatRightContainer = container;
|
||||
|
||||
container.Resolve<EventBus.EventBus>().Subscribe(this);
|
||||
|
||||
|
||||
ConstructorInjector.Construct(typeof(LayerMasks), container);
|
||||
|
||||
var cameraFactory = container.Resolve<CameraFactory>();
|
||||
cameraFactory.CreateCameraStateMachine(container.Resolve<CameraStateMachine>())
|
||||
.Forget();
|
||||
@@ -109,7 +118,8 @@ namespace Code.Infrastructure.App
|
||||
{
|
||||
container.Resolve<EventBus.EventBus>().Unsubscribe(this);
|
||||
container.Resolve<AppStateMachine>().SwitchState(AppStates.Bootstrap)
|
||||
.AllowStateTransition(AppStates.Gameplay);
|
||||
.AllowStateTransition(AppStates.Gameplay)
|
||||
.AllowStateTransition(AppStates.Platformer);
|
||||
container.Resolve<AppStateMachineContext>().StateMachine = container.Resolve<AppStateMachine>();
|
||||
}
|
||||
|
||||
@@ -127,7 +137,8 @@ namespace Code.Infrastructure.App
|
||||
{
|
||||
_thatRightContainer.Resolve<CameraStateMachineContext>().cameraLoadedData = data;
|
||||
_thatRightContainer.Resolve<CameraStateMachine>().SwitchState(CameraMode.None)
|
||||
.AllowStateTransition(CameraMode.ThirdPerson);
|
||||
.AllowStateTransition(CameraMode.ThirdPerson)
|
||||
.AllowStateTransition(CameraMode.Platformer);
|
||||
|
||||
data.Camera.GetUniversalAdditionalCameraData().renderPostProcessing = true;
|
||||
|
||||
@@ -142,26 +153,8 @@ namespace Code.Infrastructure.App
|
||||
_ui2CamLoading.DoProgress();
|
||||
_initialLoading.DoProgress();
|
||||
|
||||
_thatRightContainer.Resolve<IUIService>().TryLoadPanel(UIPanelType.Logo);
|
||||
_thatRightContainer.Resolve<IUIService>().TryLoadPanel(UIPanelType.Loading);
|
||||
}
|
||||
|
||||
public void UILoaded(UIPanelType uiPanelType)
|
||||
{
|
||||
switch (uiPanelType)
|
||||
{
|
||||
case UIPanelType.Logo:
|
||||
_thatRightContainer.Resolve<IUIService>().OpenPanel(UIPanelType.Logo);
|
||||
|
||||
_initialLoading.DoProgress();
|
||||
break;
|
||||
case UIPanelType.Loading:
|
||||
// _thatRightContainer.Resolve<IUIService>().OpenPanel(UIPanelType.Logo);
|
||||
break;
|
||||
default:
|
||||
Application.Quit();
|
||||
break;
|
||||
}
|
||||
_thatRightContainer.Resolve<IUIService>().TryLoadCreatePanel(UIPanelType.Logo);
|
||||
_thatRightContainer.Resolve<IUIService>().TryLoadCreatePanel(UIPanelType.Loading);
|
||||
}
|
||||
|
||||
public void VolumesInitialized()
|
||||
@@ -198,5 +191,22 @@ namespace Code.Infrastructure.App
|
||||
{
|
||||
_initialLoading.DoProgress();
|
||||
}
|
||||
|
||||
public void LayerMasksInitialized()
|
||||
{
|
||||
_initialLoading.DoProgress();
|
||||
}
|
||||
|
||||
public void LoadingPanelCreated(UIPanel panel)
|
||||
{
|
||||
_thatRightContainer.Resolve<IUIService>().OpenPanel(UIPanelType.Logo);
|
||||
|
||||
_initialLoading.DoProgress();
|
||||
}
|
||||
|
||||
public void LogoPanelCreated(UIPanel panel)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -5,7 +5,6 @@ using Code.Infrastructure.SceneLoader;
|
||||
using Reflex.Core;
|
||||
using Reflex.Enums;
|
||||
using UnityEngine;
|
||||
using UnityEngine.Serialization;
|
||||
using Resolution = Reflex.Enums.Resolution;
|
||||
|
||||
namespace Code.Infrastructure.App.SceneInstallers
|
||||
@@ -23,6 +22,8 @@ namespace Code.Infrastructure.App.SceneInstallers
|
||||
containerBuilder.RegisterValue(raceTrackData);
|
||||
containerBuilder.RegisterType(typeof(RaceGame), Lifetime.Scoped,
|
||||
Resolution.Lazy);
|
||||
containerBuilder.RegisterType(typeof(PlayerPrefsRacePoopshitter), Lifetime.Scoped,
|
||||
Resolution.Lazy);
|
||||
|
||||
containerBuilder.OnContainerBuilt += PostInstall;
|
||||
}
|
||||
|
||||
@@ -1,14 +1,13 @@
|
||||
using System.Threading;
|
||||
using Code.Debug;
|
||||
using Code.Infrastructure.Audio;
|
||||
using Code.Infrastructure.Generators;
|
||||
using Code.Infrastructure.UI;
|
||||
using Code.Infrastructure.UI;
|
||||
using Code.Infrastructure.UI.Panels;
|
||||
|
||||
namespace Code.Infrastructure.App.States
|
||||
{
|
||||
[State(typeof(AppStates),typeof(AppStateMachineContext))]
|
||||
[StateRaisingEvent]
|
||||
public partial class BootstrapState : IUIPanelLoaded, IReadyToPlayHandle
|
||||
public partial class BootstrapState : IReadyToPlayHandle, IMenuChoosePanelCreatedHandle
|
||||
{
|
||||
private EventBus.EventBus _eventBus;
|
||||
public BootstrapState(AppStateMachineContext context, EventBus.EventBus eventBus) : base(context,eventBus)
|
||||
@@ -23,7 +22,7 @@ namespace Code.Infrastructure.App.States
|
||||
|
||||
Context.UIService.TryRemovePanel(UIPanelType.Logo);
|
||||
|
||||
Context.UIService.TryLoadPanel(UIPanelType.DebugSceneChooser);
|
||||
Context.UIService.TryLoadCreatePanel(UIPanelType.DebugSceneChooser);
|
||||
Context.AudioFactory.LoadAudioClips(AudioNames.UISounds);
|
||||
}
|
||||
|
||||
@@ -33,16 +32,16 @@ namespace Code.Infrastructure.App.States
|
||||
Context.UIService.TryRemovePanel(UIPanelType.DebugSceneChooser);
|
||||
_eventBus.Unsubscribe(this);
|
||||
}
|
||||
|
||||
public void UILoaded(UIPanelType uiPanelType)
|
||||
{
|
||||
if (uiPanelType != UIPanelType.DebugSceneChooser) return;
|
||||
|
||||
Context.UIService.OpenPanel(uiPanelType);
|
||||
}
|
||||
|
||||
public void OnReadyToPlay(AudioNames groupName)
|
||||
{
|
||||
Context.AudioService.PlayRepeatedly(AudioNames.UISounds,0);
|
||||
}
|
||||
|
||||
public void MenuChoosePanelCreated(UIPanel panel)
|
||||
{
|
||||
panel.gameObject.SetActive(true);
|
||||
panel.Open();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -18,7 +18,7 @@ using Reflex.Core;
|
||||
using Reflex.Injectors;
|
||||
using Unity.Cinemachine;
|
||||
using UnityEngine.SceneManagement;
|
||||
|
||||
// Ивенты создания панелей сломаны TODO
|
||||
namespace Code.Infrastructure.App.States
|
||||
{
|
||||
[State(typeof(AppStates), typeof(AppStateMachineContext))]
|
||||
@@ -27,7 +27,6 @@ namespace Code.Infrastructure.App.States
|
||||
IOnGameplaySceneLoadedHandler,
|
||||
IRaceGameHandle,
|
||||
IRacerFactoryInitializedHandle,
|
||||
IUIPanelLoaded,
|
||||
ICinematicMachineHandle
|
||||
{
|
||||
public GameplayState(AppStateMachineContext context, EventBus.EventBus eventBus) : base(context, eventBus)
|
||||
@@ -48,13 +47,15 @@ namespace Code.Infrastructure.App.States
|
||||
// Factory
|
||||
// PlayerCounter
|
||||
// WinScreen
|
||||
// ScoreScreen
|
||||
// CinemachineCamera
|
||||
_gameplayLoading = new Loading(6, GameplayLoadingCompleted);
|
||||
_gameplayLoading = new Loading(7, GameplayLoadingCompleted);
|
||||
|
||||
Context.UIService.TryLoadPanel(UIPanelType.PlayerScoreCounter);
|
||||
Context.UIService.TryLoadPanel(UIPanelType.WinScreen);
|
||||
Context.UIService.TryLoadCreatePanel(UIPanelType.PlayerScoreCounter);
|
||||
Context.UIService.TryLoadCreatePanel(UIPanelType.WinScreen);
|
||||
Context.UIService.TryLoadCreatePanel(UIPanelType.PlayerScores);
|
||||
Context.SceneLoader.LoadSceneAsync(SceneId.Gameplay, LoadSceneMode.Single).Forget();
|
||||
Context.InputService.EnableMap(ActionMappings.Gameplay);
|
||||
Context.InputService.EnableMap(ActionMappings.Race);
|
||||
Context.CameraFactory.LoadCinemachineCamera(CameraMode.ThirdPerson).Forget();
|
||||
}
|
||||
|
||||
@@ -73,16 +74,17 @@ namespace Code.Infrastructure.App.States
|
||||
_raceGame.PlacedRacers[0].gameObject.transform;
|
||||
|
||||
Context.UIService.ClosePanel(UIPanelType.Loading);
|
||||
|
||||
_raceGame.StartRacers();
|
||||
}
|
||||
|
||||
protected override void OnExitState()
|
||||
{
|
||||
Context.InputService.DisableMap(ActionMappings.Gameplay);
|
||||
{
|
||||
Context.UIService.TryRemovePanel(UIPanelType.PlayerScoreCounter);
|
||||
Context.UIService.TryRemovePanel(UIPanelType.WinScreen);
|
||||
Context.UIService.TryRemovePanel(UIPanelType.PlayerScores);
|
||||
Context.CameraFactory.ReleaseCinemachineCamera(CameraMode.ThirdPerson);
|
||||
Context.InputService.DisableMap(ActionMappings.Gameplay);
|
||||
Context.InputService.DisableMap(ActionMappings.Race);
|
||||
|
||||
_raceGame = null;
|
||||
|
||||
@@ -117,7 +119,7 @@ namespace Code.Infrastructure.App.States
|
||||
|
||||
public void RaceGameEnded(RaceScores scores)
|
||||
{
|
||||
var winScreen = (WinScreen)Context.UIService.TryGetPanel(UIPanelType.WinScreen);
|
||||
var winScreen = (WinScreen)Context.UIService.TryGetSinglePanel(UIPanelType.WinScreen);
|
||||
|
||||
var id = 0;
|
||||
var cachedScores = scores.GetScores();
|
||||
@@ -125,9 +127,14 @@ namespace Code.Infrastructure.App.States
|
||||
for (var i = 0; i < cachedScores.Count; i++)
|
||||
if (cachedScores[i].Key.Data.type == RacerType.Player) id = i + 1;
|
||||
|
||||
UNTILTHEYFIXCONTAINERS.Resolve<PlayerPrefsRacePoopshitter>().AddRace(new(_raceGame.RaceTime, id));
|
||||
|
||||
var winText = $@"{id} МЕСТО\n";
|
||||
winScreen.SetText(winText);
|
||||
|
||||
|
||||
var getPanel = Context.UIService.TryGetSinglePanel(UIPanelType.PlayerScores);
|
||||
((PlayerScores)getPanel)
|
||||
.SetText(UNTILTHEYFIXCONTAINERS.Resolve<PlayerPrefsRacePoopshitter>().GetRaces());
|
||||
Context.UIService.ClosePanel(UIPanelType.PlayerScoreCounter);
|
||||
Context.UIService.OpenPanel(UIPanelType.WinScreen);
|
||||
|
||||
@@ -137,7 +144,11 @@ namespace Code.Infrastructure.App.States
|
||||
private async UniTaskVoid EndTheGame()
|
||||
{
|
||||
await UniTask.WaitForSeconds(3f);
|
||||
Context.UIService.ClosePanel(UIPanelType.WinScreen);
|
||||
|
||||
Context.UIService.OpenPanel(UIPanelType.PlayerScores);
|
||||
await UniTask.WaitForSeconds(5f);
|
||||
|
||||
Context.UIService.OpenPanel(UIPanelType.Loading);
|
||||
Context.StateMachine.SwitchState(AppStates.MainMenu).AllowStateTransition(AppStates.Gameplay);
|
||||
}
|
||||
@@ -151,7 +162,7 @@ namespace Code.Infrastructure.App.States
|
||||
|
||||
public void UILoaded(UIPanelType uiPanelType)
|
||||
{
|
||||
if(uiPanelType == UIPanelType.WinScreen)
|
||||
if(uiPanelType is UIPanelType.WinScreen or UIPanelType.PlayerScores)
|
||||
{
|
||||
_gameplayLoading.DoProgress();
|
||||
return;
|
||||
@@ -164,5 +175,14 @@ namespace Code.Infrastructure.App.States
|
||||
}
|
||||
|
||||
public void CinemachineLoaded(CinemachineCamera cinemachineCamera) => _gameplayLoading.DoProgress();
|
||||
public void UISinglePanelLoaded(UIPanelType uiPanelType)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public void UISinglePanelRemoved(UIPanelType uiPanelType)
|
||||
{
|
||||
throw new System.NotImplementedException();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -12,23 +12,21 @@ namespace Code.Infrastructure.App.States
|
||||
{
|
||||
[State(typeof(AppStates),typeof(AppStateMachineContext))]
|
||||
[StateRaisingEvent]
|
||||
public partial class MainMenuState : IUIPanelLoaded, IReadyToPlayHandle, IOnMainMenuSceneLoadedHandler
|
||||
{
|
||||
private EventBus.EventBus _eventBus;
|
||||
public partial class MainMenuState : IReadyToPlayHandle, IOnMainMenuSceneLoadedHandler, IMenuChoosePanelCreatedHandle
|
||||
{
|
||||
public MainMenuState(AppStateMachineContext context, EventBus.EventBus eventBus) : base(context,eventBus)
|
||||
{
|
||||
_eventBus = eventBus;
|
||||
{
|
||||
}
|
||||
|
||||
public override AppStates myState => AppStates.MainMenu;
|
||||
private Loading _loading;
|
||||
protected override void OnEnterState()
|
||||
{
|
||||
_eventBus.Subscribe(this);
|
||||
EventBus.Subscribe(this);
|
||||
|
||||
_loading = new Loading(2, LoadComplete);
|
||||
|
||||
Context.UIService.TryLoadPanel(UIPanelType.DebugSceneChooser);
|
||||
Context.UIService.TryLoadCreatePanel(UIPanelType.DebugSceneChooser);
|
||||
// Context.AudioFactory.LoadAudioClips(AudioNames.UISounds);
|
||||
Context.SceneLoader.LoadSceneAsync(SceneId.MainMenu, LoadSceneMode.Single).Forget();
|
||||
Context.AudioService.PlayRepeatedly(AudioNames.UISounds,0);
|
||||
@@ -38,15 +36,7 @@ namespace Code.Infrastructure.App.States
|
||||
{
|
||||
// Context.AudioFactory.ReleaseAudios(AudioNames.UISounds);
|
||||
Context.UIService.TryRemovePanel(UIPanelType.DebugSceneChooser);
|
||||
_eventBus.Unsubscribe(this);
|
||||
}
|
||||
|
||||
public void UILoaded(UIPanelType uiPanelType)
|
||||
{
|
||||
if (uiPanelType != UIPanelType.DebugSceneChooser) return;
|
||||
|
||||
Context.UIService.OpenPanel(uiPanelType);
|
||||
_loading.DoProgress();
|
||||
EventBus.Unsubscribe(this);
|
||||
}
|
||||
|
||||
private void LoadComplete()
|
||||
@@ -70,5 +60,13 @@ namespace Code.Infrastructure.App.States
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public void MenuChoosePanelCreated(UIPanel panel)
|
||||
{
|
||||
panel.gameObject.SetActive(true);
|
||||
panel.Open();
|
||||
|
||||
_loading.DoProgress();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -10,7 +10,8 @@ namespace Code.Infrastructure.Camera
|
||||
public enum CameraMode
|
||||
{
|
||||
None,
|
||||
ThirdPerson
|
||||
ThirdPerson,
|
||||
Platformer
|
||||
}
|
||||
|
||||
[Config("Configs/Camera/CameraConfig")]
|
||||
|
||||
@@ -6,29 +6,11 @@ namespace Code.Infrastructure.Camera.CameraStates
|
||||
// [State(typeof(CameraMode),typeof(CameraStateMachineContext))]
|
||||
public abstract class BaseCameraState : BaseState<CameraMode, CameraStateMachineContext>
|
||||
{
|
||||
protected EventBus.EventBus _eventBus;
|
||||
|
||||
|
||||
// Трансформ объекта, за которым следует камера
|
||||
protected Transform FollowTransform;
|
||||
protected EventBus.EventBus EventBus;
|
||||
|
||||
// Позиция следования: текущая сглаженная позиция и горизонтальное направление камеры
|
||||
protected Vector3 CurrentFollowPosition;
|
||||
|
||||
// Целевой вертикальный угол камеры (наклон вверх/вниз)
|
||||
protected float TargetVerticalAngle;
|
||||
|
||||
// Текущая и целевая дистанция камеры от цели
|
||||
protected float CurrentDistance, TargetDistance;
|
||||
|
||||
// Исходные значения дистанции для восстановления
|
||||
protected float OriginalDefaultDistance, OriginalMinDistance, OriginalMaxDistance;
|
||||
|
||||
// Горизонтальное направление камеры (проекция forward на плоскость)
|
||||
protected Vector3 PlanarDirection { get; set; }
|
||||
protected BaseCameraState(CameraStateMachineContext context, EventBus.EventBus eventBus) : base(context, eventBus)
|
||||
{
|
||||
_eventBus = eventBus;
|
||||
EventBus = eventBus;
|
||||
}
|
||||
|
||||
// Основной метод обновления камеры, вызываемый извне каждый кадр
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using Code.Infrastructure.Generators;
|
||||
using Code.Infrastructure.Loadings;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Code.Infrastructure.Camera.CameraStates
|
||||
@@ -6,6 +7,7 @@ namespace Code.Infrastructure.Camera.CameraStates
|
||||
[State(typeof(CameraMode),typeof(CameraStateMachineContext), true)]
|
||||
public partial class NoneCameraState : BaseCameraState
|
||||
{
|
||||
private Loading _loading;
|
||||
public NoneCameraState(CameraStateMachineContext context, EventBus.EventBus eventBus) : base(context, eventBus)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -1,8 +1,5 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Code.Infrastructure.SceneLoader;
|
||||
using Cysharp.Threading.Tasks;
|
||||
using Reflex.Core;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using UnityEngine.AddressableAssets;
|
||||
|
||||
@@ -27,9 +24,7 @@ namespace Code.Infrastructure.Configs
|
||||
|
||||
private void LoadSystemConfigs()
|
||||
{
|
||||
SystemConfigsReferences systemConfigsReferences = Resources.Load<SystemConfigsReferences>("SystemConfigsReferences");
|
||||
|
||||
_singleConfigReferences.Add(typeof(ScenesAssetReferences), systemConfigsReferences.scenesAssetReferences);
|
||||
Resources.Load<SystemConfigsReferences>("SystemConfigsReferences");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
namespace Code.Infrastructure.Configs
|
||||
{
|
||||
public enum LayerMaskType
|
||||
{
|
||||
PlatformerGround,
|
||||
PlatformerEnemy,
|
||||
PlatformerPlayer
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 0aab84d976cf4045b47f347ad8d77c79
|
||||
timeCreated: 1770907660
|
||||
@@ -0,0 +1,53 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Code.Infrastructure.EventBus;
|
||||
using Code.Infrastructure.Generators;
|
||||
using Cysharp.Threading.Tasks;
|
||||
using Reflex.Attributes;
|
||||
using UnityEngine;
|
||||
using UnityEngine.AddressableAssets;
|
||||
|
||||
namespace Code.Infrastructure.Configs
|
||||
{
|
||||
[Config("Configs/LayerMasksConfig", true)]
|
||||
public struct LayerMasksConfig
|
||||
{
|
||||
[ToConfig] public LayerMask mask;
|
||||
[ToConfig] public LayerMaskType type;
|
||||
}
|
||||
|
||||
public class LayerMasks
|
||||
{
|
||||
public static Dictionary<LayerMaskType, LayerMask> Masks { get; } = new();
|
||||
|
||||
private static void SetMasks(IList<LayerMasksConfigConfig> configs)
|
||||
{
|
||||
foreach (var config in configs.Where(config => !Masks.ContainsKey(config.type)))
|
||||
Masks.Add(config.type, config.mask);
|
||||
}
|
||||
|
||||
public LayerMasks(IConfigLocator configLocator, EventBus.EventBus eventBus)
|
||||
{
|
||||
SetupMasks(configLocator, eventBus).Forget();
|
||||
}
|
||||
private async UniTaskVoid SetupMasks(IConfigLocator configLocator, EventBus.EventBus eventBus)
|
||||
{
|
||||
var handle =
|
||||
Addressables.LoadAssetsAsync<LayerMasksConfigConfig>(
|
||||
configLocator.TryGetManyConfigAssetReferences<LayerMasksConfigConfig>(), null, Addressables.MergeMode.Union);
|
||||
|
||||
await handle.ToUniTask();
|
||||
|
||||
SetMasks(handle.Result);
|
||||
|
||||
Addressables.Release(handle);
|
||||
|
||||
eventBus.RaiseEvent<ILayerMasksInitializedHandle>(x => x.LayerMasksInitialized());
|
||||
}
|
||||
}
|
||||
|
||||
public interface ILayerMasksInitializedHandle : IGlobalSubscriber
|
||||
{
|
||||
void LayerMasksInitialized();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 2fe6e42771fc4a48a37acbe4fa992e4a
|
||||
timeCreated: 1770906616
|
||||
@@ -6,6 +6,5 @@ namespace Code.Infrastructure.Configs
|
||||
[CreateAssetMenu(fileName = "SystemConfigsReferences", menuName = "Configs/SystemConfigsReferences")]
|
||||
public partial class SystemConfigsReferences : ScriptableObject
|
||||
{
|
||||
public AssetReference scenesAssetReferences;
|
||||
}
|
||||
}
|
||||
@@ -33,11 +33,13 @@ namespace Code.Infrastructure.Generators
|
||||
public class Config : Attribute
|
||||
{
|
||||
public bool Multiple;
|
||||
public bool OnlyLocator;
|
||||
public string MenuName;
|
||||
public Config(string menuName, bool multiple = false)
|
||||
public Config(string menuName, bool multiple = false, bool onlyLocator = false)
|
||||
{
|
||||
Multiple = multiple;
|
||||
MenuName = menuName;
|
||||
OnlyLocator = onlyLocator;
|
||||
}
|
||||
}
|
||||
public class ToConfig : Attribute
|
||||
|
||||
@@ -43,7 +43,9 @@ using UnityEngine.AddressableAssets;
|
||||
{configUsings}
|
||||
namespace {cfg.Namespace}{{
|
||||
#pragma warning restore CS0105
|
||||
[CreateAssetMenu(fileName = ""{cfg.Name}Config"", menuName = ""{attribute.MenuName}"")]
|
||||
|
||||
{(!attribute.OnlyLocator ? $@"[CreateAssetMenu(fileName = ""{cfg.Name}Config"", menuName = ""{attribute.MenuName}"")]" : "")}
|
||||
|
||||
public class {cfg.Name}Config : ScriptableObject
|
||||
{{
|
||||
{configFields}
|
||||
@@ -84,7 +86,6 @@ public class {cfg.Name}Config : ScriptableObject
|
||||
{{
|
||||
SystemConfigsReferences systemConfigsReferences = Resources.Load<SystemConfigsReferences>(""SystemConfigsReferences"");
|
||||
{configAddCode}
|
||||
//_singleConfigReferences.Add(typeof(ScenesAssetReferences), systemConfigsReferences.scenesAssetReferences);
|
||||
}}
|
||||
}}
|
||||
}}
|
||||
|
||||
@@ -0,0 +1,71 @@
|
||||
#if UNITY_EDITOR
|
||||
using Code.Infrastructure.UI;
|
||||
using UnityCodeGen;
|
||||
using UnityEditor;
|
||||
|
||||
namespace Code.Infrastructure.Generators
|
||||
{
|
||||
[Generator]
|
||||
public class UIPanelEventsGenerator : ICodeGenerator
|
||||
{
|
||||
public void Execute(GeneratorContext context)
|
||||
{
|
||||
GenerateStates(context);
|
||||
}
|
||||
|
||||
private void GenerateStates(GeneratorContext context)
|
||||
{
|
||||
var states = TypeCache.GetTypesDerivedFrom<UIPanel>();
|
||||
|
||||
foreach (var st in states)
|
||||
{
|
||||
var fireStatesCode = $@"
|
||||
public override void FireCreatedEvent()
|
||||
{{
|
||||
_eventBus.RaiseEvent<I{st.Name}CreatedHandle>(h => h.{st.Name}Created(this));
|
||||
}}
|
||||
|
||||
public override void FireRemovedEvent()
|
||||
{{
|
||||
_eventBus.RaiseEvent<I{st.Name}RemovedHandle>(h => h.{st.Name}Removed());
|
||||
}}
|
||||
";
|
||||
var fireStatesInterfacesCode = $@"
|
||||
|
||||
public interface I{st.Name}CreatedHandle : IGlobalSubscriber
|
||||
{{
|
||||
void {st.Name}Created(UIPanel panel);
|
||||
}}
|
||||
|
||||
public interface I{st.Name}RemovedHandle : IGlobalSubscriber
|
||||
{{
|
||||
void {st.Name}Removed();
|
||||
}}
|
||||
";
|
||||
|
||||
var statesCode = $@"
|
||||
|
||||
// retard-generated
|
||||
|
||||
using Code.Infrastructure.UI;
|
||||
using Code.Infrastructure.EventBus;
|
||||
using Code.Infrastructure.StateMachine;
|
||||
|
||||
namespace {st.Namespace}
|
||||
{{
|
||||
public partial class {st.Name}
|
||||
{{
|
||||
{fireStatesCode}
|
||||
}}
|
||||
|
||||
{fireStatesInterfacesCode}
|
||||
}}
|
||||
";
|
||||
|
||||
|
||||
context.AddCode($"{st.FullName}Events.Generated.cs", statesCode);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e534143b792f4c2692451b19fb9b7e98
|
||||
timeCreated: 1773046409
|
||||
@@ -3,13 +3,21 @@ namespace Code.Infrastructure.Input
|
||||
public enum ActionMappings
|
||||
{
|
||||
MainMenu,
|
||||
Gameplay,
|
||||
Race,
|
||||
Platformer,
|
||||
Debug
|
||||
}
|
||||
public enum GameplayActions
|
||||
public enum RaceActions
|
||||
{
|
||||
Move,
|
||||
Brake,
|
||||
Brake,
|
||||
}
|
||||
public enum PlatformerActions
|
||||
{
|
||||
Move,
|
||||
Jump,
|
||||
Attack,
|
||||
Sprint,
|
||||
}
|
||||
public enum DebugActions
|
||||
{
|
||||
|
||||
@@ -8,8 +8,8 @@ namespace Code.Infrastructure.Input
|
||||
void EnableMap(ActionMappings actionMap);
|
||||
void DisableMap(ActionMappings actionMap);
|
||||
void BindActionPerformed(int mapId, int actionId, Action<InputAction.CallbackContext> action);
|
||||
void BindActionCancel(int mapId, int actionId, Action<InputAction.CallbackContext> action);
|
||||
void BindActionCancelled(int mapId, int actionId, Action<InputAction.CallbackContext> action);
|
||||
void UnbindActionPerformed(int mapId, int actionId, Action<InputAction.CallbackContext> action);
|
||||
void UnbindActionCanceled(int mapId, int actionId, Action<InputAction.CallbackContext> action);
|
||||
void UnbindActionCancelled(int mapId, int actionId, Action<InputAction.CallbackContext> action);
|
||||
}
|
||||
}
|
||||
@@ -43,14 +43,14 @@ namespace Code.Infrastructure.Input
|
||||
public void BindActionPerformed(int mapId, int actionId, Action<InputAction.CallbackContext> action) => inputActionAsset
|
||||
.actionMaps[mapId].actions[actionId].performed += action;
|
||||
|
||||
public void BindActionCancel(int mapId, int actionId, Action<InputAction.CallbackContext> action) => inputActionAsset
|
||||
public void BindActionCancelled(int mapId, int actionId, Action<InputAction.CallbackContext> action) => inputActionAsset
|
||||
.actionMaps[mapId].actions[actionId].canceled += action;
|
||||
|
||||
public void UnbindActionPerformed(int mapId, int actionId, Action<InputAction.CallbackContext> action) =>
|
||||
inputActionAsset
|
||||
.actionMaps[mapId].actions[actionId].performed -= action;
|
||||
|
||||
public void UnbindActionCanceled(int mapId, int actionId, Action<InputAction.CallbackContext> action) =>
|
||||
public void UnbindActionCancelled(int mapId, int actionId, Action<InputAction.CallbackContext> action) =>
|
||||
inputActionAsset
|
||||
.actionMaps[mapId].actions[actionId].canceled -= action;
|
||||
}
|
||||
|
||||
@@ -7,6 +7,7 @@ namespace Code.Infrastructure.SceneLoader
|
||||
{
|
||||
MainMenu,
|
||||
Gameplay,
|
||||
SoundTest
|
||||
SoundTest,
|
||||
Platformer
|
||||
}
|
||||
}
|
||||
@@ -1,11 +1,9 @@
|
||||
using UnityEngine;
|
||||
using UnityEngine.AddressableAssets;
|
||||
|
||||
namespace Code.Infrastructure.SceneLoader
|
||||
{
|
||||
[CreateAssetMenu(fileName = "ScenesAssetReferences", menuName = "Configs/ScenesAssetReferences")]
|
||||
public class ScenesAssetReferences : ScriptableObject
|
||||
{
|
||||
public AssetReference gameplaySceneReference;
|
||||
}
|
||||
}
|
||||
@@ -1,17 +0,0 @@
|
||||
using System;
|
||||
|
||||
namespace Code.Infrastructure.UI.Panels
|
||||
{
|
||||
public class DamnEmptyPanel : UIPanel
|
||||
{
|
||||
public override void Open(Action callback = null)
|
||||
{
|
||||
callback?.Invoke();
|
||||
}
|
||||
|
||||
public override void Close(Action callback = null)
|
||||
{
|
||||
callback?.Invoke();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,3 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: ce4e618236c441ca857ad458fa13e09d
|
||||
timeCreated: 1769347387
|
||||
@@ -1,23 +1,23 @@
|
||||
using System;
|
||||
using DG.Tweening;
|
||||
using System;
|
||||
using PrimeTween;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
|
||||
namespace Code.Infrastructure.UI.Panels
|
||||
{
|
||||
public class LoadingPanel : UIPanel
|
||||
public partial class LoadingPanel : UIPanel
|
||||
{
|
||||
[SerializeField] private Image image;
|
||||
[SerializeField] private RawImage image;
|
||||
[SerializeField] private Color shownColor;
|
||||
[SerializeField] private Color hiddenColor;
|
||||
public override void Open(Action callback = null)
|
||||
{
|
||||
image.DOColor(shownColor, 1f).onComplete = () => callback?.Invoke();
|
||||
Tween.Color(image,shownColor, 1f).OnComplete( () => callback?.Invoke());
|
||||
}
|
||||
|
||||
public override void Close(Action callback = null)
|
||||
{
|
||||
image.DOColor(hiddenColor, 1f).onComplete += () => callback?.Invoke();
|
||||
Tween.Color(image,hiddenColor, 1f).OnComplete( () => callback?.Invoke());
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,23 +1,23 @@
|
||||
using System;
|
||||
using DG.Tweening;
|
||||
using System;
|
||||
using PrimeTween;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
|
||||
namespace Code.Infrastructure.UI.Panels
|
||||
{
|
||||
public class LogoPanel : UIPanel
|
||||
public partial class LogoPanel : UIPanel
|
||||
{
|
||||
[SerializeField] private Image image;
|
||||
[SerializeField] private Color shownColor;
|
||||
[SerializeField] private Color hiddenColor;
|
||||
public override void Open(Action callback = null)
|
||||
{
|
||||
image.DOColor(shownColor, 1f).onComplete = () => callback?.Invoke();
|
||||
Tween.Color(image,shownColor, 1f).OnComplete( () => callback?.Invoke());
|
||||
}
|
||||
|
||||
public override void Close(Action callback = null)
|
||||
{
|
||||
image.DOColor(hiddenColor, 1f).onComplete += () => callback?.Invoke();
|
||||
Tween.Color(image,hiddenColor, 1f).OnComplete( () => callback?.Invoke());
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -6,7 +6,7 @@ using UnityEngine;
|
||||
|
||||
namespace Code.Infrastructure.UI.Panels
|
||||
{
|
||||
public class MenuChoosePanel : UIPanel
|
||||
public partial class MenuChoosePanel : UIPanel
|
||||
{
|
||||
[Inject] IAudioService _audioService;
|
||||
[SerializeField] private SceneChooser sceneChooser;
|
||||
|
||||
@@ -12,14 +12,16 @@ namespace Code.Infrastructure.UI
|
||||
{
|
||||
public interface IUIFactory
|
||||
{
|
||||
UniTaskVoid LoadPanel(UIPanelType panelType);
|
||||
UniTaskVoid LoadPanel(UIPanelType panelType, Transform parent = null);
|
||||
void ReleasePanel(UIPanel panel);
|
||||
Canvas Canvas { get; }
|
||||
bool CheckIsMultiple(UIPanelType panelType);
|
||||
}
|
||||
|
||||
public class UIFactory : IDisposable, IUIFactory
|
||||
{
|
||||
private Dictionary<UIPanelType, UIPanelSettingsConfig> _configs;
|
||||
public bool CheckIsMultiple(UIPanelType panelType) => _configs[panelType].Multiple;
|
||||
private AssetReference _canvasConfigReference;
|
||||
private string _configsLabel;
|
||||
private EventBus.EventBus _eventBus;
|
||||
@@ -41,9 +43,9 @@ namespace Code.Infrastructure.UI
|
||||
LoadConfigs().Forget();
|
||||
}
|
||||
|
||||
public async UniTaskVoid LoadPanel(UIPanelType panelType)
|
||||
public async UniTaskVoid LoadPanel(UIPanelType panelType, Transform parent = null)
|
||||
{
|
||||
var panel = (await Addressables.InstantiateAsync(_configs[panelType].Prefab, _canvas.transform).ToUniTask())
|
||||
var panel = (await Addressables.InstantiateAsync(_configs[panelType].Prefab, parent ?? _canvas.transform).ToUniTask())
|
||||
.GetComponent<UIPanel>();
|
||||
|
||||
UnityEngine.Debug.LogWarning($"Panel loaded {panelType}");
|
||||
@@ -90,5 +92,6 @@ namespace Code.Infrastructure.UI
|
||||
public interface IUIPanelLoadedHandle : IGlobalSubscriber
|
||||
{
|
||||
void UIPanelLoaded(UIPanel panel, UIPanelType panelType);
|
||||
List<UIPanel> TryGetMultiplePanels(UIPanelType panelType);
|
||||
}
|
||||
}
|
||||
@@ -1,3 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 8447b81247b24f1b869b0067aeeff0b8
|
||||
timeCreated: 1768979324
|
||||
guid: 8447b81247b24f1b869b0067aeeff0b8
|
||||
@@ -1,13 +1,21 @@
|
||||
using System;
|
||||
using Reflex.Attributes;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Code.Infrastructure.UI
|
||||
{
|
||||
public abstract class UIPanel : MonoBehaviour
|
||||
{
|
||||
public UIPanelType PanelType { get; set; }
|
||||
|
||||
[SerializeField] protected bool injectMeSenpai;
|
||||
public bool InjectMeSenpai => injectMeSenpai;
|
||||
[Inject] protected EventBus.EventBus _eventBus;
|
||||
public abstract void Open(Action callback = null);
|
||||
public abstract void Close(Action callback = null);
|
||||
|
||||
public virtual void FireCreatedEvent(){}
|
||||
public virtual void FireRemovedEvent(){}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -8,6 +8,7 @@ namespace Code.Infrastructure.UI
|
||||
{
|
||||
[ToConfig] public AssetReference Prefab;
|
||||
[ToConfig] public UIPanelType UIPanelType;
|
||||
[ToConfig] public bool Multiple;
|
||||
}
|
||||
|
||||
[Config("Configs/UI/CanvasSettings")]
|
||||
|
||||
@@ -5,8 +5,11 @@ namespace Code.Infrastructure.UI
|
||||
Logo,
|
||||
Loading,
|
||||
DebugSceneChooser,
|
||||
// Race
|
||||
PlayerScoreCounter,
|
||||
WinScreen,
|
||||
PlayerScores,
|
||||
//
|
||||
DebugMenu
|
||||
}
|
||||
}
|
||||
@@ -1,9 +1,11 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Code.Infrastructure.EventBus;
|
||||
using Reflex.Core;
|
||||
using Reflex.Extensions;
|
||||
using Reflex.Injectors;
|
||||
using UnityEngine;
|
||||
using UnityEngine.SceneManagement;
|
||||
|
||||
namespace Code.Infrastructure.UI
|
||||
@@ -12,15 +14,18 @@ namespace Code.Infrastructure.UI
|
||||
{
|
||||
void OpenPanel(UIPanelType uiPanelType);
|
||||
void ClosePanel(UIPanelType uiPanelType);
|
||||
void TryLoadPanel(UIPanelType uiPanelType);
|
||||
void TryLoadCreatePanel(UIPanelType uiPanelType, Transform parent = null);
|
||||
void TryRemovePanel(UIPanelType uiPanelType);
|
||||
void SetCanvasCamera(UnityEngine.Camera camera);
|
||||
UIPanel TryGetPanel(UIPanelType panelType);
|
||||
UIPanel TryGetSinglePanel(UIPanelType panelType);
|
||||
void TryRemovePanel(UIPanel panel);
|
||||
}
|
||||
|
||||
// Крайне неудобно пользоваться
|
||||
public class UIService : IUIPanelLoadedHandle, IUIService
|
||||
{
|
||||
private Dictionary<UIPanelType, UIPanel> _loadedPanels = new();
|
||||
private Dictionary<UIPanelType, UIPanel> _loadedSinglePanels = new();
|
||||
private Dictionary<UIPanelType, List<UIPanel>> _loadedMultiplePanels = new();
|
||||
|
||||
private EventBus.EventBus _eventBus;
|
||||
private IUIFactory _factory;
|
||||
@@ -40,49 +45,101 @@ namespace Code.Infrastructure.UI
|
||||
|
||||
public void OpenPanel(UIPanelType uiPanelType)
|
||||
{
|
||||
_loadedPanels[uiPanelType].gameObject.SetActive(true);
|
||||
_loadedPanels[uiPanelType].Open();
|
||||
_loadedSinglePanels[uiPanelType].gameObject.SetActive(true);
|
||||
_loadedSinglePanels[uiPanelType].Open();
|
||||
}
|
||||
|
||||
// TODO Close event
|
||||
public void ClosePanel(UIPanelType uiPanelType)
|
||||
{
|
||||
_loadedPanels[uiPanelType].Close(() => { _loadedPanels[uiPanelType].gameObject.SetActive(false); });
|
||||
_loadedSinglePanels[uiPanelType].Close(() =>
|
||||
{
|
||||
_loadedSinglePanels[uiPanelType].gameObject.SetActive(false);
|
||||
});
|
||||
}
|
||||
|
||||
public void TryLoadPanel(UIPanelType uiPanelType) => _factory.LoadPanel(uiPanelType);
|
||||
public void TryLoadCreatePanel(UIPanelType uiPanelType, Transform parent = null) => _factory.LoadPanel(uiPanelType, parent);
|
||||
|
||||
public void UIPanelLoaded(UIPanel panel, UIPanelType panelType)
|
||||
{
|
||||
_loadedPanels.Add(panelType, panel);
|
||||
panel.PanelType = panelType;
|
||||
|
||||
if (!_factory.CheckIsMultiple(panelType))
|
||||
_loadedSinglePanels.Add(panelType, panel);
|
||||
else
|
||||
{
|
||||
if (!_loadedMultiplePanels.ContainsKey(panelType))
|
||||
_loadedMultiplePanels.Add(panelType, new List<UIPanel>());
|
||||
_loadedMultiplePanels[panelType].Add(panel);
|
||||
}
|
||||
|
||||
if (panel.InjectMeSenpai)
|
||||
GameObjectInjector.InjectRecursive(panel.gameObject, Container.RootContainer);
|
||||
else
|
||||
GameObjectInjector.InjectSingle(panel.gameObject, Container.RootContainer);
|
||||
// GameObjectInjector.InjectRecursive(panel.gameObject, SceneManager.GetActiveScene().GetSceneContainer()); // Скорее всего будут нужны компоненты текущей сцены
|
||||
|
||||
_eventBus.RaiseEvent<IUIPanelLoaded>(ui => ui.UILoaded(panelType));
|
||||
|
||||
panel.FireCreatedEvent();
|
||||
}
|
||||
|
||||
public void TryRemovePanel(UIPanelType uiPanelType)
|
||||
{
|
||||
_loadedPanels[uiPanelType].Close(() =>
|
||||
if (_factory.CheckIsMultiple(uiPanelType))
|
||||
{
|
||||
_loadedPanels[uiPanelType].gameObject.SetActive(false);
|
||||
UnityEngine.Debug.LogError("Это для единичных панелей олух");
|
||||
return;
|
||||
}
|
||||
_loadedSinglePanels[uiPanelType].Close(() =>
|
||||
{
|
||||
_loadedSinglePanels[uiPanelType].gameObject.SetActive(false);
|
||||
RemovePanel(uiPanelType);
|
||||
});
|
||||
}
|
||||
public void TryRemovePanel(UIPanel panel)
|
||||
{
|
||||
panel.Close(() =>
|
||||
{
|
||||
panel.gameObject.SetActive(false);
|
||||
RemovePanel(panel);
|
||||
// _eventBus.RaiseEvent<IUIMultiplePanelHandle>(x=> x.UIMultiplePanelRemoved(panel));
|
||||
});
|
||||
}
|
||||
|
||||
private void RemovePanel(UIPanelType panelType)
|
||||
{
|
||||
_factory.ReleasePanel(_loadedPanels[panelType]);
|
||||
_loadedPanels.Remove(panelType);
|
||||
if (!_factory.CheckIsMultiple(panelType))
|
||||
{
|
||||
var temp = _loadedSinglePanels[panelType];
|
||||
_loadedSinglePanels.Remove(panelType);
|
||||
|
||||
temp.FireRemovedEvent();
|
||||
|
||||
_factory.ReleasePanel(temp);
|
||||
}
|
||||
else
|
||||
{
|
||||
var temp = _loadedMultiplePanels[panelType];
|
||||
_loadedMultiplePanels.Remove(panelType);
|
||||
|
||||
foreach (var panel in temp)
|
||||
{
|
||||
panel.FireRemovedEvent();
|
||||
_factory.ReleasePanel(panel);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public UIPanel TryGetPanel(UIPanelType panelType) => _loadedPanels.GetValueOrDefault(panelType);
|
||||
}
|
||||
private void RemovePanel(UIPanel panel)
|
||||
{
|
||||
_loadedMultiplePanels[panel.PanelType].Remove(panel);
|
||||
panel.FireRemovedEvent();
|
||||
|
||||
_factory.ReleasePanel(panel);
|
||||
|
||||
if(_loadedMultiplePanels[panel.PanelType].Count == 0) _loadedMultiplePanels.Remove(panel.PanelType);
|
||||
}
|
||||
|
||||
public interface IUIPanelLoaded : IGlobalSubscriber
|
||||
{
|
||||
void UILoaded(UIPanelType uiPanelType);
|
||||
public UIPanel TryGetSinglePanel(UIPanelType panelType) => _loadedSinglePanels.GetValueOrDefault(panelType);
|
||||
public List<UIPanel> TryGetMultiplePanels(UIPanelType panelType) => _loadedMultiplePanels.GetValueOrDefault(panelType);
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large.
Load diff
Binary file not shown.
@@ -1,2 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: b1830ce43b03605458c19d07b1aacb50
|
||||
@@ -1,144 +0,0 @@
|
||||
<?xml version="1.0"?>
|
||||
<doc>
|
||||
<assembly>
|
||||
<name>DOTweenEditor</name>
|
||||
</assembly>
|
||||
<members>
|
||||
<member name="T:DG.DOTweenEditor.EditorCompatibilityUtils">
|
||||
<summary>
|
||||
Contains compatibility methods taken from DemiEditor (for when DOTween is without it)
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:DG.DOTweenEditor.EditorCompatibilityUtils.FindObjectOfType``1(System.Boolean)">
|
||||
<summary>
|
||||
Warning: some versions of this method don't have the includeInactive parameter so it won't be taken into account
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:DG.DOTweenEditor.EditorCompatibilityUtils.FindObjectOfType(System.Type,System.Boolean)">
|
||||
<summary>
|
||||
Warning: some versions of this method don't have the includeInactive parameter so it won't be taken into account
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:DG.DOTweenEditor.EditorCompatibilityUtils.FindObjectsOfType``1(System.Boolean)">
|
||||
<summary>
|
||||
Warning: some versions of this method don't have the includeInactive parameter so it won't be taken into account
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:DG.DOTweenEditor.EditorCompatibilityUtils.FindObjectsOfType(System.Type,System.Boolean)">
|
||||
<summary>
|
||||
Warning: some versions of this method don't have the includeInactive parameter so it won't be taken into account
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:DG.DOTweenEditor.DOTweenEditorPreview.Start(System.Action)">
|
||||
<summary>
|
||||
Starts the update loop of tween in the editor. Has no effect during playMode.
|
||||
</summary>
|
||||
<param name="onPreviewUpdated">Eventual callback to call after every update</param>
|
||||
</member>
|
||||
<member name="M:DG.DOTweenEditor.DOTweenEditorPreview.Stop(System.Boolean,System.Boolean)">
|
||||
<summary>
|
||||
Stops the update loop and clears the onPreviewUpdated callback.
|
||||
</summary>
|
||||
<param name="resetTweenTargets">If TRUE also resets the tweened objects to their original state.
|
||||
Note that this works by calling Rewind on all tweens, so it will work correctly
|
||||
only if you have a single tween type per object and it wasn't killed</param>
|
||||
<param name="clearTweens">If TRUE also kills any cached tween</param>
|
||||
</member>
|
||||
<member name="M:DG.DOTweenEditor.DOTweenEditorPreview.PrepareTweenForPreview(DG.Tweening.Tween,System.Boolean,System.Boolean,System.Boolean)">
|
||||
<summary>
|
||||
Readies the tween for editor preview by setting its UpdateType to Manual plus eventual extra settings.
|
||||
</summary>
|
||||
<param name="t">The tween to ready</param>
|
||||
<param name="clearCallbacks">If TRUE (recommended) removes all callbacks (OnComplete/Rewind/etc)</param>
|
||||
<param name="preventAutoKill">If TRUE prevents the tween from being auto-killed at completion</param>
|
||||
<param name="andPlay">If TRUE starts playing the tween immediately</param>
|
||||
</member>
|
||||
<member name="F:DG.DOTweenEditor.EditorVersion.Version">
|
||||
<summary>Full major version + first minor version (ex: 2018.1f)</summary>
|
||||
</member>
|
||||
<member name="F:DG.DOTweenEditor.EditorVersion.MajorVersion">
|
||||
<summary>Major version</summary>
|
||||
</member>
|
||||
<member name="F:DG.DOTweenEditor.EditorVersion.MinorVersion">
|
||||
<summary>First minor version (ex: in 2018.1 it would be 1)</summary>
|
||||
</member>
|
||||
<member name="M:DG.DOTweenEditor.EditorUtils.SetEditorTexture(UnityEngine.Texture2D,UnityEngine.FilterMode,System.Int32)">
|
||||
<summary>
|
||||
Checks that the given editor texture use the correct import settings,
|
||||
and applies them if they're incorrect.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:DG.DOTweenEditor.EditorUtils.DOTweenSetupRequired">
|
||||
<summary>
|
||||
Returns TRUE if setup is required
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:DG.DOTweenEditor.EditorUtils.AssetExists(System.String)">
|
||||
<summary>
|
||||
Returns TRUE if the file/directory at the given path exists.
|
||||
</summary>
|
||||
<param name="adbPath">Path, relative to Unity's project folder</param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:DG.DOTweenEditor.EditorUtils.ADBPathToFullPath(System.String)">
|
||||
<summary>
|
||||
Converts the given project-relative path to a full path,
|
||||
with backward (\) slashes).
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:DG.DOTweenEditor.EditorUtils.FullPathToADBPath(System.String)">
|
||||
<summary>
|
||||
Converts the given full path to a path usable with AssetDatabase methods
|
||||
(relative to Unity's project folder, and with the correct Unity forward (/) slashes).
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:DG.DOTweenEditor.EditorUtils.ConnectToSourceAsset``1(System.String,System.Boolean)">
|
||||
<summary>
|
||||
Connects to a <see cref="T:UnityEngine.ScriptableObject"/> asset.
|
||||
If the asset already exists at the given path, loads it and returns it.
|
||||
Otherwise, either returns NULL or automatically creates it before loading and returning it
|
||||
(depending on the given parameters).
|
||||
</summary>
|
||||
<typeparam name="T">Asset type</typeparam>
|
||||
<param name="adbFilePath">File path (relative to Unity's project folder)</param>
|
||||
<param name="createIfMissing">If TRUE and the requested asset doesn't exist, forces its creation</param>
|
||||
</member>
|
||||
<member name="M:DG.DOTweenEditor.EditorUtils.GetAssemblyFilePath(System.Reflection.Assembly)">
|
||||
<summary>
|
||||
Full path for the given loaded assembly, assembly file included
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:DG.DOTweenEditor.EditorUtils.AddGlobalDefine(System.String)">
|
||||
<summary>
|
||||
Adds the given global define if it's not already present
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:DG.DOTweenEditor.EditorUtils.RemoveGlobalDefine(System.String)">
|
||||
<summary>
|
||||
Removes the given global define if it's present
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:DG.DOTweenEditor.EditorUtils.HasGlobalDefine(System.String,System.Nullable{UnityEditor.BuildTargetGroup})">
|
||||
<summary>
|
||||
Returns TRUE if the given global define is present in all the <see cref="T:UnityEditor.BuildTargetGroup"/>
|
||||
or only in the given <see cref="T:UnityEditor.BuildTargetGroup"/>, depending on passed parameters.<para/>
|
||||
</summary>
|
||||
<param name="id"></param>
|
||||
<param name="buildTargetGroup"><see cref="T:UnityEditor.BuildTargetGroup"/>to use. Leave NULL to check in all of them.</param>
|
||||
</member>
|
||||
<member name="T:DG.DOTweenEditor.DOTweenDefines">
|
||||
<summary>
|
||||
Not used as menu item anymore, but as a utility function
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:DG.DOTweenEditor.UnityEditorVersion.Version">
|
||||
<summary>Full major version + first minor version (ex: 2018.1f)</summary>
|
||||
</member>
|
||||
<member name="F:DG.DOTweenEditor.UnityEditorVersion.MajorVersion">
|
||||
<summary>Major version</summary>
|
||||
</member>
|
||||
<member name="F:DG.DOTweenEditor.UnityEditorVersion.MinorVersion">
|
||||
<summary>First minor version (ex: in 2018.1 it would be 1)</summary>
|
||||
</member>
|
||||
</members>
|
||||
</doc>
|
||||
Binary file not shown.
@@ -1,2 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 59bd38d8dc734194ba1f04ea39b85aac
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 1.5 KiB |
Loaded 100 of 450 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user