Compare commits
14
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
efcfaae647 | ||
|
|
f557c58c9d | ||
|
|
cd56b1969c | ||
|
|
a45223d0e7 | ||
|
|
b54083521f | ||
|
|
ec60c47652 | ||
|
|
1f8e14d078 | ||
|
|
0f46c63b5d | ||
|
|
72af9520df | ||
|
|
513d6d0bc5 | ||
|
|
b7527d8d68 | ||
|
|
0f0c8bab43 | ||
|
|
e2d0974b3c | ||
|
|
12a27f85c5 |
No files matched your search
+42
-1
@@ -1,2 +1,43 @@
|
|||||||
# Auto detect text files and perform LF normalization
|
# В последующем может быть расширен или изменён, если посчитаем нужным
|
||||||
|
|
||||||
* text=auto
|
* text=auto
|
||||||
|
|
||||||
|
# ======================================
|
||||||
|
# 3D МОДЕЛИ И АНИМАЦИИ
|
||||||
|
# ======================================
|
||||||
|
*.blend filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.fbx filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.obj filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.3ds filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.dae filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.max filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.c4d filter=lfs diff=lfs merge=lfs -text
|
||||||
|
|
||||||
|
# ======================================
|
||||||
|
# ГРАФИКА (ИСХОДНИКИ)
|
||||||
|
# ======================================
|
||||||
|
*.psd filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.ai filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.skp filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.tga filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.exr filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.png filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.jpg filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.jpeg filter=lfs diff=lfs merge=lfs -text
|
||||||
|
|
||||||
|
# ======================================
|
||||||
|
# АУДИО (ИСХОДНИКИ)
|
||||||
|
# ======================================
|
||||||
|
*.wav filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.mp3 filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.ogg filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.aiff filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.flac filter=lfs diff=lfs merge=lfs -text
|
||||||
|
|
||||||
|
# ======================================
|
||||||
|
# ВИДЕО И КИНЕМАТИКА
|
||||||
|
# ======================================
|
||||||
|
*.mp4 filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.mov filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.avi filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.webm filter=lfs diff=lfs merge=lfs -text
|
||||||
+154
-44
@@ -1,75 +1,185 @@
|
|||||||
# This .gitignore file should be placed at the root of your Unity project directory
|
# ======================================
|
||||||
#
|
# UNITY - ОСНОВНЫЕ ИГНОРИРУЕМЫЕ ПАПКИ
|
||||||
# Get latest from https://github.com/github/gitignore/blob/main/Unity.gitignore
|
# ======================================
|
||||||
#
|
|
||||||
.utmp/
|
# Автогенерируемые Unity папки
|
||||||
|
|
||||||
|
# Кэш и временные файлы Unity
|
||||||
/[Ll]ibrary/
|
/[Ll]ibrary/
|
||||||
|
# Временные файлы компиляции
|
||||||
/[Tt]emp/
|
/[Tt]emp/
|
||||||
|
# Файлы объектов компиляции
|
||||||
/[Oo]bj/
|
/[Oo]bj/
|
||||||
|
# Сборки проекта
|
||||||
/[Bb]uild/
|
/[Bb]uild/
|
||||||
|
# Дополнительные сборки
|
||||||
/[Bb]uilds/
|
/[Bb]uilds/
|
||||||
|
# Логи Unity
|
||||||
/[Ll]ogs/
|
/[Ll]ogs/
|
||||||
|
# Пользовательские настройки
|
||||||
/[Uu]ser[Ss]ettings/
|
/[Uu]ser[Ss]ettings/
|
||||||
|
# Временные файлы Unity
|
||||||
|
.utmp/
|
||||||
|
|
||||||
|
# Файлы логов
|
||||||
*.log
|
*.log
|
||||||
|
|
||||||
# MemoryCaptures can get excessive in size.
|
# Файлы Blender (резервные копии)
|
||||||
# They also could contain extremely sensitive data
|
*.blend1
|
||||||
/[Mm]emoryCaptures/
|
*.blend1.meta
|
||||||
|
|
||||||
# Recordings can get excessive in size
|
# Записи и дампы памяти (могут быть очень большими)
|
||||||
|
|
||||||
|
# Дампы памяти (содержат чувствительные данные)
|
||||||
|
/[Mm]emoryCaptures/
|
||||||
|
# Записи (могут занимать много места)
|
||||||
/[Rr]ecordings/
|
/[Rr]ecordings/
|
||||||
|
|
||||||
# Uncomment this line if you wish to ignore the asset store tools plugin
|
# Автогенерируемые плагины Rider
|
||||||
# /[Aa]ssets/AssetStoreTools*
|
|
||||||
|
|
||||||
# Autogenerated Jetbrains Rider plugin
|
|
||||||
/[Aa]ssets/Plugins/Editor/JetBrains*
|
/[Aa]ssets/Plugins/Editor/JetBrains*
|
||||||
|
|
||||||
# Visual Studio cache directory
|
# ======================================
|
||||||
|
# ФАЙЛЫ СБОРОК И ПАКЕТОВ
|
||||||
|
# ======================================
|
||||||
|
|
||||||
|
# Готовые сборки и пакеты
|
||||||
|
|
||||||
|
# Android приложение
|
||||||
|
*.apk
|
||||||
|
|
||||||
|
# Android App Bundle
|
||||||
|
*.aab
|
||||||
|
|
||||||
|
# Пакет для Asset Store
|
||||||
|
*.unitypackage
|
||||||
|
|
||||||
|
# Meta файлы пакетов
|
||||||
|
*.unitypackage.meta
|
||||||
|
|
||||||
|
# macOS приложение
|
||||||
|
*.app
|
||||||
|
|
||||||
|
# Windows приложение
|
||||||
|
*.exe
|
||||||
|
|
||||||
|
# Addressables
|
||||||
|
/[Aa]ssets/[Aa]ddressable[Aa]ssets[Dd]ata/*/*.bin*
|
||||||
|
/ServerData
|
||||||
|
/[Aa]ssets/StreamingAssets/aa*
|
||||||
|
/[Aa]ssets/AddressableAssetsData/link.xml*
|
||||||
|
/[Aa]ssets/Addressables_Temp*
|
||||||
|
|
||||||
|
# Временные Android Assets
|
||||||
|
/[Aa]ssets/[Ss]treamingAssets/aa.meta
|
||||||
|
/[Aa]ssets/[Ss]treamingAssets/aa/*
|
||||||
|
|
||||||
|
# ======================================
|
||||||
|
# VISUAL STUDIO / RIDER / VS CODE
|
||||||
|
# ======================================
|
||||||
|
|
||||||
|
# Visual Studio
|
||||||
|
|
||||||
|
# Кэш Visual Studio
|
||||||
.vs/
|
.vs/
|
||||||
|
# Файлы проектов C#
|
||||||
# Gradle cache directory
|
|
||||||
.gradle/
|
|
||||||
|
|
||||||
# Autogenerated VS/MD/Consulo solution and project files
|
|
||||||
ExportedObj/
|
|
||||||
.consulo/
|
|
||||||
*.csproj
|
*.csproj
|
||||||
*.unityproj
|
# Файл решения
|
||||||
*.sln
|
*.sln
|
||||||
|
# Пользовательские настройки решения
|
||||||
*.suo
|
*.suo
|
||||||
*.tmp
|
# Пользовательские настройки проекта
|
||||||
*.user
|
*.user
|
||||||
|
# Пользовательские настройки
|
||||||
*.userprefs
|
*.userprefs
|
||||||
|
*.userosscache
|
||||||
|
*.rsuser
|
||||||
|
|
||||||
|
# JetBrains Rider
|
||||||
|
|
||||||
|
# Все файлы Rider
|
||||||
|
.idea/
|
||||||
|
# Файлы модулей
|
||||||
|
*.iml
|
||||||
|
# Файлы проектов
|
||||||
|
*.ipr
|
||||||
|
# Файлы рабочих пространств
|
||||||
|
*.iws
|
||||||
|
# Персональные настройки Rider
|
||||||
|
*.DotSettings.user
|
||||||
|
|
||||||
|
# VS Code
|
||||||
|
|
||||||
|
# Все настройки VS Code
|
||||||
|
.vscode/
|
||||||
|
# Игнорировать рабочие пространства
|
||||||
|
*.code-workspace
|
||||||
|
# Игнорировать установленные расширения
|
||||||
|
*.vsix
|
||||||
|
|
||||||
|
# ======================================
|
||||||
|
# ВСПОМОГАТЕЛЬНЫЕ ФАЙЛЫ СРЕД РАЗРАБОТКИ
|
||||||
|
# ======================================
|
||||||
|
|
||||||
|
# Общие временные файлы
|
||||||
|
|
||||||
|
# База данных отладки MonoDevelop
|
||||||
*.pidb
|
*.pidb
|
||||||
|
# База данных программ
|
||||||
|
*.pdb
|
||||||
|
# База данных Mono Debugging
|
||||||
|
*.mdb
|
||||||
|
# Открытая база данных
|
||||||
|
*.opendb
|
||||||
|
# База данных Visual C++
|
||||||
|
*.VC.db
|
||||||
*.booproj
|
*.booproj
|
||||||
*.svd
|
*.svd
|
||||||
*.pdb
|
*.tmp
|
||||||
*.mdb
|
*.unityproj
|
||||||
*.opendb
|
|
||||||
*.VC.db
|
|
||||||
|
|
||||||
# Unity3D generated meta files
|
# Mono crash файлы
|
||||||
|
mono_crash.*
|
||||||
|
|
||||||
|
# Файлы отчетов и системной информации
|
||||||
|
|
||||||
|
# Системная информация при крашах
|
||||||
|
sysinfo.txt
|
||||||
|
|
||||||
|
# ======================================
|
||||||
|
# META-ФАЙЛЫ
|
||||||
|
# ======================================
|
||||||
|
|
||||||
|
# Игнорировать только meta-файлы для временных файлов
|
||||||
*.pidb.meta
|
*.pidb.meta
|
||||||
*.pdb.meta
|
*.pdb.meta
|
||||||
*.mdb.meta
|
*.mdb.meta
|
||||||
|
|
||||||
# Unity3D generated file on crash reports
|
# ======================================
|
||||||
sysinfo.txt
|
# ТЕСТЫ И ВИЗУАЛЬНЫЕ СКРИПТЫ
|
||||||
|
# ======================================
|
||||||
|
|
||||||
# Builds
|
# Файлы TestRunner
|
||||||
*.apk
|
InitTestScene*.unity*
|
||||||
*.aab
|
|
||||||
*.unitypackage
|
|
||||||
*.unitypackage.meta
|
|
||||||
*.app
|
|
||||||
|
|
||||||
# Crashlytics generated file
|
# Автогенерированные сцены тестов
|
||||||
|
/[Aa]ssets/[Ii]nit[Tt]est[Ss]cene*.unity*
|
||||||
|
|
||||||
|
# Visual Scripting auto-generated files
|
||||||
|
/[Aa]ssets/Unity.VisualScripting.Generated/VisualScripting.Flow/UnitOptions.db
|
||||||
|
/[Aa]ssets/Unity.VisualScripting.Generated/VisualScripting.Flow/UnitOptions.db.meta
|
||||||
|
/[Aa]ssets/Unity.VisualScripting.Generated/VisualScripting.Core/Property Providers
|
||||||
|
/[Aa]ssets/Unity.VisualScripting.Generated/VisualScripting.Core/Property Providers.meta
|
||||||
|
|
||||||
|
# ======================================
|
||||||
|
# ДОПОЛНИТЕЛЬНЫЕ НАСТРОЙКИ
|
||||||
|
# ======================================
|
||||||
|
|
||||||
|
# Gradle (для Android сборок)
|
||||||
|
.gradle/
|
||||||
|
|
||||||
|
# Другие автосгенерированные файлы
|
||||||
|
ExportedObj/
|
||||||
|
.consulo/
|
||||||
|
|
||||||
|
# Crashlytics
|
||||||
crashlytics-build.properties
|
crashlytics-build.properties
|
||||||
|
|
||||||
# Packed Addressables
|
|
||||||
/[Aa]ssets/[Aa]ddressable[Aa]ssets[Dd]ata/*/*.bin*
|
|
||||||
|
|
||||||
# Temporary auto-generated Android Assets
|
|
||||||
/[Aa]ssets/[Ss]treamingAssets/aa.meta
|
|
||||||
/[Aa]ssets/[Ss]treamingAssets/aa/*
|
|
||||||
Generated
+8
@@ -0,0 +1,8 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="UserContentModel">
|
||||||
|
<attachedFolders />
|
||||||
|
<explicitIncludes />
|
||||||
|
<explicitExcludes />
|
||||||
|
</component>
|
||||||
|
</project>
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="RiderProjectSettingsUpdater">
|
||||||
|
<option name="singleClickDiffPreview" value="1" />
|
||||||
|
<option name="vcsConfiguration" value="3" />
|
||||||
|
</component>
|
||||||
|
</project>
|
||||||
Generated
+6
@@ -0,0 +1,6 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="VcsDirectoryMappings">
|
||||||
|
<mapping directory="" vcs="Git" />
|
||||||
|
</component>
|
||||||
|
</project>
|
||||||
Generated
+231
@@ -0,0 +1,231 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="AutoImportSettings">
|
||||||
|
<option name="autoReloadType" value="SELECTIVE" />
|
||||||
|
</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 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/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/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" />
|
||||||
|
</list>
|
||||||
|
<option name="SHOW_DIALOG" value="false" />
|
||||||
|
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
||||||
|
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
|
||||||
|
<option name="LAST_RESOLUTION" value="IGNORE" />
|
||||||
|
</component>
|
||||||
|
<component name="Git.Settings">
|
||||||
|
<option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
|
||||||
|
</component>
|
||||||
|
<component name="HighlightingSettingsPerFile">
|
||||||
|
<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://$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>
|
||||||
|
<component name="ProjectColorInfo">{
|
||||||
|
"associatedIndex": 2
|
||||||
|
}</component>
|
||||||
|
<component name="ProjectId" id="38WaBM3xnp06hWLmWixBiTqujw8" />
|
||||||
|
<component name="ProjectViewState">
|
||||||
|
<option name="hideEmptyMiddlePackages" value="true" />
|
||||||
|
<option name="showLibraryContents" value="true" />
|
||||||
|
</component>
|
||||||
|
<component name="PropertiesComponent">{
|
||||||
|
"keyToString": {
|
||||||
|
"Attach to Unity Editor.Attach to Unity Editor.executor": "Debug",
|
||||||
|
"RunOnceActivity.ShowReadmeOnStart": "true",
|
||||||
|
"git-widget-placeholder": "NotLiminalPCG",
|
||||||
|
"node.js.detected.package.eslint": "true",
|
||||||
|
"node.js.detected.package.tslint": "true",
|
||||||
|
"node.js.selected.package.eslint": "(autodetect)",
|
||||||
|
"node.js.selected.package.tslint": "(autodetect)",
|
||||||
|
"nodejs_package_manager_path": "npm",
|
||||||
|
"vue.rearranger.settings.migration": "true"
|
||||||
|
}
|
||||||
|
}</component>
|
||||||
|
<component name="RunManager" selected="Attach to Unity Editor.Attach to Unity Editor">
|
||||||
|
<configuration name="Standalone Player" type="RunUnityExe" factoryName="Unity Executable">
|
||||||
|
<option name="EXE_PATH" value="$PROJECT_DIR$/../../Builds/Logo\Infratest.exe" />
|
||||||
|
<option name="PROGRAM_PARAMETERS" value="" />
|
||||||
|
<option name="WORKING_DIRECTORY" value="A:\Builds\Logo" />
|
||||||
|
<option name="PASS_PARENT_ENVS" value="1" />
|
||||||
|
<option name="USE_EXTERNAL_CONSOLE" value="0" />
|
||||||
|
<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="PROGRAM_PARAMETERS" value="-projectPath A:\Projects\Infra -debugCodeOptimization" />
|
||||||
|
<option name="WORKING_DIRECTORY" value="A:\Projects\Infra" />
|
||||||
|
<option name="PASS_PARENT_ENVS" value="1" />
|
||||||
|
<option name="USE_EXTERNAL_CONSOLE" value="0" />
|
||||||
|
<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="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" />
|
||||||
|
<option name="USE_EXTERNAL_CONSOLE" value="0" />
|
||||||
|
<method v="2" />
|
||||||
|
</configuration>
|
||||||
|
<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">
|
||||||
|
<option name="allowRunningInParallel" value="false" />
|
||||||
|
<option name="listenPortForConnections" value="false" />
|
||||||
|
<option name="pid" />
|
||||||
|
<option name="projectPathOnTarget" />
|
||||||
|
<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" ignored-value-for-modified-check="6116">
|
||||||
|
<option name="allowRunningInParallel" value="false" />
|
||||||
|
<option name="listenPortForConnections" value="false" />
|
||||||
|
<option name="pid" value="6116" />
|
||||||
|
<option name="projectPathOnTarget" />
|
||||||
|
<option name="selectedOptions">
|
||||||
|
<list />
|
||||||
|
</option>
|
||||||
|
<method v="2" />
|
||||||
|
</configuration>
|
||||||
|
</component>
|
||||||
|
<component name="SpellCheckerSettings" RuntimeDictionaries="0" Folders="0" CustomDictionaries="0" DefaultDictionary="application-level" UseSingleDictionary="true" transferred="true" />
|
||||||
|
<component name="TaskManager">
|
||||||
|
<task active="true" id="Default" summary="Default task">
|
||||||
|
<changelist id="7a4e4e1b-6c5f-4c8d-968e-512e90aa8c7c" name="Changes" comment="" />
|
||||||
|
<created>1768917644200</created>
|
||||||
|
<option name="number" value="Default" />
|
||||||
|
<option name="presentableId" value="Default" />
|
||||||
|
<updated>1768917644200</updated>
|
||||||
|
<workItem from="1768917645584" duration="9243000" />
|
||||||
|
<workItem from="1768978880434" duration="5920000" />
|
||||||
|
<workItem from="1769169358065" duration="12883000" />
|
||||||
|
<workItem from="1769342663511" duration="4805000" />
|
||||||
|
<workItem from="1769350118757" duration="196000" />
|
||||||
|
<workItem from="1769608253594" duration="3971000" />
|
||||||
|
<workItem from="1770363329441" duration="12586000" />
|
||||||
|
<workItem from="1770407896165" duration="404000" />
|
||||||
|
<workItem from="1770451319773" duration="10815000" />
|
||||||
|
<workItem from="1770634886406" duration="8191000" />
|
||||||
|
</task>
|
||||||
|
<servers />
|
||||||
|
</component>
|
||||||
|
<component name="TypeScriptGeneratedFilesManager">
|
||||||
|
<option name="version" value="3" />
|
||||||
|
</component>
|
||||||
|
<component name="UnityProjectConfiguration" hasMinimizedUI="true" />
|
||||||
|
<component name="UnityProjectDiscoverer">
|
||||||
|
<option name="hasUnityReference" value="true" />
|
||||||
|
<option name="unityProject" value="true" />
|
||||||
|
<option name="unityProjectFolder" value="true" />
|
||||||
|
</component>
|
||||||
|
<component name="UnityUnitTestConfiguration" currentTestLauncher="Both" />
|
||||||
|
<component name="VcsManagerConfiguration">
|
||||||
|
<option name="CLEAR_INITIAL_COMMIT_MESSAGE" value="true" />
|
||||||
|
</component>
|
||||||
|
<component name="XDebuggerManager">
|
||||||
|
<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'">
|
||||||
|
<startOffsets>
|
||||||
|
<option value="5436" />
|
||||||
|
</startOffsets>
|
||||||
|
<endOffsets>
|
||||||
|
<option value="5530" />
|
||||||
|
</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" />
|
||||||
|
</line-breakpoint>
|
||||||
|
</breakpoints>
|
||||||
|
</breakpoint-manager>
|
||||||
|
</component>
|
||||||
|
</project>
|
||||||
@@ -2,6 +2,7 @@
|
|||||||
<project version="4">
|
<project version="4">
|
||||||
<component name="RiderProjectSettingsUpdater">
|
<component name="RiderProjectSettingsUpdater">
|
||||||
<option name="singleClickDiffPreview" value="1" />
|
<option name="singleClickDiffPreview" value="1" />
|
||||||
|
<option name="unhandledExceptionsIgnoreList" value="1" />
|
||||||
<option name="vcsConfiguration" value="3" />
|
<option name="vcsConfiguration" value="3" />
|
||||||
</component>
|
</component>
|
||||||
</project>
|
</project>
|
||||||
+132
-70
@@ -5,17 +5,38 @@
|
|||||||
</component>
|
</component>
|
||||||
<component name="ChangeListManager">
|
<component name="ChangeListManager">
|
||||||
<list default="true" id="ed1a3c4f-83ac-4211-ae32-004a26afd5d8" name="Changes" comment="">
|
<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$/.idea/.idea.Infratest/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/.idea.Infratest/.idea/workspace.xml" 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/AddressableAssetsData/AddressableAssetSettings.asset" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/AddressableAssetsData/AddressableAssetSettings.asset" afterDir="false" />
|
||||||
<change beforePath="$PROJECT_DIR$/Assets/Code/Infrastructure/EventBus/EventBus.cs" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/Code/Infrastructure/EventBus/EventBus.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/Resources/ProjectScope.prefab" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/Resources/ProjectScope.prefab" 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/Resources/ReflexSettings.asset" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/Resources/ReflexSettings.asset" 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/Resources/ReflexSettings.asset.meta" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/Resources/ReflexSettings.asset.meta" 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/Scenes/Bootstrap.unity" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/Scenes/Bootstrap.unity" 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/Scenes/Gameplay.unity" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/Scenes/Gameplay.unity" 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$/Packages/manifest.json" beforeDir="false" afterPath="$PROJECT_DIR$/Packages/manifest.json" 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$/Packages/packages-lock.json" beforeDir="false" afterPath="$PROJECT_DIR$/Packages/packages-lock.json" 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$/ProjectSettings/ShaderGraphSettings.asset" beforeDir="false" afterPath="$PROJECT_DIR$/ProjectSettings/ShaderGraphSettings.asset" 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" />
|
||||||
</list>
|
</list>
|
||||||
<option name="SHOW_DIALOG" value="false" />
|
<option name="SHOW_DIALOG" value="false" />
|
||||||
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
||||||
@@ -23,24 +44,51 @@
|
|||||||
<option name="LAST_RESOLUTION" value="IGNORE" />
|
<option name="LAST_RESOLUTION" value="IGNORE" />
|
||||||
</component>
|
</component>
|
||||||
<component name="DpaMonitoringSettings">
|
<component name="DpaMonitoringSettings">
|
||||||
<option name="autoShow" value="false" />
|
<option name="firstShow" value="false" />
|
||||||
</component>
|
</component>
|
||||||
<component name="Git.Settings">
|
<component name="Git.Settings">
|
||||||
<option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
|
<option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
|
||||||
</component>
|
</component>
|
||||||
<component name="HighlightingSettingsPerFile">
|
<component name="HighlightingSettingsPerFile">
|
||||||
|
<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/6a608067b36b43a4b2b9c2c9f46aac8b212200/95/3a3a110c/Vector3.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" />
|
||||||
|
<setting file="file://$PROJECT_DIR$/Assets/Code/Example/Race/Racer/AI/AIRacerID.cs" root0="FORCE_HIGHLIGHTING" />
|
||||||
|
<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/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" />
|
||||||
|
<setting file="file://$PROJECT_DIR$/Assets/Code/Example/Race/Racer/RacistSpawnListDebug.cs" root0="FORCE_HIGHLIGHTING" />
|
||||||
|
<setting file="file://$PROJECT_DIR$/Assets/Code/Example/Race/Track/CheckPoint.cs" root0="FORCE_HIGHLIGHTING" />
|
||||||
|
<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/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/CameraStates/CameraTemp.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/Loadings/Loading.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/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.cysharp.unitask@a85b92a8e443/Runtime/UniTaskScheduler.cs" root0="SKIP_HIGHLIGHTING" />
|
||||||
<setting file="file://$PROJECT_DIR$/Library/PackageCache/com.unity.addressables@45e9abf44299/Runtime/ResourceManager/AsyncOperations/AsyncOperationBase.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.unity.addressables@45e9abf44299/Runtime/ResourceManager/AsyncOperations/AsyncOperationHandle.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.unity.addressables@45e9abf44299/Runtime/ResourceManager/AsyncOperations/ChainOperation.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@45e9abf44299/Runtime/ResourceManager/Util/DelegateList.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@45e9abf44299/Runtime/ResourceManager/Util/MonoBehaviourCallbackHooks.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://$APPLICATION_CONFIG_DIR$/resharper-host/DecompilerCache/decompiler/1eb9db207454431c84a47bcd81e79c3746ae00/50/ee0759d6/Dictionary`2.cs" root0="FORCE_HIGHLIGHTING" />
|
<setting file="file://$PROJECT_DIR$/Library/PackageCache/com.unity.addressables@13d9ede188ab/Runtime/ResourceManager/AsyncOperations/AsyncOperationHandle.cs" root0="SKIP_HIGHLIGHTING" />
|
||||||
<setting file="file://$APPLICATION_CONFIG_DIR$/resharper-host/DecompilerCache/decompiler/493b407efcb64dddad59f28bb0b831d3212400/1d/b6f4672d/Vector2.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://$APPLICATION_CONFIG_DIR$/resharper-host/DecompilerCache/decompiler/493b407efcb64dddad59f28bb0b831d3212400/e6/06b4bbec/Component.cs" root0="FORCE_HIGHLIGHTING" />
|
|
||||||
<setting file="file://$APPLICATION_CONFIG_DIR$/resharper-host/DecompilerCache/decompiler/6faa6124236442759eb396cfbfdad50810fc00/3f/3a201145/Enumerable.cs" root0="FORCE_HIGHLIGHTING" />
|
|
||||||
</component>
|
</component>
|
||||||
<component name="ProjectColorInfo">{
|
<component name="ProjectColorInfo">{
|
||||||
"customColor": "",
|
"customColor": "",
|
||||||
@@ -55,8 +103,10 @@
|
|||||||
"keyToString": {
|
"keyToString": {
|
||||||
"Attach to Unity Editor.Attach to Unity Editor.executor": "Debug",
|
"Attach to Unity Editor.Attach to Unity Editor.executor": "Debug",
|
||||||
"RunOnceActivity.ShowReadmeOnStart": "true",
|
"RunOnceActivity.ShowReadmeOnStart": "true",
|
||||||
|
"RunOnceActivity.git.unshallow": "true",
|
||||||
|
"RunOnceActivity.typescript.service.memoryLimit.init": "true",
|
||||||
"XThreadsFramesViewSplitterKey": "0.31173185",
|
"XThreadsFramesViewSplitterKey": "0.31173185",
|
||||||
"git-widget-placeholder": "NotLiminalOne",
|
"git-widget-placeholder": "NotLiminalPCG",
|
||||||
"node.js.detected.package.eslint": "true",
|
"node.js.detected.package.eslint": "true",
|
||||||
"node.js.detected.package.tslint": "true",
|
"node.js.detected.package.tslint": "true",
|
||||||
"node.js.selected.package.eslint": "(autodetect)",
|
"node.js.selected.package.eslint": "(autodetect)",
|
||||||
@@ -67,41 +117,56 @@
|
|||||||
}</component>
|
}</component>
|
||||||
<component name="RunManager" selected="Attach to Unity Editor.Attach to Unity Editor">
|
<component name="RunManager" selected="Attach to Unity Editor.Attach to Unity Editor">
|
||||||
<configuration name="Start Unity" type="RunUnityExe" factoryName="Unity Executable">
|
<configuration name="Start Unity" type="RunUnityExe" factoryName="Unity Executable">
|
||||||
<option name="EXE_PATH" value="C:\Program Files\Unity\Hub\Editor\6000.3.1f1\Editor\Unity.exe" />
|
<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" />
|
<option name="PROGRAM_PARAMETERS" value="-projectPath A:\Projects\Infratest -debugCodeOptimization" />
|
||||||
<option name="WORKING_DIRECTORY" value="A:\Projects\Infratest" />
|
<option name="WORKING_DIRECTORY" value="A:\Projects\Infratest" />
|
||||||
<option name="PASS_PARENT_ENVS" value="1" />
|
<option name="PASS_PARENT_ENVS" value="1" />
|
||||||
<option name="USE_EXTERNAL_CONSOLE" value="0" />
|
<option name="ENV_FILE_PATHS" value="" />
|
||||||
|
<option name="REDIRECT_INPUT_PATH" value="" />
|
||||||
|
<option name="MIXED_MODE_DEBUG" value="0" />
|
||||||
<method v="2" />
|
<method v="2" />
|
||||||
</configuration>
|
</configuration>
|
||||||
<configuration name="Unit Tests (batch mode)" type="RunUnityExe" factoryName="Unity Executable">
|
<configuration name="Unit Tests (batch mode)" type="RunUnityExe" factoryName="Unity Executable">
|
||||||
<option name="EXE_PATH" value="C:\Program Files\Unity\Hub\Editor\6000.3.1f1\Editor\Unity.exe" />
|
<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" />
|
<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="WORKING_DIRECTORY" value="A:\Projects\Infratest" />
|
||||||
<option name="PASS_PARENT_ENVS" value="1" />
|
<option name="PASS_PARENT_ENVS" value="1" />
|
||||||
<option name="USE_EXTERNAL_CONSOLE" value="0" />
|
<option name="ENV_FILE_PATHS" value="" />
|
||||||
|
<option name="REDIRECT_INPUT_PATH" value="" />
|
||||||
|
<option name="MIXED_MODE_DEBUG" value="0" />
|
||||||
<method v="2" />
|
<method v="2" />
|
||||||
</configuration>
|
</configuration>
|
||||||
<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">
|
<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="allowRunningInParallel" value="false" />
|
||||||
<option name="listenPortForConnections" value="false" />
|
<option name="listenPortForConnections" value="false" />
|
||||||
<option name="pid" />
|
<option name="pid" />
|
||||||
<option name="projectPathOnTarget" />
|
<option name="projectPathOnTarget" />
|
||||||
|
<option name="runtimes">
|
||||||
|
<list />
|
||||||
|
</option>
|
||||||
<option name="selectedOptions">
|
<option name="selectedOptions">
|
||||||
<list />
|
<list />
|
||||||
</option>
|
</option>
|
||||||
<method v="2" />
|
<method v="2" />
|
||||||
</configuration>
|
</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">
|
<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">
|
||||||
<option name="allowRunningInParallel" value="false" />
|
<option name="allowRunningInParallel" value="false" />
|
||||||
<option name="listenPortForConnections" value="false" />
|
<option name="listenPortForConnections" value="false" />
|
||||||
<option name="pid" />
|
<option name="pid" value="11838" />
|
||||||
<option name="projectPathOnTarget" />
|
<option name="projectPathOnTarget" />
|
||||||
|
<option name="runtimes">
|
||||||
|
<list>
|
||||||
|
<MonoRuntime />
|
||||||
|
</list>
|
||||||
|
</option>
|
||||||
<option name="selectedOptions">
|
<option name="selectedOptions">
|
||||||
<list />
|
<list />
|
||||||
</option>
|
</option>
|
||||||
<method v="2" />
|
<method v="2" />
|
||||||
</configuration>
|
</configuration>
|
||||||
|
<configuration name="Attach to" type="UnityDevicePlayer" factoryName="UnityAttachToDevicePlayer">
|
||||||
|
<method v="2" />
|
||||||
|
</configuration>
|
||||||
</component>
|
</component>
|
||||||
<component name="SpellCheckerSettings" RuntimeDictionaries="0" Folders="0" CustomDictionaries="0" DefaultDictionary="application-level" UseSingleDictionary="true" transferred="true" />
|
<component name="SpellCheckerSettings" RuntimeDictionaries="0" Folders="0" CustomDictionaries="0" DefaultDictionary="application-level" UseSingleDictionary="true" transferred="true" />
|
||||||
<component name="TaskManager">
|
<component name="TaskManager">
|
||||||
@@ -146,6 +211,31 @@
|
|||||||
<workItem from="1768124782138" duration="5579000" />
|
<workItem from="1768124782138" duration="5579000" />
|
||||||
<workItem from="1768228201670" duration="4137000" />
|
<workItem from="1768228201670" duration="4137000" />
|
||||||
<workItem from="1768237217087" duration="2844000" />
|
<workItem from="1768237217087" duration="2844000" />
|
||||||
|
<workItem from="1769439297620" duration="1762000" />
|
||||||
|
<workItem from="1769443636668" duration="4743000" />
|
||||||
|
<workItem from="1769457001410" duration="1827000" />
|
||||||
|
<workItem from="1769468220482" duration="3957000" />
|
||||||
|
<workItem from="1769499590280" duration="4392000" />
|
||||||
|
<workItem from="1769505995859" duration="384000" />
|
||||||
|
<workItem from="1769519972053" duration="198000" />
|
||||||
|
<workItem from="1769520195570" duration="4307000" />
|
||||||
|
<workItem from="1769616178141" duration="8124000" />
|
||||||
|
<workItem from="1769685044180" duration="3821000" />
|
||||||
|
<workItem from="1769688891286" duration="148000" />
|
||||||
|
<workItem from="1769689778555" duration="5198000" />
|
||||||
|
<workItem from="1769695609554" duration="4859000" />
|
||||||
|
<workItem from="1769702519801" duration="3602000" />
|
||||||
|
<workItem from="1769766033912" duration="6151000" />
|
||||||
|
<workItem from="1769776787822" duration="804000" />
|
||||||
|
<workItem from="1769777674316" duration="478000" />
|
||||||
|
<workItem from="1769778405201" duration="7609000" />
|
||||||
|
<workItem from="1769786786936" duration="8000" />
|
||||||
|
<workItem from="1769789338816" duration="4589000" />
|
||||||
|
<workItem from="1770035621021" duration="8618000" />
|
||||||
|
<workItem from="1770049545882" duration="2652000" />
|
||||||
|
<workItem from="1770226628030" duration="3133000" />
|
||||||
|
<workItem from="1770297444061" duration="2414000" />
|
||||||
|
<workItem from="1770394380051" duration="4532000" />
|
||||||
</task>
|
</task>
|
||||||
<servers />
|
<servers />
|
||||||
</component>
|
</component>
|
||||||
@@ -168,55 +258,27 @@
|
|||||||
<line-breakpoint enabled="true" type="DotNet Breakpoints">
|
<line-breakpoint enabled="true" type="DotNet Breakpoints">
|
||||||
<url>file://$PROJECT_DIR$/Assets/Code/Example/Liminal/Character/LiminalCharacterController.cs</url>
|
<url>file://$PROJECT_DIR$/Assets/Code/Example/Liminal/Character/LiminalCharacterController.cs</url>
|
||||||
<line>239</line>
|
<line>239</line>
|
||||||
<properties documentPath="A:\Projects\Infratest\Assets\Code\Example\Liminal\Character\LiminalCharacterController.cs" containingFunctionPresentation="Method 'UpdateRotation'">
|
<properties documentPath="A:\Projects\Infratest\Assets\Code\Example\Liminal\Character\LiminalCharacterController.cs" containingFunctionPresentation="Method 'UpdateRotation'" />
|
||||||
<startOffsets>
|
|
||||||
<option value="8514" />
|
|
||||||
</startOffsets>
|
|
||||||
<endOffsets>
|
|
||||||
<option value="8672" />
|
|
||||||
</endOffsets>
|
|
||||||
</properties>
|
|
||||||
<option name="timeStamp" value="57" />
|
<option name="timeStamp" value="57" />
|
||||||
</line-breakpoint>
|
</line-breakpoint>
|
||||||
<line-breakpoint enabled="true" type="DotNet Breakpoints">
|
<line-breakpoint enabled="true" type="DotNet Breakpoints">
|
||||||
<url>file://$PROJECT_DIR$/Assets/Code/Example/Liminal/Character/LiminalCharacterController.cs</url>
|
<url>file://$PROJECT_DIR$/Assets/Code/Example/Liminal/Character/LiminalCharacterController.cs</url>
|
||||||
<line>245</line>
|
<line>245</line>
|
||||||
<properties documentPath="A:\Projects\Infratest\Assets\Code\Example\Liminal\Character\LiminalCharacterController.cs" containingFunctionPresentation="Method 'UpdateRotation'">
|
<properties documentPath="A:\Projects\Infratest\Assets\Code\Example\Liminal\Character\LiminalCharacterController.cs" containingFunctionPresentation="Method 'UpdateRotation'" />
|
||||||
<startOffsets>
|
|
||||||
<option value="8967" />
|
|
||||||
</startOffsets>
|
|
||||||
<endOffsets>
|
|
||||||
<option value="9010" />
|
|
||||||
</endOffsets>
|
|
||||||
</properties>
|
|
||||||
<option name="timeStamp" value="58" />
|
<option name="timeStamp" value="58" />
|
||||||
</line-breakpoint>
|
</line-breakpoint>
|
||||||
<line-breakpoint enabled="true" type="DotNet Breakpoints">
|
<breakpoint enabled="true" type="DotNet_Exception_Breakpoints">
|
||||||
<url>file://$PROJECT_DIR$/Assets/Code/Infrastructure/Camera/CameraFactory.cs</url>
|
<properties exception="System.OperationCanceledException" breakIfHandledByOtherCode="false" displayValue="System.OperationCanceledException" />
|
||||||
<line>50</line>
|
<option name="timeStamp" value="62" />
|
||||||
<properties documentPath="A:\Projects\Infratest\Assets\Code\Infrastructure\Camera\CameraFactory.cs" containingFunctionPresentation="Method 'CreateCameraStateMachine'">
|
</breakpoint>
|
||||||
<startOffsets>
|
<breakpoint enabled="true" type="DotNet_Exception_Breakpoints">
|
||||||
<option value="2190" />
|
<properties exception="System.Threading.Tasks.TaskCanceledException" breakIfHandledByOtherCode="false" displayValue="System.Threading.Tasks.TaskCanceledException" />
|
||||||
</startOffsets>
|
<option name="timeStamp" value="63" />
|
||||||
<endOffsets>
|
</breakpoint>
|
||||||
<option value="2295" />
|
<breakpoint enabled="true" type="DotNet_Exception_Breakpoints">
|
||||||
</endOffsets>
|
<properties exception="System.Threading.ThreadAbortException" breakIfHandledByOtherCode="false" displayValue="System.Threading.ThreadAbortException" />
|
||||||
</properties>
|
<option name="timeStamp" value="64" />
|
||||||
<option name="timeStamp" value="60" />
|
</breakpoint>
|
||||||
</line-breakpoint>
|
|
||||||
<line-breakpoint enabled="true" type="DotNet Breakpoints">
|
|
||||||
<url>file://$PROJECT_DIR$/Assets/Code/Infrastructure/Camera/CameraFactory.cs</url>
|
|
||||||
<line>35</line>
|
|
||||||
<properties documentPath="A:\Projects\Infratest\Assets\Code\Infrastructure\Camera\CameraFactory.cs" containingFunctionPresentation="Method 'CreateCameraStateMachine'">
|
|
||||||
<startOffsets>
|
|
||||||
<option value="1345" />
|
|
||||||
</startOffsets>
|
|
||||||
<endOffsets>
|
|
||||||
<option value="1495" />
|
|
||||||
</endOffsets>
|
|
||||||
</properties>
|
|
||||||
<option name="timeStamp" value="61" />
|
|
||||||
</line-breakpoint>
|
|
||||||
</breakpoints>
|
</breakpoints>
|
||||||
</breakpoint-manager>
|
</breakpoint-manager>
|
||||||
</component>
|
</component>
|
||||||
|
|||||||
Generated
+8
@@ -0,0 +1,8 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="UserContentModel">
|
||||||
|
<attachedFolders />
|
||||||
|
<explicitIncludes />
|
||||||
|
<explicitExcludes />
|
||||||
|
</component>
|
||||||
|
</project>
|
||||||
Generated
+8
@@ -0,0 +1,8 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="RiderProjectSettingsUpdater">
|
||||||
|
<option name="singleClickDiffPreview" value="1" />
|
||||||
|
<option name="unhandledExceptionsIgnoreList" value="1" />
|
||||||
|
<option name="vcsConfiguration" value="3" />
|
||||||
|
</component>
|
||||||
|
</project>
|
||||||
Generated
+6
@@ -0,0 +1,6 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="VcsDirectoryMappings">
|
||||||
|
<mapping directory="" vcs="Git" />
|
||||||
|
</component>
|
||||||
|
</project>
|
||||||
Generated
+90
@@ -0,0 +1,90 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="AutoImportSettings">
|
||||||
|
<option name="autoReloadType" value="SELECTIVE" />
|
||||||
|
</component>
|
||||||
|
<component name="ChangeListManager">
|
||||||
|
<list default="true" id="f63980da-ead4-405c-827d-acf0244b2268" name="Changes" comment="">
|
||||||
|
<change afterPath="$PROJECT_DIR$/Assets/Code/Infrastructure/Audio/AudioInfo.cs" afterDir="false" />
|
||||||
|
<change afterPath="$PROJECT_DIR$/Assets/Code/Infrastructure/Audio/AudioInfo.cs.meta" afterDir="false" />
|
||||||
|
<change afterPath="$PROJECT_DIR$/Assets/Code/Infrastructure/Audio/AudioNames.cs" afterDir="false" />
|
||||||
|
<change afterPath="$PROJECT_DIR$/Assets/Code/Infrastructure/Audio/AudioNames.cs.meta" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/Packages/manifest.json" beforeDir="false" afterPath="$PROJECT_DIR$/Packages/manifest.json" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/Packages/packages-lock.json" beforeDir="false" afterPath="$PROJECT_DIR$/Packages/packages-lock.json" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/ProjectSettings/ProjectVersion.txt" beforeDir="false" afterPath="$PROJECT_DIR$/ProjectSettings/ProjectVersion.txt" afterDir="false" />
|
||||||
|
</list>
|
||||||
|
<option name="SHOW_DIALOG" value="false" />
|
||||||
|
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
||||||
|
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
|
||||||
|
<option name="LAST_RESOLUTION" value="IGNORE" />
|
||||||
|
</component>
|
||||||
|
<component name="Git.Settings">
|
||||||
|
<option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
|
||||||
|
</component>
|
||||||
|
<component name="HighlightingSettingsPerFile">
|
||||||
|
<setting file="file://$PROJECT_DIR$/Assets/Code/Infrastructure/Audio/AudioFactory.cs" root0="SKIP_HIGHLIGHTING" />
|
||||||
|
<setting file="file://$PROJECT_DIR$/Assets/Code/Infrastructure/Audio/AudioInfo.cs" root0="SKIP_HIGHLIGHTING" />
|
||||||
|
<setting file="file://$PROJECT_DIR$/Assets/Code/Infrastructure/Audio/AudioNames.cs" root0="SKIP_HIGHLIGHTING" />
|
||||||
|
</component>
|
||||||
|
<component name="ProjectColorInfo"><![CDATA[{
|
||||||
|
"associatedIndex": 3
|
||||||
|
}]]></component>
|
||||||
|
<component name="ProjectId" id="38nZCoa05XMGjvCiidouET2bKxO" />
|
||||||
|
<component name="ProjectViewState">
|
||||||
|
<option name="hideEmptyMiddlePackages" value="true" />
|
||||||
|
<option name="showLibraryContents" value="true" />
|
||||||
|
</component>
|
||||||
|
<component name="PropertiesComponent"><![CDATA[{
|
||||||
|
"keyToString": {
|
||||||
|
"ModuleVcsDetector.initialDetectionPerformed": "true",
|
||||||
|
"RunOnceActivity.ShowReadmeOnStart": "true",
|
||||||
|
"RunOnceActivity.git.unshallow": "true",
|
||||||
|
"git-widget-placeholder": "NotLiminalPCG",
|
||||||
|
"node.js.detected.package.eslint": "true",
|
||||||
|
"node.js.detected.package.tslint": "true",
|
||||||
|
"node.js.selected.package.eslint": "(autodetect)",
|
||||||
|
"node.js.selected.package.tslint": "(autodetect)",
|
||||||
|
"nodejs_package_manager_path": "npm",
|
||||||
|
"vue.rearranger.settings.migration": "true"
|
||||||
|
}
|
||||||
|
}]]></component>
|
||||||
|
<component name="TaskManager">
|
||||||
|
<task active="true" id="Default" summary="Default task">
|
||||||
|
<changelist id="f63980da-ead4-405c-827d-acf0244b2268" name="Changes" comment="" />
|
||||||
|
<created>1769437172471</created>
|
||||||
|
<option name="number" value="Default" />
|
||||||
|
<option name="presentableId" value="Default" />
|
||||||
|
<updated>1769437172471</updated>
|
||||||
|
<workItem from="1769437174936" duration="1797000" />
|
||||||
|
</task>
|
||||||
|
<servers />
|
||||||
|
</component>
|
||||||
|
<component name="TypeScriptGeneratedFilesManager">
|
||||||
|
<option name="version" value="3" />
|
||||||
|
</component>
|
||||||
|
<component name="UnityProjectConfiguration" hasMinimizedUI="false" />
|
||||||
|
<component name="UnityProjectDiscoverer">
|
||||||
|
<option name="unityProjectFolder" value="true" />
|
||||||
|
</component>
|
||||||
|
<component name="VcsManagerConfiguration">
|
||||||
|
<option name="CLEAR_INITIAL_COMMIT_MESSAGE" value="true" />
|
||||||
|
</component>
|
||||||
|
<component name="XDebuggerManager">
|
||||||
|
<breakpoint-manager>
|
||||||
|
<breakpoints>
|
||||||
|
<breakpoint enabled="true" type="DotNet_Exception_Breakpoints">
|
||||||
|
<properties exception="System.OperationCanceledException" breakIfHandledByOtherCode="false" displayValue="System.OperationCanceledException" />
|
||||||
|
<option name="timeStamp" value="1" />
|
||||||
|
</breakpoint>
|
||||||
|
<breakpoint enabled="true" type="DotNet_Exception_Breakpoints">
|
||||||
|
<properties exception="System.Threading.Tasks.TaskCanceledException" breakIfHandledByOtherCode="false" displayValue="System.Threading.Tasks.TaskCanceledException" />
|
||||||
|
<option name="timeStamp" value="2" />
|
||||||
|
</breakpoint>
|
||||||
|
<breakpoint enabled="true" type="DotNet_Exception_Breakpoints">
|
||||||
|
<properties exception="System.Threading.ThreadAbortException" breakIfHandledByOtherCode="false" displayValue="System.Threading.ThreadAbortException" />
|
||||||
|
<option name="timeStamp" value="3" />
|
||||||
|
</breakpoint>
|
||||||
|
</breakpoints>
|
||||||
|
</breakpoint-manager>
|
||||||
|
</component>
|
||||||
|
</project>
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
%YAML 1.1
|
||||||
|
%TAG !u! tag:unity3d.com,2011:
|
||||||
|
--- !u!114 &11400000
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 0}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: dea69d41f90c6ea4fa55c27c1d60c145, type: 3}
|
||||||
|
m_Name: AddressableAssetGroupSortSettings
|
||||||
|
m_EditorClassIdentifier: Unity.Addressables.Editor::UnityEditor.AddressableAssets.Settings.GroupSchemas.AddressableAssetGroupSortSettings
|
||||||
|
sortOrder:
|
||||||
|
- d790534e015d692428ac5a9ce7d2ceb6
|
||||||
+1
-1
@@ -1,5 +1,5 @@
|
|||||||
fileFormatVersion: 2
|
fileFormatVersion: 2
|
||||||
guid: f146779bcd07c524097072c871162bff
|
guid: d4769b93af55e1195a9506acfa3d9c28
|
||||||
NativeFormatImporter:
|
NativeFormatImporter:
|
||||||
externalObjects: {}
|
externalObjects: {}
|
||||||
mainObjectFileID: 11400000
|
mainObjectFileID: 11400000
|
||||||
@@ -102,6 +102,11 @@ MonoBehaviour:
|
|||||||
- default
|
- default
|
||||||
- SceneConfig
|
- SceneConfig
|
||||||
- CameraConfig
|
- CameraConfig
|
||||||
|
- UIPanelConfig
|
||||||
|
- PostProccessVolume
|
||||||
|
- AudioInfoConfig
|
||||||
|
- AudioSettingsConfig
|
||||||
|
- RacerConfig
|
||||||
m_SchemaTemplates: []
|
m_SchemaTemplates: []
|
||||||
m_GroupTemplateObjects:
|
m_GroupTemplateObjects:
|
||||||
- {fileID: 11400000, guid: af0b5782a0090884db056705d7776701, type: 2}
|
- {fileID: 11400000, guid: af0b5782a0090884db056705d7776701, type: 2}
|
||||||
|
|||||||
@@ -15,6 +15,76 @@ MonoBehaviour:
|
|||||||
m_GroupName: Default Local Group
|
m_GroupName: Default Local Group
|
||||||
m_GUID: d790534e015d692428ac5a9ce7d2ceb6
|
m_GUID: d790534e015d692428ac5a9ce7d2ceb6
|
||||||
m_SerializeEntries:
|
m_SerializeEntries:
|
||||||
|
- m_GUID: 0d2cf1d8a32701f56851c8b734cf7928
|
||||||
|
m_Address: Assets/Resources_moved/UI/Panels/PlayerCounter.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: 13852bf3f3ccace4e9deefd844eebb23
|
||||||
|
m_Address: Assets/Resources_moved/UI/Panels/LoadingPanel.prefab
|
||||||
|
m_ReadOnly: 0
|
||||||
|
m_SerializedLabels: []
|
||||||
|
FlaggedDuringContentUpdateRestriction: 0
|
||||||
|
- m_GUID: 14e849600b64a5a498f121440eebefd2
|
||||||
|
m_Address: Assets/Resources_moved/Configs/UI/PlayerSceneChoose.asset
|
||||||
|
m_ReadOnly: 0
|
||||||
|
m_SerializedLabels:
|
||||||
|
- UIPanelConfig
|
||||||
|
FlaggedDuringContentUpdateRestriction: 0
|
||||||
|
- m_GUID: 17c5e56eb6c99db40b6093c9d543bb4f
|
||||||
|
m_Address: Assets/Resources_moved/Configs/UI/CanvasSettingsConfig.asset
|
||||||
|
m_ReadOnly: 0
|
||||||
|
m_SerializedLabels: []
|
||||||
|
FlaggedDuringContentUpdateRestriction: 0
|
||||||
|
- m_GUID: 1983ca5906382590d9638c6c751d8571
|
||||||
|
m_Address: Assets/Resources_moved/Audio/UI/launch_dnmenu1.wav
|
||||||
|
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: 2471ee3760db4ecfe8c313bb2c00daf0
|
||||||
|
m_Address: Assets/Resources_moved/Configs/Audio/Audio Source.prefab
|
||||||
|
m_ReadOnly: 0
|
||||||
|
m_SerializedLabels: []
|
||||||
|
FlaggedDuringContentUpdateRestriction: 0
|
||||||
|
- m_GUID: 29779120ceccabb0ab008e48b44a39f4
|
||||||
|
m_Address: Example/Race/Configs/AIBot
|
||||||
|
m_ReadOnly: 0
|
||||||
|
m_SerializedLabels:
|
||||||
|
- RacerConfig
|
||||||
|
FlaggedDuringContentUpdateRestriction: 0
|
||||||
|
- m_GUID: 2e29259ec1cd556c6a33f0396d8f90e2
|
||||||
|
m_Address: Assets/Resources_moved/Configs/Audio/Infos/UI/launchUpMenu.asset
|
||||||
|
m_ReadOnly: 0
|
||||||
|
m_SerializedLabels:
|
||||||
|
- AudioInfoConfig
|
||||||
|
FlaggedDuringContentUpdateRestriction: 0
|
||||||
|
- m_GUID: 30778c5a4d5c3f74bac4e5340344cdad
|
||||||
|
m_Address: Assets/Resources_moved/Configs/Volumes/MenuRetro.asset
|
||||||
|
m_ReadOnly: 0
|
||||||
|
m_SerializedLabels:
|
||||||
|
- PostProccessVolume
|
||||||
|
FlaggedDuringContentUpdateRestriction: 0
|
||||||
|
- m_GUID: 3a4a23e1c0a57dd49b451aa86b9baa3a
|
||||||
|
m_Address: Assets/Resources_moved/Configs/Scenes/SoundTest.asset
|
||||||
|
m_ReadOnly: 0
|
||||||
|
m_SerializedLabels:
|
||||||
|
- SceneConfig
|
||||||
|
FlaggedDuringContentUpdateRestriction: 0
|
||||||
|
- m_GUID: 456d3ecaf92ca5a4a817184de151ad9f
|
||||||
|
m_Address: Assets/Resources_moved/Camera/CinemachineCameraCarFollow.prefab
|
||||||
|
m_ReadOnly: 0
|
||||||
|
m_SerializedLabels: []
|
||||||
|
FlaggedDuringContentUpdateRestriction: 0
|
||||||
- m_GUID: 4a97987e3a94e0f43b1b57b6ddccac23
|
- m_GUID: 4a97987e3a94e0f43b1b57b6ddccac23
|
||||||
m_Address: Assets/Resources_moved/Configs/Camera/CameraSettingsConfig.asset
|
m_Address: Assets/Resources_moved/Configs/Camera/CameraSettingsConfig.asset
|
||||||
m_ReadOnly: 0
|
m_ReadOnly: 0
|
||||||
@@ -27,11 +97,133 @@ MonoBehaviour:
|
|||||||
m_SerializedLabels:
|
m_SerializedLabels:
|
||||||
- SceneConfig
|
- SceneConfig
|
||||||
FlaggedDuringContentUpdateRestriction: 0
|
FlaggedDuringContentUpdateRestriction: 0
|
||||||
|
- m_GUID: 4bf97e6c7f046f849912182e4ded6c9e
|
||||||
|
m_Address: Assets/Resources_moved/Configs/Audio/Settings/AudioSourceSettingsConfig
|
||||||
|
1.asset
|
||||||
|
m_ReadOnly: 0
|
||||||
|
m_SerializedLabels:
|
||||||
|
- AudioSettingsConfig
|
||||||
|
FlaggedDuringContentUpdateRestriction: 0
|
||||||
|
- m_GUID: 4c9ce2b91ab2587cf8279e7d743d348b
|
||||||
|
m_Address: Assets/Resources_moved/Audio/UI/613916__drni__solar-inverter-humming-static-noise.flac
|
||||||
|
m_ReadOnly: 0
|
||||||
|
m_SerializedLabels: []
|
||||||
|
FlaggedDuringContentUpdateRestriction: 0
|
||||||
|
- m_GUID: 4fcdb7f979b60194db1fb5c03b81bf8c
|
||||||
|
m_Address: UI/Panels/LoadingPanel
|
||||||
|
m_ReadOnly: 0
|
||||||
|
m_SerializedLabels: []
|
||||||
|
FlaggedDuringContentUpdateRestriction: 0
|
||||||
|
- m_GUID: 559cfec8b5fd0dbd2b7c4c9f00ade374
|
||||||
|
m_Address: Assets/Resources_moved/Configs/Audio/Infos/UI/ButtonClick.asset
|
||||||
|
m_ReadOnly: 0
|
||||||
|
m_SerializedLabels:
|
||||||
|
- AudioInfoConfig
|
||||||
|
FlaggedDuringContentUpdateRestriction: 0
|
||||||
|
- m_GUID: 55c3ef7828ec424a59b3d4ceb1cdaece
|
||||||
|
m_Address: Assets/Resources_moved/Audio/UI/launch_upmenu1.wav
|
||||||
|
m_ReadOnly: 0
|
||||||
|
m_SerializedLabels: []
|
||||||
|
FlaggedDuringContentUpdateRestriction: 0
|
||||||
|
- m_GUID: 55ccf07d7c51c2a409a42ddcda3b3b30
|
||||||
|
m_Address: Assets/Resources_moved/Configs/UI/WinScreen.asset
|
||||||
|
m_ReadOnly: 0
|
||||||
|
m_SerializedLabels:
|
||||||
|
- UIPanelConfig
|
||||||
|
FlaggedDuringContentUpdateRestriction: 0
|
||||||
|
- m_GUID: 62388720cc90ef87f9d8ed5328dbc6fe
|
||||||
|
m_Address: Assets/Resources_moved/Configs/Audio/AudioInfoConfig.asset
|
||||||
|
m_ReadOnly: 0
|
||||||
|
m_SerializedLabels:
|
||||||
|
- AudioInfoConfig
|
||||||
|
FlaggedDuringContentUpdateRestriction: 0
|
||||||
|
- m_GUID: 670b67ade842b46af81fee330d074f9f
|
||||||
|
m_Address: Assets/Resources_moved/Audio/UI/buttonclickrelease.wav
|
||||||
|
m_ReadOnly: 0
|
||||||
|
m_SerializedLabels: []
|
||||||
|
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: 749408a9b44d2581783d04d903ec0f72
|
||||||
|
m_Address: Assets/Resources_moved/Audio/UI/valve_sound.wav
|
||||||
|
m_ReadOnly: 0
|
||||||
|
m_SerializedLabels: []
|
||||||
|
FlaggedDuringContentUpdateRestriction: 0
|
||||||
|
- m_GUID: 7a5ae0cc826b85108aa9f0681d7f85cc
|
||||||
|
m_Address: Assets/Resources_moved/Example/Race/Configs/AIRed.asset
|
||||||
|
m_ReadOnly: 0
|
||||||
|
m_SerializedLabels:
|
||||||
|
- RacerConfig
|
||||||
|
FlaggedDuringContentUpdateRestriction: 0
|
||||||
|
- m_GUID: 7eaa3bbea72a3b313878e71bc992c5fd
|
||||||
|
m_Address: Assets/Resources_moved/Audio/UI/launch_select2.wav
|
||||||
|
m_ReadOnly: 0
|
||||||
|
m_SerializedLabels: []
|
||||||
|
FlaggedDuringContentUpdateRestriction: 0
|
||||||
|
- m_GUID: 86d0b6ef35383e7409df5a352637fea7
|
||||||
|
m_Address: UI/Panels/SceneSelectPanel
|
||||||
|
m_ReadOnly: 0
|
||||||
|
m_SerializedLabels: []
|
||||||
|
FlaggedDuringContentUpdateRestriction: 0
|
||||||
|
- m_GUID: 89a9e669f83bef966b15cdd2da6d4f77
|
||||||
|
m_Address: Assets/Resources_moved/Audio/UI/buttonrollover.wav
|
||||||
|
m_ReadOnly: 0
|
||||||
|
m_SerializedLabels: []
|
||||||
|
FlaggedDuringContentUpdateRestriction: 0
|
||||||
|
- m_GUID: 8fdc11fcf9c4c2e279902e8d1b6df718
|
||||||
|
m_Address: Assets/Resources_moved/Configs/Audio/Infos/UI/ButtonClickRelease.asset
|
||||||
|
m_ReadOnly: 0
|
||||||
|
m_SerializedLabels:
|
||||||
|
- AudioInfoConfig
|
||||||
|
FlaggedDuringContentUpdateRestriction: 0
|
||||||
|
- m_GUID: 9472c0e087e023ce9b93dfc75ffff25b
|
||||||
|
m_Address: Assets/Resources_moved/Audio/UI/buttonclick.wav
|
||||||
|
m_ReadOnly: 0
|
||||||
|
m_SerializedLabels: []
|
||||||
|
FlaggedDuringContentUpdateRestriction: 0
|
||||||
|
- m_GUID: 95e6f3e122b08b58e96fe087fb5ce397
|
||||||
|
m_Address: Assets/Resources_moved/Configs/Audio/Infos/UI/launchDownMenu.asset
|
||||||
|
m_ReadOnly: 0
|
||||||
|
m_SerializedLabels:
|
||||||
|
- AudioInfoConfig
|
||||||
|
FlaggedDuringContentUpdateRestriction: 0
|
||||||
|
- m_GUID: 9e77251929568a7c0806d17b11af8afb
|
||||||
|
m_Address: Assets/Resources_moved/Example/Race/PlayerRacist.prefab
|
||||||
|
m_ReadOnly: 0
|
||||||
|
m_SerializedLabels: []
|
||||||
|
FlaggedDuringContentUpdateRestriction: 0
|
||||||
|
- m_GUID: a63ae4e1d4b750b8a819dbadffa4b9f7
|
||||||
|
m_Address: Assets/Resources_moved/Configs/Audio/Infos/UI/launchSelect2.asset
|
||||||
|
m_ReadOnly: 0
|
||||||
|
m_SerializedLabels:
|
||||||
|
- AudioInfoConfig
|
||||||
|
FlaggedDuringContentUpdateRestriction: 0
|
||||||
- m_GUID: a78f552da8f156b469b95652e4b0209d
|
- m_GUID: a78f552da8f156b469b95652e4b0209d
|
||||||
m_Address: DebugClassConfig
|
m_Address: DebugClassConfig
|
||||||
m_ReadOnly: 0
|
m_ReadOnly: 0
|
||||||
m_SerializedLabels: []
|
m_SerializedLabels: []
|
||||||
FlaggedDuringContentUpdateRestriction: 0
|
FlaggedDuringContentUpdateRestriction: 0
|
||||||
|
- m_GUID: a9d36f968917dc35cb0e534af9ea6e59
|
||||||
|
m_Address: Assets/Resources_moved/Configs/Audio/Infos/UI/launchSelectMenu.asset
|
||||||
|
m_ReadOnly: 0
|
||||||
|
m_SerializedLabels:
|
||||||
|
- AudioInfoConfig
|
||||||
|
FlaggedDuringContentUpdateRestriction: 0
|
||||||
|
- m_GUID: ab3f2ccf1b11afd4a81cb222d4e4bc16
|
||||||
|
m_Address: Assets/Resources_moved/Volumes/MenuRetro.prefab
|
||||||
|
m_ReadOnly: 0
|
||||||
|
m_SerializedLabels: []
|
||||||
|
FlaggedDuringContentUpdateRestriction: 0
|
||||||
|
- m_GUID: b93ef12d9a22d9b65ba68c45742f73a3
|
||||||
|
m_Address: Assets/Resources_moved/Configs/Camera/ThirdPersonConfig.asset
|
||||||
|
m_ReadOnly: 0
|
||||||
|
m_SerializedLabels:
|
||||||
|
- CameraConfig
|
||||||
|
FlaggedDuringContentUpdateRestriction: 0
|
||||||
- m_GUID: becf493a34b841e4d8ea927261a05e9b
|
- m_GUID: becf493a34b841e4d8ea927261a05e9b
|
||||||
m_Address: Camera/Camera
|
m_Address: Camera/Camera
|
||||||
m_ReadOnly: 0
|
m_ReadOnly: 0
|
||||||
@@ -47,26 +239,74 @@ MonoBehaviour:
|
|||||||
m_ReadOnly: 0
|
m_ReadOnly: 0
|
||||||
m_SerializedLabels: []
|
m_SerializedLabels: []
|
||||||
FlaggedDuringContentUpdateRestriction: 0
|
FlaggedDuringContentUpdateRestriction: 0
|
||||||
|
- m_GUID: cbab6f2c86f23fd48b3ec4b8885b9889
|
||||||
|
m_Address: Assets/Scenes/SoundTest.unity
|
||||||
|
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_GUID: d54fabdcc748a594aa0551dcd235c7c2
|
||||||
m_Address: ScenesAssetReferences
|
m_Address: ScenesAssetReferences
|
||||||
m_ReadOnly: 0
|
m_ReadOnly: 0
|
||||||
m_SerializedLabels: []
|
m_SerializedLabels: []
|
||||||
FlaggedDuringContentUpdateRestriction: 0
|
FlaggedDuringContentUpdateRestriction: 0
|
||||||
|
- m_GUID: d7dd69cfadda3d6e18ec390724be0d80
|
||||||
|
m_Address: Assets/Resources_moved/Configs/Audio/AudioSourcePrefabConfig.asset
|
||||||
|
m_ReadOnly: 0
|
||||||
|
m_SerializedLabels: []
|
||||||
|
FlaggedDuringContentUpdateRestriction: 0
|
||||||
|
- m_GUID: d87857258eeea2345a3b926b3c671002
|
||||||
|
m_Address: Assets/Resources_moved/Configs/UI/Loading.asset
|
||||||
|
m_ReadOnly: 0
|
||||||
|
m_SerializedLabels:
|
||||||
|
- UIPanelConfig
|
||||||
|
FlaggedDuringContentUpdateRestriction: 0
|
||||||
|
- m_GUID: d9b04c3e60dd01e77807be9f484d8e82
|
||||||
|
m_Address: Assets/Resources_moved/Audio/UI/launch_select1.wav
|
||||||
|
m_ReadOnly: 0
|
||||||
|
m_SerializedLabels: []
|
||||||
|
FlaggedDuringContentUpdateRestriction: 0
|
||||||
- m_GUID: df809fbbdc1f51f43b4d42a7896a0919
|
- m_GUID: df809fbbdc1f51f43b4d42a7896a0919
|
||||||
m_Address: Assets/Scenes/Gameplay.unity
|
m_Address: Assets/Scenes/Gameplay.unity
|
||||||
m_ReadOnly: 0
|
m_ReadOnly: 0
|
||||||
m_SerializedLabels: []
|
m_SerializedLabels: []
|
||||||
FlaggedDuringContentUpdateRestriction: 0
|
FlaggedDuringContentUpdateRestriction: 0
|
||||||
|
- m_GUID: e1fbe5b2798657342b569f723d16c9de
|
||||||
|
m_Address: UI/Canvas
|
||||||
|
m_ReadOnly: 0
|
||||||
|
m_SerializedLabels: []
|
||||||
|
FlaggedDuringContentUpdateRestriction: 0
|
||||||
- m_GUID: eab71c0cf90c4b94294e497d3734cfe1
|
- m_GUID: eab71c0cf90c4b94294e497d3734cfe1
|
||||||
m_Address: Assets/Resources_moved/Configs/InputServiceConfig.asset
|
m_Address: Assets/Resources_moved/Configs/InputServiceConfig.asset
|
||||||
m_ReadOnly: 0
|
m_ReadOnly: 0
|
||||||
m_SerializedLabels: []
|
m_SerializedLabels: []
|
||||||
FlaggedDuringContentUpdateRestriction: 0
|
FlaggedDuringContentUpdateRestriction: 0
|
||||||
- m_GUID: f146779bcd07c524097072c871162bff
|
- m_GUID: eb0c68c73dadde3479d639ba9b2f7395
|
||||||
m_Address: Assets/Resources_moved/Configs/Camera/FPSConfig.asset
|
m_Address: Assets/Resources_moved/Configs/UI/Logo 1.asset
|
||||||
m_ReadOnly: 0
|
m_ReadOnly: 0
|
||||||
m_SerializedLabels:
|
m_SerializedLabels:
|
||||||
- CameraConfig
|
- UIPanelConfig
|
||||||
|
FlaggedDuringContentUpdateRestriction: 0
|
||||||
|
- m_GUID: eb48bfdd161d536498ed1b2810fa476e
|
||||||
|
m_Address: Example/Race/Racist (1)
|
||||||
|
m_ReadOnly: 0
|
||||||
|
m_SerializedLabels: []
|
||||||
|
FlaggedDuringContentUpdateRestriction: 0
|
||||||
|
- m_GUID: ec0362c4c0d045cccbe89aee2231c3be
|
||||||
|
m_Address: Assets/Resources_moved/Configs/Audio/Settings/AudioSourceSettingsConfig.asset
|
||||||
|
m_ReadOnly: 0
|
||||||
|
m_SerializedLabels:
|
||||||
|
- AudioSettingsConfig
|
||||||
|
FlaggedDuringContentUpdateRestriction: 0
|
||||||
|
- m_GUID: f5d189d2c8569c2489fe942137ea0f24
|
||||||
|
m_Address: Assets/Resources_moved/Camera/CinemachineCamera.prefab
|
||||||
|
m_ReadOnly: 0
|
||||||
|
m_SerializedLabels: []
|
||||||
FlaggedDuringContentUpdateRestriction: 0
|
FlaggedDuringContentUpdateRestriction: 0
|
||||||
- m_GUID: f5e16d3d2576c5a4ca27ea09aeb18733
|
- m_GUID: f5e16d3d2576c5a4ca27ea09aeb18733
|
||||||
m_Address: Assets/Resources_moved/Configs/Scenes/MainMenu.asset
|
m_Address: Assets/Resources_moved/Configs/Scenes/MainMenu.asset
|
||||||
@@ -74,6 +314,23 @@ MonoBehaviour:
|
|||||||
m_SerializedLabels:
|
m_SerializedLabels:
|
||||||
- SceneConfig
|
- SceneConfig
|
||||||
FlaggedDuringContentUpdateRestriction: 0
|
FlaggedDuringContentUpdateRestriction: 0
|
||||||
|
- m_GUID: f60baf3e133aa2644a106742a1f2c2fb
|
||||||
|
m_Address: Assets/Resources_moved/Example/Race/WinScreen.prefab
|
||||||
|
m_ReadOnly: 0
|
||||||
|
m_SerializedLabels: []
|
||||||
|
FlaggedDuringContentUpdateRestriction: 0
|
||||||
|
- m_GUID: f7cebe94899e9257497d042d1ec4fd76
|
||||||
|
m_Address: Assets/Resources_moved/Configs/Audio/Infos/UI/ButtonRollOver.asset
|
||||||
|
m_ReadOnly: 0
|
||||||
|
m_SerializedLabels:
|
||||||
|
- AudioInfoConfig
|
||||||
|
FlaggedDuringContentUpdateRestriction: 0
|
||||||
|
- m_GUID: f8c793cd022fab58682fadd51648a3c1
|
||||||
|
m_Address: Example/Race/Configs/Player
|
||||||
|
m_ReadOnly: 0
|
||||||
|
m_SerializedLabels:
|
||||||
|
- RacerConfig
|
||||||
|
FlaggedDuringContentUpdateRestriction: 0
|
||||||
m_ReadOnly: 0
|
m_ReadOnly: 0
|
||||||
m_Settings: {fileID: 11400000, guid: c6c4cec5a69c4d144a5dfabd0405f447, type: 2}
|
m_Settings: {fileID: 11400000, guid: c6c4cec5a69c4d144a5dfabd0405f447, type: 2}
|
||||||
m_SchemaSet:
|
m_SchemaSet:
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
fileFormatVersion: 2
|
fileFormatVersion: 2
|
||||||
guid: 2effcda6ca972d34c85ec6e106aa4021
|
guid: 5313cc04f8ca14597b338b65bee3093d
|
||||||
folderAsset: yes
|
folderAsset: yes
|
||||||
DefaultImporter:
|
DefaultImporter:
|
||||||
externalObjects: {}
|
externalObjects: {}
|
||||||
@@ -0,0 +1,28 @@
|
|||||||
|
%YAML 1.1
|
||||||
|
%TAG !u! tag:unity3d.com,2011:
|
||||||
|
--- !u!114 &11400000
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 0}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: 7e3976da977cb49238499ea3b4c237ae, type: 3}
|
||||||
|
m_Name: ProfileDataSourceSettings
|
||||||
|
m_EditorClassIdentifier: Unity.Addressables.Editor::UnityEditor.AddressableAssets.Settings.ProfileDataSourceSettings
|
||||||
|
profileGroupTypes:
|
||||||
|
- m_GroupTypePrefix: Built-In
|
||||||
|
m_Variables:
|
||||||
|
- m_Suffix: BuildPath
|
||||||
|
m_Value: '[UnityEngine.AddressableAssets.Addressables.BuildPath]/[BuildTarget]'
|
||||||
|
- m_Suffix: LoadPath
|
||||||
|
m_Value: '{UnityEngine.AddressableAssets.Addressables.RuntimePath}/[BuildTarget]'
|
||||||
|
environments: []
|
||||||
|
currentEnvironment:
|
||||||
|
id:
|
||||||
|
projectId:
|
||||||
|
projectGenesisId:
|
||||||
|
name:
|
||||||
|
isDefault: 0
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: a5b15ef261c372546828bde22c50fbb3
|
||||||
|
NativeFormatImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
mainObjectFileID: 11400000
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
+1
-1
@@ -1,5 +1,5 @@
|
|||||||
fileFormatVersion: 2
|
fileFormatVersion: 2
|
||||||
guid: a849b8376c6cae04b8dd2b8743cf2fb1
|
guid: 5fd003c2e081890428485bfb959fa404
|
||||||
folderAsset: yes
|
folderAsset: yes
|
||||||
DefaultImporter:
|
DefaultImporter:
|
||||||
externalObjects: {}
|
externalObjects: {}
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 9d6b79a067be4ebc97601337f35b808a
|
||||||
|
timeCreated: 1769346033
|
||||||
@@ -0,0 +1,37 @@
|
|||||||
|
using System.Collections.Generic;
|
||||||
|
using Code.Infrastructure.App;
|
||||||
|
using Code.Infrastructure.SceneLoader;
|
||||||
|
using Reflex.Attributes;
|
||||||
|
using UnityEngine;
|
||||||
|
using UnityEngine.SceneManagement;
|
||||||
|
using UnityEngine.UI;
|
||||||
|
|
||||||
|
namespace Code.Debug
|
||||||
|
{
|
||||||
|
public class SceneChooser : MonoBehaviour
|
||||||
|
{
|
||||||
|
[Inject] private SceneLoader _sceneLoader;
|
||||||
|
[Inject] private AppStateMachine _stateMachine;
|
||||||
|
public void ChooseScene(int id)
|
||||||
|
{
|
||||||
|
_sceneLoader.LoadSceneAsync((SceneId)id, LoadSceneMode.Additive).Forget();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void ChooseState(int id)
|
||||||
|
{
|
||||||
|
_stateMachine.SwitchState((AppStates)id);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void SwitchGameplay()
|
||||||
|
{
|
||||||
|
_stateMachine.SwitchState(AppStates.Gameplay).AllowStateTransition(AppStates.MainMenu);
|
||||||
|
}
|
||||||
|
|
||||||
|
[SerializeField] private List<Button> buttons;
|
||||||
|
|
||||||
|
public void EnableButtons()
|
||||||
|
{
|
||||||
|
foreach (var button in buttons) button.interactable = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 72527bc5589647428bb4575953d13a90
|
||||||
|
timeCreated: 1769346042
|
||||||
@@ -1,3 +1,3 @@
|
|||||||
fileFormatVersion: 2
|
fileFormatVersion: 2
|
||||||
guid: 07cf07a937934e0094469237b5865b60
|
guid: 2f828f4a304e46578e63d3803c9a889d
|
||||||
timeCreated: 1766350980
|
timeCreated: 1769522070
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 28672941a49242ad95c4a99705410c30
|
||||||
|
timeCreated: 1769522077
|
||||||
@@ -0,0 +1,103 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using Code.Example.Race.Racer;
|
||||||
|
using Code.Example.Race.Track;
|
||||||
|
using Code.Infrastructure.EventBus;
|
||||||
|
using Code.Infrastructure.Loadings;
|
||||||
|
|
||||||
|
namespace Code.Example.Race
|
||||||
|
{
|
||||||
|
public class RaceGame : IRacerLoadedHandle, IDisposable
|
||||||
|
{
|
||||||
|
private RaceScores _scores;
|
||||||
|
|
||||||
|
private IRacerFactory _racerFactory;
|
||||||
|
private RaceTrackData _raceTrackData;
|
||||||
|
private EventBus _eventBus;
|
||||||
|
|
||||||
|
public RaceGame(EventBus eventBus, IRacerFactory racerFactory, RaceTrackData raceTrackData, RaceScores scores)
|
||||||
|
{
|
||||||
|
_eventBus = eventBus;
|
||||||
|
_racerFactory = racerFactory;
|
||||||
|
_raceTrackData = raceTrackData;
|
||||||
|
_eventBus.Subscribe(this);
|
||||||
|
|
||||||
|
_scores = scores;
|
||||||
|
|
||||||
|
RandomizeRacers(raceTrackData.trackData.RacerPoints.Count);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void StartRacers()
|
||||||
|
{
|
||||||
|
foreach (var racer in PlacedRacers)
|
||||||
|
{
|
||||||
|
racer.StartRacer();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// DEBUG
|
||||||
|
private List<RacerType> _randomizedTypes = new();
|
||||||
|
|
||||||
|
private void RandomizeRacers(int count)
|
||||||
|
{
|
||||||
|
_raceGameLoading = new Loading(count, RacersLoadCompleted);
|
||||||
|
|
||||||
|
_randomizedTypes.Add(RacerType.Player);
|
||||||
|
|
||||||
|
for (var i = 0; i < count - 1; i++)
|
||||||
|
_randomizedTypes.Add((RacerType)UnityEngine.Random.Range(1, 3));
|
||||||
|
|
||||||
|
foreach (var type in _randomizedTypes) _racerFactory.LoadRacer(type);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void RacersLoadCompleted() =>
|
||||||
|
_eventBus.RaiseEvent<IRaceGameHandle>(x => x.RaceGameReady());
|
||||||
|
|
||||||
|
public List<Racer.Racer> PlacedRacers { get; } = new();
|
||||||
|
|
||||||
|
public void PlaceRacers()
|
||||||
|
{
|
||||||
|
for (var i = 0; i < _raceTrackData.trackData.RacerPoints.Count; i++)
|
||||||
|
{
|
||||||
|
PlacedRacers.Add(UnityEngine.Object.Instantiate(
|
||||||
|
_racerPrefabs[_randomizedTypes[i]],
|
||||||
|
_raceTrackData.trackData.RacerPoints[i].transform).GetComponent<Racer.Racer>());
|
||||||
|
PlacedRacers[^1].SetData(_racerPrefabs[_randomizedTypes[i]].Data);
|
||||||
|
PlacedRacers[^1].Id = i;
|
||||||
|
_scores.SubscribeRacer(PlacedRacers[^1]);
|
||||||
|
}
|
||||||
|
|
||||||
|
foreach (var racer in PlacedRacers)
|
||||||
|
{
|
||||||
|
racer.Initialize(_raceTrackData.trackData.Checkpoints.Select(x=> x.transform).ToList());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private Dictionary<RacerType, Racer.Racer> _racerPrefabs = new();
|
||||||
|
private Loading _raceGameLoading;
|
||||||
|
|
||||||
|
public void RacerLoaded(RacerType type, Racer.Racer racer)
|
||||||
|
{
|
||||||
|
if (racer)
|
||||||
|
_racerPrefabs.Add(type, racer);
|
||||||
|
|
||||||
|
_raceGameLoading.DoProgress();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public void Dispose()
|
||||||
|
{
|
||||||
|
foreach (var racer in PlacedRacers) _scores.UnsubscribeRacer(racer);
|
||||||
|
|
||||||
|
_eventBus.Unsubscribe(this);
|
||||||
|
_racerPrefabs.Clear();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public interface IRaceGameHandle : IGlobalSubscriber
|
||||||
|
{
|
||||||
|
void RaceGameReady();
|
||||||
|
void RaceGameEnded(RaceScores scores);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 0ffa5c181be7447cb1c41392018b193f
|
||||||
|
timeCreated: 1769692114
|
||||||
@@ -0,0 +1,80 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using Code.Example.Race.Racer.Player;
|
||||||
|
using Code.Example.Race.Track;
|
||||||
|
using Code.Infrastructure.EventBus;
|
||||||
|
using Reflex.Attributes;
|
||||||
|
|
||||||
|
namespace Code.Example.Race
|
||||||
|
{
|
||||||
|
public class RaceScores : IRacerPassedCheckpointHandler, IDisposable, IPlayerPassedCheckpointHandler
|
||||||
|
{
|
||||||
|
private Dictionary<Racer.Racer, ScoreData> _scores = new();
|
||||||
|
private EventBus _eventBus;
|
||||||
|
|
||||||
|
public RaceScores(EventBus eventBus)
|
||||||
|
{
|
||||||
|
_eventBus = eventBus;
|
||||||
|
_eventBus.Subscribe(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void SubscribeRacer(Racer.Racer racer)
|
||||||
|
{
|
||||||
|
_scores.Add(racer, new ScoreData());
|
||||||
|
}
|
||||||
|
|
||||||
|
public void ChangeScore(Racer.Racer racer, int additionalScore)
|
||||||
|
{
|
||||||
|
_scores[racer].checkpointsPassed += additionalScore;
|
||||||
|
_eventBus.RaiseEvent<IScoreChangedHandle>(x=> x.ScoreChanged(racer,_scores[racer], GetScores()));
|
||||||
|
}
|
||||||
|
|
||||||
|
public void LapPassed(Racer.Racer racer)
|
||||||
|
{
|
||||||
|
_scores[racer].lapsPassed++;
|
||||||
|
_eventBus.RaiseEvent<IScoreChangedHandle>(x=> x.ScoreChanged(racer,_scores[racer], GetScores()));
|
||||||
|
if (_scores[racer].lapsPassed >= _raceTrackData.trackData.LapCount)
|
||||||
|
_eventBus.RaiseEvent<IRaceGameHandle>(x=> x.RaceGameEnded(this));
|
||||||
|
}
|
||||||
|
|
||||||
|
public void UnsubscribeRacer(Racer.Racer racer)
|
||||||
|
{
|
||||||
|
_scores.Remove(racer);
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<KeyValuePair<Racer.Racer, ScoreData>> GetScores()
|
||||||
|
{
|
||||||
|
return _scores.OrderByDescending(x => x.Value.checkpointsPassed).ToList();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void OnRacerPassedCheckpoint(Racer.Racer racer) => ChangeScore(racer,1);
|
||||||
|
|
||||||
|
public void Dispose()
|
||||||
|
{
|
||||||
|
_eventBus.Unsubscribe(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
[Inject] private RaceTrackData _raceTrackData;
|
||||||
|
|
||||||
|
public void OnPlayerPassedCheckpoint(Racer.Racer racer)
|
||||||
|
{
|
||||||
|
var player = (PlayerRacer)racer;
|
||||||
|
_raceTrackData.trackData.Checkpoints[player.CurrentWaypointIndex].Show();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void OnPlayerLapPassed(Racer.Racer racer)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public class ScoreData
|
||||||
|
{
|
||||||
|
public int checkpointsPassed;
|
||||||
|
public int lapsPassed;
|
||||||
|
}
|
||||||
|
public interface IScoreChangedHandle : IGlobalSubscriber
|
||||||
|
{
|
||||||
|
void ScoreChanged(Racer.Racer racer, ScoreData score, List<KeyValuePair<Racer.Racer, ScoreData>> scores);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: b45fb028abcf43129f5c8100e7215f1f
|
||||||
|
timeCreated: 1770051193
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: db04851257b24d4698e8101ef2d54b2d
|
||||||
|
timeCreated: 1769522144
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 391fdca5d5c94a86bcbd0f7cda609ee7
|
||||||
|
timeCreated: 1769522152
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
using UnityEngine;
|
||||||
|
|
||||||
|
namespace Code.Example.Race.Racer.AI
|
||||||
|
{
|
||||||
|
public class AICarDriver : CarControllerRB
|
||||||
|
{
|
||||||
|
public override void SetSteering(Vector2 steeringLinear)
|
||||||
|
{
|
||||||
|
SteeringInput = steeringLinear;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: c82b0db1441e417098bccb9ca1575e3e
|
||||||
|
timeCreated: 1770639201
|
||||||
@@ -0,0 +1,45 @@
|
|||||||
|
using System.Collections.Generic;
|
||||||
|
using UnityEngine;
|
||||||
|
using UnityEngine.AI;
|
||||||
|
|
||||||
|
namespace Code.Example.Race.Racer.AI
|
||||||
|
{
|
||||||
|
public class AIDebugRacer : Racer
|
||||||
|
{
|
||||||
|
[SerializeField] private NavMeshAgent navMeshAgent;
|
||||||
|
[SerializeField] private List<Transform> waypoints;
|
||||||
|
private int _currentWaypointIndex;
|
||||||
|
private void Awake()
|
||||||
|
{
|
||||||
|
navMeshAgent.destination = waypoints[_currentWaypointIndex].position;
|
||||||
|
_currentWaypointIndex++;
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void NextWaypoint()
|
||||||
|
{
|
||||||
|
if(_currentWaypointIndex >= waypoints.Count) _currentWaypointIndex = 0;
|
||||||
|
|
||||||
|
navMeshAgent.destination = waypoints[_currentWaypointIndex++].position;
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void StartRacer()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void StopRacer()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void SetData(RacerData data)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void Initialize(List<Transform> waypoints)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 6644b39029d14164961d83a37749e6cc
|
||||||
|
timeCreated: 1769522190
|
||||||
@@ -0,0 +1,36 @@
|
|||||||
|
using System.Collections.Generic;
|
||||||
|
using UnityEngine;
|
||||||
|
using UnityEngine.AI;
|
||||||
|
|
||||||
|
namespace Code.Example.Race.Racer.AI
|
||||||
|
{
|
||||||
|
public class AIRacer : Racer
|
||||||
|
{
|
||||||
|
[SerializeField] private NavMeshAgent navMeshAgent;
|
||||||
|
|
||||||
|
public override void SetData(RacerData data)
|
||||||
|
{
|
||||||
|
Data = data;
|
||||||
|
navMeshAgent.angularSpeed = data.angularSpeed;
|
||||||
|
navMeshAgent.speed = data.speed;
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void Initialize(List<Transform> waypoints)
|
||||||
|
{
|
||||||
|
navMeshAgent.isStopped = true;
|
||||||
|
|
||||||
|
Waypoints = waypoints;
|
||||||
|
navMeshAgent.destination = Waypoints[CurrentWaypointIndex].position;
|
||||||
|
|
||||||
|
CurrentWaypointIndex++;
|
||||||
|
}
|
||||||
|
public override void StartRacer() => navMeshAgent.isStopped = false;
|
||||||
|
public override void StopRacer() => navMeshAgent.isStopped = true;
|
||||||
|
public override void NextWaypoint()
|
||||||
|
{
|
||||||
|
if(CurrentWaypointIndex >= Waypoints.Count) CurrentWaypointIndex = 0;
|
||||||
|
|
||||||
|
navMeshAgent.destination = Waypoints[CurrentWaypointIndex++].position;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 05f30660967e40209aa88719fa498c78
|
||||||
|
timeCreated: 1769694590
|
||||||
@@ -0,0 +1,109 @@
|
|||||||
|
using System.Collections.Generic;
|
||||||
|
using Code.Example.Race.Racer.AI.ID;
|
||||||
|
using Code.Example.Race.Track;
|
||||||
|
using Code.Infrastructure.EventBus;
|
||||||
|
using Reflex.Attributes;
|
||||||
|
using UnityEngine;
|
||||||
|
|
||||||
|
namespace Code.Example.Race.Racer.AI
|
||||||
|
{
|
||||||
|
public class AIRacerID : Racer
|
||||||
|
{
|
||||||
|
[Inject] private EventBus _eventBus;
|
||||||
|
[SerializeField] private CarControllerRB carController;
|
||||||
|
public override void SetData(RacerData data)
|
||||||
|
{
|
||||||
|
Data = data;
|
||||||
|
|
||||||
|
_velocity = Vector3.zero;
|
||||||
|
_steering = new Steering();
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void Initialize(List<Transform> waypoints)
|
||||||
|
{
|
||||||
|
Waypoints = waypoints;
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void NextWaypoint()
|
||||||
|
{
|
||||||
|
if (++CurrentWaypointIndex < Waypoints.Count) return;
|
||||||
|
|
||||||
|
CurrentWaypointIndex = 0;
|
||||||
|
_eventBus.RaiseEvent<IRacerPassedCheckpointHandler>(x=> x.LapPassed(this));
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void StartRacer()
|
||||||
|
{
|
||||||
|
_running = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void StopRacer()
|
||||||
|
{
|
||||||
|
_running = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
[SerializeField] private AgentBehaviour agent;
|
||||||
|
|
||||||
|
private float _orientation;
|
||||||
|
private float _rotation;
|
||||||
|
private Vector3 _velocity;
|
||||||
|
private Steering _steering;
|
||||||
|
private bool _running;
|
||||||
|
|
||||||
|
private float NormalizeAngle(float angle)
|
||||||
|
{
|
||||||
|
switch (angle)
|
||||||
|
{
|
||||||
|
case > 360.0f:
|
||||||
|
{
|
||||||
|
while (angle > 360.0f) angle -= 360.0f;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case < 0.0f:
|
||||||
|
{
|
||||||
|
while (angle < 0.0f) angle += 360.0f;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return angle;
|
||||||
|
}
|
||||||
|
public virtual void Update()
|
||||||
|
{
|
||||||
|
if (!_running) return;
|
||||||
|
|
||||||
|
var steering =
|
||||||
|
transform.InverseTransformDirection(
|
||||||
|
agent.GetSteering(Waypoints[CurrentWaypointIndex]).linear);
|
||||||
|
|
||||||
|
carController.SetSteering(new Vector2(steering.x, steering.z));
|
||||||
|
// var displacement = _velocity * Time.deltaTime;
|
||||||
|
// _orientation += _rotation * Time.deltaTime;
|
||||||
|
// _orientation = NormalizeAngle(_orientation);
|
||||||
|
//
|
||||||
|
// transform.Translate(displacement, Space.World);
|
||||||
|
// transform.Rotate(Vector3.up, _orientation);
|
||||||
|
}
|
||||||
|
public virtual void LateUpdate()
|
||||||
|
{
|
||||||
|
if (!_running) return;
|
||||||
|
//
|
||||||
|
// _steering = agent.GetSteering(Waypoints[CurrentWaypointIndex]);
|
||||||
|
//
|
||||||
|
// _velocity += _steering.linear * Time.deltaTime;
|
||||||
|
// _rotation += _steering.angular * Time.deltaTime;
|
||||||
|
// if (_velocity.magnitude > Data.speed)
|
||||||
|
// {
|
||||||
|
// _velocity = _velocity.normalized * Data.speed;
|
||||||
|
// }
|
||||||
|
// if (_steering.angular == 0.0f)
|
||||||
|
// {
|
||||||
|
// _rotation = 0.0f;
|
||||||
|
// }
|
||||||
|
// if (_steering.linear.sqrMagnitude == 0.0f)
|
||||||
|
// {
|
||||||
|
// _velocity = Vector3.zero;
|
||||||
|
// }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: fdcd01ab3c5147e4bfa3619d60fec5fc
|
||||||
|
timeCreated: 1770394482
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 4f9bd0b568944e1f9b11f60f0fb79590
|
||||||
|
timeCreated: 1770394574
|
||||||
@@ -0,0 +1,53 @@
|
|||||||
|
using UnityEngine;
|
||||||
|
|
||||||
|
namespace Code.Example.Race.Racer.AI.ID
|
||||||
|
{
|
||||||
|
public class Agent : MonoBehaviour
|
||||||
|
{
|
||||||
|
public float maxSpeed;
|
||||||
|
public float maxAccel;
|
||||||
|
public float orientation;
|
||||||
|
public float rotation;
|
||||||
|
public Vector3 velocity;
|
||||||
|
protected Steering steering;
|
||||||
|
|
||||||
|
private void Start()
|
||||||
|
{
|
||||||
|
velocity = Vector3.zero;
|
||||||
|
steering = new Steering();
|
||||||
|
}
|
||||||
|
public virtual void Update ()
|
||||||
|
{
|
||||||
|
Vector3 displacement = velocity * Time.deltaTime;
|
||||||
|
orientation += rotation * Time.deltaTime;
|
||||||
|
// необходимо ограничить значение переменной orientation
|
||||||
|
// диапазоном (0-360)
|
||||||
|
if (orientation < 0.0f)
|
||||||
|
orientation += 360.0f;
|
||||||
|
else if (orientation > 360.0f)
|
||||||
|
orientation -= 360.0f;
|
||||||
|
transform.Translate(displacement, Space.World);
|
||||||
|
transform.rotation = new Quaternion();
|
||||||
|
transform.Rotate(Vector3.up, orientation);
|
||||||
|
}
|
||||||
|
public virtual void LateUpdate()
|
||||||
|
{
|
||||||
|
velocity += steering.linear * Time.deltaTime;
|
||||||
|
rotation += steering.angular * Time.deltaTime;
|
||||||
|
if (velocity.magnitude > maxSpeed)
|
||||||
|
{
|
||||||
|
velocity = velocity.normalized * maxSpeed; // Исправлено: корректное нормирование вектора
|
||||||
|
}
|
||||||
|
if (steering.angular == 0.0f)
|
||||||
|
{
|
||||||
|
rotation = 0.0f;
|
||||||
|
}
|
||||||
|
if (steering.linear.sqrMagnitude == 0.0f)
|
||||||
|
{
|
||||||
|
velocity = Vector3.zero;
|
||||||
|
}
|
||||||
|
// Удалена строка: steering = new Steering();
|
||||||
|
// (создание нового объекта каждый кадр приведет к утечке памяти и сбросу данных)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 6d51ddde70f34264954a75923b43dcee
|
||||||
|
timeCreated: 1770394764
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
using UnityEngine;
|
||||||
|
|
||||||
|
namespace Code.Example.Race.Racer.AI.ID
|
||||||
|
{
|
||||||
|
public abstract class AgentBehaviour : MonoBehaviour
|
||||||
|
{
|
||||||
|
[SerializeField] protected AIRacerID agent;
|
||||||
|
|
||||||
|
public abstract Steering GetSteering(Transform target);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 5af0fc1b61bd44d9a53fd01f93fe6029
|
||||||
|
timeCreated: 1770394682
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 70ca406222fb4e8e848ccf43db320cc9
|
||||||
|
timeCreated: 1770395746
|
||||||
@@ -0,0 +1,17 @@
|
|||||||
|
using UnityEngine;
|
||||||
|
|
||||||
|
namespace Code.Example.Race.Racer.AI.ID.Behaviours
|
||||||
|
{
|
||||||
|
public class Flee : AgentBehaviour
|
||||||
|
{
|
||||||
|
public override Steering GetSteering(Transform target)
|
||||||
|
{
|
||||||
|
Steering steering = new Steering();
|
||||||
|
|
||||||
|
steering.linear = transform.position - target.position;
|
||||||
|
steering.linear.Normalize();
|
||||||
|
steering.linear *= agent.Data.maxAcceleration;
|
||||||
|
return steering;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 437d2ae2cd65457a82abc34df278228d
|
||||||
|
timeCreated: 1770395798
|
||||||
@@ -0,0 +1,19 @@
|
|||||||
|
using UnityEngine;
|
||||||
|
|
||||||
|
namespace Code.Example.Race.Racer.AI.ID.Behaviours
|
||||||
|
{
|
||||||
|
public class Seek : AgentBehaviour
|
||||||
|
{
|
||||||
|
public override Steering GetSteering(Transform target)
|
||||||
|
{
|
||||||
|
Steering steering = new Steering();
|
||||||
|
|
||||||
|
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);
|
||||||
|
return steering;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: aa69eb79c9ec48b682606dac0c0d4f2d
|
||||||
|
timeCreated: 1770395751
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
using UnityEngine;
|
||||||
|
namespace Code.Example.Race.Racer.AI.ID
|
||||||
|
{
|
||||||
|
|
||||||
|
public struct Steering
|
||||||
|
{
|
||||||
|
public float angular;
|
||||||
|
public Vector3 linear;
|
||||||
|
|
||||||
|
public Steering(float angular, Vector3 linear)
|
||||||
|
{
|
||||||
|
this.angular = angular;
|
||||||
|
this.linear = linear;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 0395b595869e49b5b177fe54db531823
|
||||||
|
timeCreated: 1770394582
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 2c5dfd92289c4aa38bb9a8bafc07d204
|
||||||
|
timeCreated: 1769699718
|
||||||
@@ -0,0 +1,32 @@
|
|||||||
|
using UnityEngine;
|
||||||
|
using UnityEngine.AI;
|
||||||
|
|
||||||
|
namespace Code.Example.Race.Racer.Car
|
||||||
|
{
|
||||||
|
public class CarWheelRotator : MonoBehaviour
|
||||||
|
{
|
||||||
|
[SerializeField] private NavMeshAgent agent;
|
||||||
|
[SerializeField] private Transform[] wheels;
|
||||||
|
[SerializeField] private bool rotateDebug;
|
||||||
|
|
||||||
|
private void Update()
|
||||||
|
{
|
||||||
|
Vector3 wheelRotation;
|
||||||
|
foreach (var wheel in wheels)
|
||||||
|
{
|
||||||
|
if (rotateDebug)
|
||||||
|
{
|
||||||
|
UnityEngine.Debug.DrawRay(
|
||||||
|
wheel.position,
|
||||||
|
Vector3.Project(agent.velocity, agent.gameObject.transform.right),
|
||||||
|
Color.yellow, 900f);
|
||||||
|
UnityEngine.Debug.Log(Vector3.Project(agent.velocity, agent.gameObject.transform.right).magnitude);
|
||||||
|
}
|
||||||
|
|
||||||
|
wheelRotation = wheel.localRotation.eulerAngles;
|
||||||
|
wheelRotation.y = Vector3.Project(agent.velocity, agent.gameObject.transform.right).magnitude * 10f;
|
||||||
|
wheel.localRotation = Quaternion.Euler(wheelRotation);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 3634956b4d55431b8772a8612e2e3a4d
|
||||||
|
timeCreated: 1769699734
|
||||||
@@ -0,0 +1,23 @@
|
|||||||
|
using DG.Tweening;
|
||||||
|
using UnityEngine;
|
||||||
|
|
||||||
|
namespace Code.Example.Race.Racer.Car
|
||||||
|
{
|
||||||
|
public class CarWheelRotatorPlayer : MonoBehaviour
|
||||||
|
{
|
||||||
|
[SerializeField] private Transform[] wheels;
|
||||||
|
[SerializeField] private bool rotateDebug;
|
||||||
|
|
||||||
|
public void RotateWheels(float amount)
|
||||||
|
{
|
||||||
|
// UnityEngine.Debug.Log("Rotating Wheels: " + amount);
|
||||||
|
foreach (var wheel in wheels)
|
||||||
|
{
|
||||||
|
var wheelRotation = wheel.localRotation.eulerAngles;
|
||||||
|
wheelRotation.y = amount;
|
||||||
|
wheel.DOLocalRotate(wheelRotation, 1f);
|
||||||
|
// wheel.localRotation = Quaternion.Euler(wheelRotation);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: c90fde90552d48f592b955cbf1ec5c77
|
||||||
|
timeCreated: 1769705011
|
||||||
@@ -0,0 +1,165 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using UnityEngine;
|
||||||
|
|
||||||
|
namespace Code.Example.Race.Racer
|
||||||
|
{
|
||||||
|
public abstract class CarControllerRB : MonoBehaviour
|
||||||
|
{
|
||||||
|
public enum ControlMode
|
||||||
|
{
|
||||||
|
Keyboard,
|
||||||
|
Buttons
|
||||||
|
};
|
||||||
|
|
||||||
|
public enum Axel
|
||||||
|
{
|
||||||
|
Front,
|
||||||
|
Rear
|
||||||
|
}
|
||||||
|
|
||||||
|
[Serializable]
|
||||||
|
public struct Wheel
|
||||||
|
{
|
||||||
|
public GameObject wheelModel;
|
||||||
|
public WheelCollider wheelCollider;
|
||||||
|
public GameObject wheelEffectObj;
|
||||||
|
public ParticleSystem smokeParticle;
|
||||||
|
public Axel axel;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ControlMode control;
|
||||||
|
|
||||||
|
public Vector3 _centerOfMass;
|
||||||
|
|
||||||
|
public List<Wheel> wheels;
|
||||||
|
|
||||||
|
protected Rigidbody CarRb;
|
||||||
|
|
||||||
|
protected Vector2 SteeringInput = Vector2.zero;
|
||||||
|
public abstract void SetSteering(Vector2 steeringLinear);
|
||||||
|
|
||||||
|
[SerializeField] protected Racer racer;
|
||||||
|
|
||||||
|
// private CarLights carLights;
|
||||||
|
|
||||||
|
private void Start()
|
||||||
|
{
|
||||||
|
CarRb = GetComponent<Rigidbody>();
|
||||||
|
CarRb.centerOfMass = _centerOfMass;
|
||||||
|
|
||||||
|
// carLights = GetComponent<CarLights>();
|
||||||
|
}
|
||||||
|
|
||||||
|
protected virtual void Update()
|
||||||
|
{
|
||||||
|
// GetInputs();
|
||||||
|
AnimateWheels();
|
||||||
|
// WheelEffects();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void FixedUpdate()
|
||||||
|
{
|
||||||
|
Move();
|
||||||
|
Steer();
|
||||||
|
Brake();
|
||||||
|
}
|
||||||
|
|
||||||
|
// public void MoveInput(float input)
|
||||||
|
// {
|
||||||
|
// moveInput = input;
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// public void SteerInput(float input)
|
||||||
|
// {
|
||||||
|
// steerInput = input;
|
||||||
|
// }
|
||||||
|
|
||||||
|
void GetInputs()
|
||||||
|
{
|
||||||
|
// if (control == ControlMode.Keyboard)
|
||||||
|
// {
|
||||||
|
// moveInput = Input.GetAxis("Vertical");
|
||||||
|
// steerInput = Input.GetAxis("Horizontal");
|
||||||
|
// }
|
||||||
|
}
|
||||||
|
|
||||||
|
private void Move()
|
||||||
|
{
|
||||||
|
foreach (var wheel in wheels)
|
||||||
|
{
|
||||||
|
wheel.wheelCollider.motorTorque = SteeringInput.y * 600 * racer.Data.maxAcceleration * Time.fixedDeltaTime;
|
||||||
|
// wheel.wheelCollider.motorTorque = _playerCarInput.MovementInput.y * 600 * _playerRacer.Data.maxAcceleration * Time.fixedDeltaTime;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void Steer()
|
||||||
|
{
|
||||||
|
foreach (var wheel in wheels)
|
||||||
|
{
|
||||||
|
if (wheel.axel != Axel.Front) continue;
|
||||||
|
|
||||||
|
var steerAngle = SteeringInput.x * racer.Data.turnSensitivity * racer.Data.maxSteerAngle;
|
||||||
|
// var _steerAngle = _playerCarInput.MovementInput.x * _playerRacer.Data.turnSensitivity * _playerRacer.Data.maxSteerAngle;
|
||||||
|
wheel.wheelCollider.steerAngle = steerAngle;
|
||||||
|
// wheel.wheelCollider.steerAngle = Mathf.Lerp(wheel.wheelCollider.steerAngle, _steerAngle, 0.6f);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
protected virtual void Brake()
|
||||||
|
{
|
||||||
|
//|| _playerCarInput.MovementInput.y == 0
|
||||||
|
// if (_playerCarInput.Brake )
|
||||||
|
// {
|
||||||
|
// foreach (var wheel in wheels)
|
||||||
|
// {
|
||||||
|
// wheel.wheelCollider.brakeTorque = 300 * _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();
|
||||||
|
// }
|
||||||
|
}
|
||||||
|
|
||||||
|
private void AnimateWheels()
|
||||||
|
{
|
||||||
|
foreach (var wheel in wheels)
|
||||||
|
{
|
||||||
|
Quaternion rot;
|
||||||
|
Vector3 pos;
|
||||||
|
wheel.wheelCollider.GetWorldPose(out pos, out rot);
|
||||||
|
wheel.wheelModel.transform.position = pos;
|
||||||
|
wheel.wheelModel.transform.rotation = rot;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void WheelEffects()
|
||||||
|
{
|
||||||
|
foreach (var wheel in wheels)
|
||||||
|
{
|
||||||
|
//var dirtParticleMainSettings = wheel.smokeParticle.main;
|
||||||
|
|
||||||
|
if (wheel.axel == Axel.Rear && wheel.wheelCollider.isGrounded &&
|
||||||
|
CarRb.linearVelocity.magnitude >= 10.0f)
|
||||||
|
{
|
||||||
|
// wheel.wheelEffectObj.GetComponentInChildren<TrailRenderer>().emitting = true;
|
||||||
|
// wheel.smokeParticle.Emit(1);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// wheel.wheelEffectObj.GetComponentInChildren<TrailRenderer>().emitting = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 5f093c913ff54cb99cd22d7e473931e7
|
||||||
|
timeCreated: 1770299509
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 7d9a0a4882314e2f91bb356ea0f82538
|
||||||
|
timeCreated: 1769705255
|
||||||
@@ -0,0 +1,55 @@
|
|||||||
|
using Code.Example.Race.Racer.AI;
|
||||||
|
using Code.Example.Race.Racer.Car;
|
||||||
|
using UnityEngine;
|
||||||
|
|
||||||
|
namespace Code.Example.Race.Racer.Player
|
||||||
|
{
|
||||||
|
public class PlayerCarController : MonoBehaviour
|
||||||
|
{
|
||||||
|
[SerializeField] private Rigidbody _rigidbody;
|
||||||
|
[SerializeField] private PlayerCarInput _playerCarInput;
|
||||||
|
[SerializeField] private PlayerRacer _playerRacer;
|
||||||
|
[SerializeField] private CarWheelRotatorPlayer _wheels;
|
||||||
|
|
||||||
|
private void Update()
|
||||||
|
{
|
||||||
|
if (_playerCarInput.MovementInput == Vector2.zero) return;
|
||||||
|
|
||||||
|
// var movementForward = transform.forward * (_playerCarInput.MovementInput.y * _playerRacer.Data.speed);
|
||||||
|
//
|
||||||
|
// _rigidbody.AddForce(movementForward * Time.fixedDeltaTime, ForceMode.Force);
|
||||||
|
|
||||||
|
var force = transform.forward * (_playerCarInput.MovementInput.y * _playerRacer.Data.speed);
|
||||||
|
_rigidbody.AddForce(force, ForceMode.Force);
|
||||||
|
|
||||||
|
// if (Mathf.Abs(_playerCarInput.MovementInput.y) < 0.1f && _rigidbody.linearVelocity.magnitude > 0.3f)
|
||||||
|
// {
|
||||||
|
// _rigidbody.AddForce(-_rigidbody.linearVelocity * (_playerRacer.Data.brakeForce * Time.fixedDeltaTime),
|
||||||
|
// ForceMode.Force);
|
||||||
|
// }
|
||||||
|
|
||||||
|
var steerInput = _playerCarInput.MovementInput.x;
|
||||||
|
if (_playerCarInput.MovementInput.y < 0)
|
||||||
|
steerInput = -_playerCarInput.MovementInput.x;
|
||||||
|
|
||||||
|
// var steer = steerInput * maxSteerAngle;
|
||||||
|
//
|
||||||
|
// if (frontLeftWheel) frontLeftWheel.localRotation = Quaternion.Euler(0, steer, 0);
|
||||||
|
// if (frontRightWheel) frontRightWheel.localRotation = Quaternion.Euler(0, steer, 0);
|
||||||
|
|
||||||
|
if (!(_rigidbody.linearVelocity.magnitude > 0.5f)) return;
|
||||||
|
|
||||||
|
// var turn = steerInput * _playerRacer.Data.turnSpeed * Time.fixedDeltaTime;
|
||||||
|
// _rigidbody.MoveRotation(_rigidbody.rotation * Quaternion.Euler(0, turn, 0));
|
||||||
|
|
||||||
|
if (!(_rigidbody.linearVelocity.magnitude is > 1f or < -1f)) return;
|
||||||
|
|
||||||
|
var rotateAmount = _playerCarInput.MovementInput.x * _playerRacer.Data.angularSpeed;
|
||||||
|
|
||||||
|
_wheels.RotateWheels(rotateAmount * 10 * Time.fixedDeltaTime);
|
||||||
|
var wheelRotation = transform.rotation.eulerAngles;
|
||||||
|
wheelRotation.y += rotateAmount;
|
||||||
|
transform.rotation = Quaternion.Euler(wheelRotation);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 4b9e2e4a3ddc437ab250f609ea7fc33e
|
||||||
|
timeCreated: 1769705285
|
||||||
@@ -0,0 +1,41 @@
|
|||||||
|
using Code.Infrastructure.Input;
|
||||||
|
using Reflex.Attributes;
|
||||||
|
using UnityEngine;
|
||||||
|
using UnityEngine.InputSystem;
|
||||||
|
|
||||||
|
namespace Code.Example.Race.Racer.Player
|
||||||
|
{
|
||||||
|
public class PlayerCarInput : MonoBehaviour
|
||||||
|
{
|
||||||
|
private IInputService _inputService;
|
||||||
|
public Vector2 MovementInput { get; private set; }
|
||||||
|
public bool Brake { get; private set; }
|
||||||
|
|
||||||
|
[Inject]
|
||||||
|
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);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void MovementPerformed(InputAction.CallbackContext context) => MovementInput = context.ReadValue<Vector2>();
|
||||||
|
|
||||||
|
private void MovementEnded(InputAction.CallbackContext context) => MovementInput = Vector2.zero;
|
||||||
|
|
||||||
|
private void BrakePerformed(InputAction.CallbackContext context) => Brake = true;
|
||||||
|
|
||||||
|
private void BrakeEnded(InputAction.CallbackContext context) => Brake = false;
|
||||||
|
|
||||||
|
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);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: e52315b65c57499981981e2507aaf7bc
|
||||||
|
timeCreated: 1769705872
|
||||||
@@ -0,0 +1,44 @@
|
|||||||
|
using UnityEngine;
|
||||||
|
|
||||||
|
namespace Code.Example.Race.Racer.Player
|
||||||
|
{
|
||||||
|
public class PlayerRBCarController : CarControllerRB
|
||||||
|
{
|
||||||
|
[SerializeField] private PlayerCarInput playerCarInput;
|
||||||
|
|
||||||
|
public override void SetSteering(Vector2 steeringLinear)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override void Update()
|
||||||
|
{
|
||||||
|
SteeringInput = playerCarInput.MovementInput;
|
||||||
|
base.Update();
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override void Brake()
|
||||||
|
{
|
||||||
|
if (playerCarInput.Brake )
|
||||||
|
{
|
||||||
|
foreach (var wheel in wheels)
|
||||||
|
{
|
||||||
|
wheel.wheelCollider.brakeTorque = 300 * 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();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: bad2326aa0f24acb9bdfeb5fb7d3d208
|
||||||
|
timeCreated: 1770640123
|
||||||
@@ -0,0 +1,43 @@
|
|||||||
|
using System.Collections.Generic;
|
||||||
|
using Code.Example.Race.Track;
|
||||||
|
using Code.Infrastructure.EventBus;
|
||||||
|
using Reflex.Attributes;
|
||||||
|
using UnityEngine;
|
||||||
|
|
||||||
|
namespace Code.Example.Race.Racer.Player
|
||||||
|
{
|
||||||
|
public class PlayerRacer : Racer
|
||||||
|
{
|
||||||
|
[Inject] private EventBus _eventBus;
|
||||||
|
|
||||||
|
public Transform CameraPosition;
|
||||||
|
public override void SetData(RacerData data)
|
||||||
|
{
|
||||||
|
Data = data;
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void Initialize(List<Transform> waypoints)
|
||||||
|
{
|
||||||
|
Waypoints = waypoints;
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void NextWaypoint()
|
||||||
|
{
|
||||||
|
if (++CurrentWaypointIndex < Waypoints.Count) return;
|
||||||
|
|
||||||
|
CurrentWaypointIndex = 0;
|
||||||
|
_eventBus.RaiseEvent<IPlayerPassedCheckpointHandler>(x=> x.OnPlayerLapPassed(this));
|
||||||
|
_eventBus.RaiseEvent<IRacerPassedCheckpointHandler>(x=> x.LapPassed(this));
|
||||||
|
}
|
||||||
|
public bool RaceStarted { get; set; }
|
||||||
|
public override void StartRacer()
|
||||||
|
{
|
||||||
|
RaceStarted = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void StopRacer()
|
||||||
|
{
|
||||||
|
RaceStarted = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 6d3497d41c87415eab67cfc865262b79
|
||||||
|
timeCreated: 1769619757
|
||||||
@@ -0,0 +1,22 @@
|
|||||||
|
using System.Collections.Generic;
|
||||||
|
using UnityEngine;
|
||||||
|
|
||||||
|
namespace Code.Example.Race.Racer
|
||||||
|
{
|
||||||
|
public abstract class Racer : MonoBehaviour
|
||||||
|
{
|
||||||
|
protected List<Transform> Waypoints;
|
||||||
|
|
||||||
|
public int CurrentWaypointIndex { get; protected set; }
|
||||||
|
public RacerData Data { get; protected set; }
|
||||||
|
public int Id { get; set; }
|
||||||
|
public abstract void SetData(RacerData data);
|
||||||
|
public abstract void Initialize(List<Transform> waypoints);
|
||||||
|
public abstract void NextWaypoint();
|
||||||
|
public abstract void StartRacer();
|
||||||
|
public abstract void StopRacer();
|
||||||
|
|
||||||
|
[SerializeField] protected Rigidbody carRigidbody;
|
||||||
|
public Rigidbody CarRigidbody => GetComponent<Rigidbody>();
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 7f87ed38713d4b779df9e46c83b03fb7
|
||||||
|
timeCreated: 1769619306
|
||||||
@@ -0,0 +1,97 @@
|
|||||||
|
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;
|
||||||
|
using EventBus = Code.Infrastructure.EventBus.EventBus;
|
||||||
|
|
||||||
|
namespace Code.Example.Race.Racer
|
||||||
|
{
|
||||||
|
public interface IRacerFactory
|
||||||
|
{
|
||||||
|
RacerSettingsConfig GetConfig(RacerType racerType);
|
||||||
|
UniTaskVoid LoadRacer(RacerType racerType);
|
||||||
|
void ReleaseRacer(RacerType racerType);
|
||||||
|
}
|
||||||
|
|
||||||
|
public class RacerFactory : IDisposable, IRacerFactory
|
||||||
|
{
|
||||||
|
private Dictionary<RacerType, RacerSettingsConfig> _racerConfigs;
|
||||||
|
private Dictionary<RacerType, AsyncOperationHandle<GameObject>> _racerPrefabsHandle = new();
|
||||||
|
|
||||||
|
private string _racerConfigsLabel;
|
||||||
|
private AsyncOperationHandle<IList<RacerSettingsConfig>> _racerConfigsHandle;
|
||||||
|
|
||||||
|
private EventBus _eventBus;
|
||||||
|
|
||||||
|
public RacerFactory(IConfigLocator configLocator, EventBus eventBus)
|
||||||
|
{
|
||||||
|
_eventBus = eventBus;
|
||||||
|
_racerConfigsLabel = configLocator.TryGetManyConfigAssetReferences<RacerSettingsConfig>();
|
||||||
|
|
||||||
|
LoadConfigs().Forget();
|
||||||
|
}
|
||||||
|
|
||||||
|
private async UniTaskVoid LoadConfigs()
|
||||||
|
{
|
||||||
|
_racerConfigsHandle = Addressables.LoadAssetsAsync<RacerSettingsConfig>(_racerConfigsLabel);
|
||||||
|
|
||||||
|
await _racerConfigsHandle.ToUniTask();
|
||||||
|
|
||||||
|
_racerConfigs = _racerConfigsHandle.Result.ToDictionary(x => x.racerData.type);
|
||||||
|
|
||||||
|
_eventBus.RaiseEvent<IRacerFactoryInitializedHandle>(x => x.RacerFactoryInitialized());
|
||||||
|
}
|
||||||
|
|
||||||
|
public RacerSettingsConfig GetConfig(RacerType racerType) => _racerConfigs[racerType];
|
||||||
|
|
||||||
|
public async UniTaskVoid LoadRacer(RacerType racerType)
|
||||||
|
{
|
||||||
|
if (_racerPrefabsHandle.ContainsKey(racerType))
|
||||||
|
{
|
||||||
|
_eventBus.RaiseEvent<IRacerLoadedHandle>(x => x.RacerLoaded(racerType, null));
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
UnityEngine.Debug.LogWarning($"Racer loaded {racerType}");
|
||||||
|
_racerPrefabsHandle.Add(racerType,
|
||||||
|
Addressables.LoadAssetAsync<GameObject>(_racerConfigs[racerType].prefabReference));
|
||||||
|
|
||||||
|
await _racerPrefabsHandle[racerType].ToUniTask();
|
||||||
|
var racer = _racerPrefabsHandle[racerType].Result.GetComponent<Racer>();
|
||||||
|
racer.SetData(_racerConfigs[racerType].racerData);
|
||||||
|
|
||||||
|
_eventBus.RaiseEvent<IRacerLoadedHandle>(x => x.RacerLoaded(racerType, racer));
|
||||||
|
}
|
||||||
|
|
||||||
|
public void ReleaseRacer(RacerType racerType)
|
||||||
|
{
|
||||||
|
_racerPrefabsHandle[racerType].Release();
|
||||||
|
_racerPrefabsHandle.Remove(racerType);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void Dispose()
|
||||||
|
{
|
||||||
|
UnityEngine.Debug.LogWarning($"Racers released");
|
||||||
|
foreach (var prefab in _racerPrefabsHandle)
|
||||||
|
prefab.Value.Release();
|
||||||
|
_racerPrefabsHandle.Clear();
|
||||||
|
|
||||||
|
_racerConfigsHandle.Release();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public interface IRacerFactoryInitializedHandle : IGlobalSubscriber
|
||||||
|
{
|
||||||
|
public void RacerFactoryInitialized();
|
||||||
|
}
|
||||||
|
|
||||||
|
public interface IRacerLoadedHandle : IGlobalSubscriber
|
||||||
|
{
|
||||||
|
public void RacerLoaded(RacerType type, Racer racer);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 5ab404f94a89460eae107b9d453fa64d
|
||||||
|
timeCreated: 1769620039
|
||||||
@@ -0,0 +1,27 @@
|
|||||||
|
using System;
|
||||||
|
using Code.Infrastructure.Generators;
|
||||||
|
using UnityEngine.AddressableAssets;
|
||||||
|
|
||||||
|
namespace Code.Example.Race.Racer
|
||||||
|
{
|
||||||
|
[Config("Configs/Gameplay/RacerSettings", true)]
|
||||||
|
public class RacerSettings
|
||||||
|
{
|
||||||
|
[ToConfig] public RacerData racerData;
|
||||||
|
|
||||||
|
[ToConfig] public AssetReference prefabReference;
|
||||||
|
}
|
||||||
|
|
||||||
|
[Serializable]
|
||||||
|
public struct RacerData
|
||||||
|
{
|
||||||
|
public string name;
|
||||||
|
public float speed;
|
||||||
|
public float angularSpeed;
|
||||||
|
public float maxAcceleration;
|
||||||
|
public float brakeAcceleration;
|
||||||
|
public float turnSensitivity;
|
||||||
|
public float maxSteerAngle;
|
||||||
|
public RacerType type;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: f25b32b493144bfc9ca0c5016741d012
|
||||||
|
timeCreated: 1769619229
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
namespace Code.Example.Race.Racer
|
||||||
|
{
|
||||||
|
public enum RacerType
|
||||||
|
{
|
||||||
|
Player,
|
||||||
|
AIGreen,
|
||||||
|
AIRed
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 488f864fcf6f4632b8d50b39038f5472
|
||||||
|
timeCreated: 1769619126
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
namespace Code.Example.Race.Racer
|
||||||
|
{
|
||||||
|
public class RacistSpawnListDebug
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: a9506da417a249929493862133eef179
|
||||||
|
timeCreated: 1769685790
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: dbcf0e0163844255817cec8c81839eb1
|
||||||
|
timeCreated: 1769522093
|
||||||
@@ -0,0 +1,44 @@
|
|||||||
|
using Code.Example.Race.Racer;
|
||||||
|
using Code.Infrastructure.EventBus;
|
||||||
|
using Reflex.Attributes;
|
||||||
|
using UnityEngine;
|
||||||
|
|
||||||
|
namespace Code.Example.Race.Track
|
||||||
|
{
|
||||||
|
public class CheckPoint : MonoBehaviour
|
||||||
|
{
|
||||||
|
[Inject] private EventBus _eventBus;
|
||||||
|
[SerializeField] private GameObject _checkPointMesh;
|
||||||
|
[SerializeField] private int _id; // Костыль инвалид лестница
|
||||||
|
private void OnTriggerEnter(Collider other)
|
||||||
|
{
|
||||||
|
var racer = other.GetComponent<Racer.Racer>();
|
||||||
|
|
||||||
|
if (racer.CurrentWaypointIndex != _id) return;
|
||||||
|
|
||||||
|
racer.NextWaypoint();
|
||||||
|
|
||||||
|
if (racer.Data.type == RacerType.Player)
|
||||||
|
{
|
||||||
|
Hide();
|
||||||
|
_eventBus.RaiseEvent<IPlayerPassedCheckpointHandler>(h => h.OnPlayerPassedCheckpoint(racer));
|
||||||
|
}
|
||||||
|
|
||||||
|
_eventBus.RaiseEvent<IRacerPassedCheckpointHandler>(h => h.OnRacerPassedCheckpoint(racer));
|
||||||
|
}
|
||||||
|
|
||||||
|
public void Hide() => _checkPointMesh.SetActive(false);
|
||||||
|
public void Show() => _checkPointMesh.SetActive(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
public interface IRacerPassedCheckpointHandler : IGlobalSubscriber
|
||||||
|
{
|
||||||
|
void OnRacerPassedCheckpoint(Racer.Racer racer);
|
||||||
|
void LapPassed(Racer.Racer racer);
|
||||||
|
}
|
||||||
|
public interface IPlayerPassedCheckpointHandler : IGlobalSubscriber
|
||||||
|
{
|
||||||
|
void OnPlayerPassedCheckpoint(Racer.Racer racer);
|
||||||
|
void OnPlayerLapPassed(Racer.Racer racer);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: e4e29d6d9b0342db9cd6bce229fa358d
|
||||||
|
timeCreated: 1769522101
|
||||||
@@ -0,0 +1,19 @@
|
|||||||
|
using System.Collections.Generic;
|
||||||
|
using UnityEngine;
|
||||||
|
|
||||||
|
namespace Code.Example.Race.Track
|
||||||
|
{
|
||||||
|
public class RaceTrackData : MonoBehaviour
|
||||||
|
{
|
||||||
|
public Transform CameraPosition;
|
||||||
|
public TrackData trackData;
|
||||||
|
}
|
||||||
|
|
||||||
|
[System.Serializable]
|
||||||
|
public struct TrackData
|
||||||
|
{
|
||||||
|
public List<Transform> RacerPoints;
|
||||||
|
public List<CheckPoint> Checkpoints;
|
||||||
|
public int LapCount;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 1847a22e722c47c48ec0ce7d5a929580
|
||||||
|
timeCreated: 1769686034
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: af09293375544928a9b19a6b697f214e
|
||||||
|
timeCreated: 1770036714
|
||||||
@@ -0,0 +1,39 @@
|
|||||||
|
namespace Code.Example.Race.Track.WellEditor
|
||||||
|
{
|
||||||
|
using UnityEngine;
|
||||||
|
using UnityEditor;
|
||||||
|
|
||||||
|
public static class CheckPointAsset
|
||||||
|
{
|
||||||
|
[MenuItem("GameObject/Track/CheckPoint", false, 1)]
|
||||||
|
private static void CreateCustomPrefab()
|
||||||
|
{
|
||||||
|
// Define the path to your prefab in the Project (must be in an "Assets" relative path)
|
||||||
|
var prefabPath = "Assets/Resources/Example/Misc/Point.prefab"; // Update with your actual path
|
||||||
|
|
||||||
|
// Load the prefab asset
|
||||||
|
var prefab = AssetDatabase.LoadAssetAtPath<GameObject>(prefabPath);
|
||||||
|
|
||||||
|
if (!prefab)
|
||||||
|
{
|
||||||
|
Debug.LogError("Prefab not found at path: " + prefabPath);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Instantiate the prefab in the scene
|
||||||
|
var newInstance = (GameObject)PrefabUtility.InstantiatePrefab(prefab);
|
||||||
|
|
||||||
|
// Ensure it is placed correctly in the Hierarchy and is undoable
|
||||||
|
Undo.RegisterCreatedObjectUndo(newInstance, "Create Custom Prefab");
|
||||||
|
Selection.activeGameObject = newInstance;
|
||||||
|
|
||||||
|
// Set parent if an object is selected
|
||||||
|
if (!Selection.activeTransform)
|
||||||
|
{
|
||||||
|
newInstance.transform.parent = Selection.activeTransform;
|
||||||
|
newInstance.transform.localPosition = Vector3.zero;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 7d55e4bcf05848eea361440799c21d7e
|
||||||
|
timeCreated: 1770036738
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: b875d3daf0cc42e997366fb0b9f0a722
|
||||||
|
timeCreated: 1770042347
|
||||||
@@ -0,0 +1,44 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using Code.Infrastructure.EventBus;
|
||||||
|
using Code.Infrastructure.UI;
|
||||||
|
using Reflex.Attributes;
|
||||||
|
using TMPro;
|
||||||
|
using UnityEngine;
|
||||||
|
|
||||||
|
namespace Code.Example.Race.UI
|
||||||
|
{
|
||||||
|
public class PlayerScoreCounter : UIPanel, IScoreChangedHandle
|
||||||
|
{
|
||||||
|
[SerializeField] private TMP_Text playerScore;
|
||||||
|
private EventBus _eventBus;
|
||||||
|
|
||||||
|
[Inject]
|
||||||
|
private void Construct(EventBus eventBus)
|
||||||
|
{
|
||||||
|
_eventBus = eventBus;
|
||||||
|
_eventBus.Subscribe(this);
|
||||||
|
}
|
||||||
|
public override void Open(Action callback = null)
|
||||||
|
{
|
||||||
|
playerScore.gameObject.SetActive(true);
|
||||||
|
callback?.Invoke();
|
||||||
|
// image.DOColor(shownColor, 1f).onComplete = () => callback?.Invoke();
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void Close(Action callback = null)
|
||||||
|
{
|
||||||
|
playerScore.gameObject.SetActive(false);
|
||||||
|
callback?.Invoke();
|
||||||
|
// image.DOColor(hiddenColor, 1f).onComplete += () => callback?.Invoke();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void ScoreChanged(Racer.Racer racer, ScoreData additionalScore, List<KeyValuePair<Racer.Racer,ScoreData>> scores)
|
||||||
|
{
|
||||||
|
// if (racer.Data.type == RacerType.Player)
|
||||||
|
string output = "";
|
||||||
|
foreach (var score in scores) output += $@"{score.Key.Data.name}: {score.Value.lapsPassed} \t {score.Value.checkpointsPassed}\n";
|
||||||
|
playerScore.text = output;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: cf68a9a9d3a946f086dccd6d11741dcf
|
||||||
|
timeCreated: 1770042362
|
||||||
@@ -0,0 +1,30 @@
|
|||||||
|
using System;
|
||||||
|
using Code.Infrastructure.UI;
|
||||||
|
using DG.Tweening;
|
||||||
|
using TMPro;
|
||||||
|
using UnityEngine;
|
||||||
|
using UnityEngine.UI;
|
||||||
|
|
||||||
|
namespace Code.Example.Race.UI
|
||||||
|
{
|
||||||
|
public class WinScreen : UIPanel
|
||||||
|
{
|
||||||
|
[SerializeField] private Image image;
|
||||||
|
[SerializeField] private TMP_Text winText;
|
||||||
|
[SerializeField] private Color shownColor;
|
||||||
|
[SerializeField] private Color hiddenColor;
|
||||||
|
|
||||||
|
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();
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void Close(Action callback = null)
|
||||||
|
{
|
||||||
|
image.DOColor(hiddenColor, 1f).onComplete = () => callback?.Invoke();
|
||||||
|
winText.DOColor(hiddenColor, 1f).onComplete = () => callback?.Invoke();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 9093110373134c91b06be09705639ddd
|
||||||
|
timeCreated: 1770455340
|
||||||
@@ -1,4 +1,7 @@
|
|||||||
|
using Code.Infrastructure.Audio;
|
||||||
using Code.Infrastructure.Camera;
|
using Code.Infrastructure.Camera;
|
||||||
|
using Code.Infrastructure.Input;
|
||||||
|
using Code.Infrastructure.UI;
|
||||||
using Reflex.Attributes;
|
using Reflex.Attributes;
|
||||||
|
|
||||||
namespace Code.Infrastructure.App
|
namespace Code.Infrastructure.App
|
||||||
@@ -14,6 +17,12 @@ namespace Code.Infrastructure.App
|
|||||||
{
|
{
|
||||||
[Inject] public SceneLoader.SceneLoader SceneLoader { get; set; }
|
[Inject] public SceneLoader.SceneLoader SceneLoader { get; set; }
|
||||||
[Inject] public CameraStateMachine Camera { get; set; }
|
[Inject] public CameraStateMachine Camera { get; set; }
|
||||||
|
[Inject] public CameraFactory CameraFactory { get; set; }
|
||||||
|
[Inject] public IUIService UIService { get; set; }
|
||||||
|
[Inject] public IAudioFactory AudioFactory { get; set; }
|
||||||
|
[Inject] public IAudioService AudioService { get; set; }
|
||||||
|
[Inject] public IInputService InputService { get; set; }
|
||||||
|
public AppStateMachine StateMachine { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
[Generators.StateMachine(typeof(AppStateMachineContext),typeof(AppStates))]
|
[Generators.StateMachine(typeof(AppStateMachineContext),typeof(AppStates))]
|
||||||
|
|||||||
@@ -1,23 +1,43 @@
|
|||||||
|
using Code.Debug;
|
||||||
|
using Code.Infrastructure.Audio;
|
||||||
using Code.Infrastructure.Camera;
|
using Code.Infrastructure.Camera;
|
||||||
using Code.Infrastructure.Configs;
|
using Code.Infrastructure.Configs;
|
||||||
using Code.Infrastructure.Input;
|
using Code.Infrastructure.Input;
|
||||||
using Code.Infrastructure.Loadings;
|
using Code.Infrastructure.Loadings;
|
||||||
using Code.Infrastructure.SceneLoader;
|
using Code.Infrastructure.SceneLoader;
|
||||||
|
using Code.Infrastructure.UI;
|
||||||
|
using Code.Infrastructure.Volume;
|
||||||
using Reflex.Core;
|
using Reflex.Core;
|
||||||
using Reflex.Enums;
|
using Reflex.Enums;
|
||||||
|
using Unity.Cinemachine;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
using UnityEngine.Rendering.Universal;
|
||||||
using Resolution = Reflex.Enums.Resolution;
|
using Resolution = Reflex.Enums.Resolution;
|
||||||
|
|
||||||
namespace Code.Infrastructure.App
|
namespace Code.Infrastructure.App
|
||||||
{
|
{
|
||||||
public class PapaInstaller : MonoBehaviour, IInstaller, ISceneConfigsLoadedHandle, IInputServiceInitializedHandle, ICameraInitializedHandle
|
public class PapaInstaller : MonoBehaviour, IInstaller,
|
||||||
|
ISceneConfigsLoadedHandle,
|
||||||
|
IInputServiceInitializedHandle,
|
||||||
|
ICameraInitializedHandle,
|
||||||
|
IUIInitializedHandle,
|
||||||
|
IUIPanelLoaded,
|
||||||
|
IVolumesInitializedHandle,
|
||||||
|
IVolumeLoaded,
|
||||||
|
IAudioSourcePoolInitializedHandle,
|
||||||
|
IAudioConfigsLoadedHandle,
|
||||||
|
ICinematicMachineHandle
|
||||||
{
|
{
|
||||||
public void InstallBindings(ContainerBuilder containerBuilder)
|
public void InstallBindings(ContainerBuilder containerBuilder)
|
||||||
{
|
{
|
||||||
|
InitLoadings();
|
||||||
|
|
||||||
containerBuilder.RegisterType(typeof(EventBus.EventBus), Lifetime.Singleton, Resolution.Eager);
|
containerBuilder.RegisterType(typeof(EventBus.EventBus), Lifetime.Singleton, Resolution.Eager);
|
||||||
containerBuilder.RegisterType(typeof(ConfigLocator), new[] { typeof(IConfigLocator) }, Lifetime.Singleton, Resolution.Eager);
|
containerBuilder.RegisterType(typeof(ConfigLocator), new[] { typeof(IConfigLocator) }, Lifetime.Singleton,
|
||||||
|
Resolution.Eager);
|
||||||
containerBuilder.RegisterType(typeof(SceneLoader.SceneLoader), Lifetime.Singleton, Resolution.Eager);
|
containerBuilder.RegisterType(typeof(SceneLoader.SceneLoader), Lifetime.Singleton, Resolution.Eager);
|
||||||
containerBuilder.RegisterType(typeof(InputService),new[] { typeof(IInputService) }, Lifetime.Singleton, Resolution.Eager);
|
containerBuilder.RegisterType(typeof(InputService), new[] { typeof(IInputService) }, Lifetime.Singleton,
|
||||||
|
Resolution.Eager);
|
||||||
|
|
||||||
containerBuilder.OnContainerBuilt += Bootstrap;
|
containerBuilder.OnContainerBuilt += Bootstrap;
|
||||||
|
|
||||||
@@ -28,25 +48,69 @@ namespace Code.Infrastructure.App
|
|||||||
containerBuilder.RegisterType(typeof(CameraStateMachine), Lifetime.Singleton, Resolution.Lazy);
|
containerBuilder.RegisterType(typeof(CameraStateMachine), Lifetime.Singleton, Resolution.Lazy);
|
||||||
containerBuilder.RegisterType(typeof(CameraStateMachineContext), Lifetime.Singleton, Resolution.Lazy);
|
containerBuilder.RegisterType(typeof(CameraStateMachineContext), Lifetime.Singleton, Resolution.Lazy);
|
||||||
|
|
||||||
|
containerBuilder.RegisterType(typeof(UIFactory), new[] { typeof(IUIFactory) }, Lifetime.Singleton,
|
||||||
|
Resolution.Eager);
|
||||||
|
containerBuilder.RegisterType(typeof(UIService), new[] { typeof(IUIService) }, Lifetime.Singleton,
|
||||||
|
Resolution.Eager);
|
||||||
|
|
||||||
|
containerBuilder.RegisterType(typeof(VolumeService), new[] { typeof(IVolumeService) }, Lifetime.Singleton,
|
||||||
|
Resolution.Lazy);
|
||||||
|
containerBuilder.RegisterType(typeof(VolumeFactory), new[] { typeof(IVolumeFactory) }, Lifetime.Singleton,
|
||||||
|
Resolution.Eager);
|
||||||
|
|
||||||
|
containerBuilder.RegisterType(typeof(AudioFactory), new[] { typeof(IAudioFactory) }, Lifetime.Singleton,
|
||||||
|
Resolution.Eager);
|
||||||
|
containerBuilder.RegisterType(typeof(AudioSourcePool), new[] { typeof(IAudioSourcePool) }, Lifetime.Singleton,
|
||||||
|
Resolution.Eager);
|
||||||
|
containerBuilder.RegisterType(typeof(AudioService), new[] { typeof(IAudioService) }, Lifetime.Singleton,
|
||||||
|
Resolution.Eager);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
private void InitLoadings()
|
||||||
|
{
|
||||||
|
// UIFactory
|
||||||
|
// Logo
|
||||||
|
// Scene configs
|
||||||
|
// Input service
|
||||||
|
// Camera
|
||||||
|
// Volume Factory
|
||||||
|
// Loading volume
|
||||||
|
// Audio Factory
|
||||||
|
// Audio Pool
|
||||||
|
// Cinemachine Camera
|
||||||
|
_initialLoading = new Loading(10, () => EssentialLoadEnded(_thatRightContainer));
|
||||||
|
|
||||||
|
_ui2CamLoading = new Loading(2,
|
||||||
|
() =>
|
||||||
|
{
|
||||||
|
_thatRightContainer.Resolve<IUIService>().SetCanvasCamera(_thatRightContainer
|
||||||
|
.Resolve<CameraStateMachineContext>().cameraLoadedData.Camera);
|
||||||
|
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
private Loading _initialLoading;
|
private Loading _initialLoading;
|
||||||
|
private Loading _ui2CamLoading;
|
||||||
private Container _thatRightContainer;
|
private Container _thatRightContainer;
|
||||||
|
|
||||||
private void Bootstrap(Container container)
|
private void Bootstrap(Container container)
|
||||||
{
|
{
|
||||||
_thatRightContainer = container;
|
_thatRightContainer = container;
|
||||||
|
|
||||||
container.Resolve<EventBus.EventBus>().Subscribe(this);
|
container.Resolve<EventBus.EventBus>().Subscribe(this);
|
||||||
|
|
||||||
container.Resolve<CameraFactory>().CreateCameraStateMachine(container.Resolve<CameraStateMachine>()).Forget();
|
var cameraFactory = container.Resolve<CameraFactory>();
|
||||||
|
cameraFactory.CreateCameraStateMachine(container.Resolve<CameraStateMachine>())
|
||||||
_initialLoading = new Loading(3, () => EssentialLoadEnded(container));
|
.Forget();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void EssentialLoadEnded(Container container)
|
private void EssentialLoadEnded(Container container)
|
||||||
{
|
{
|
||||||
container.Resolve<AppStateMachine>().SwitchState(AppStates.Bootstrap).AllowStateTransition(AppStates.Gameplay);
|
|
||||||
container.Resolve<EventBus.EventBus>().Unsubscribe(this);
|
container.Resolve<EventBus.EventBus>().Unsubscribe(this);
|
||||||
|
container.Resolve<AppStateMachine>().SwitchState(AppStates.Bootstrap)
|
||||||
|
.AllowStateTransition(AppStates.Gameplay);
|
||||||
|
container.Resolve<AppStateMachineContext>().StateMachine = container.Resolve<AppStateMachine>();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void SceneConfigsLoaded()
|
public void SceneConfigsLoaded()
|
||||||
@@ -63,7 +127,75 @@ namespace Code.Infrastructure.App
|
|||||||
{
|
{
|
||||||
_thatRightContainer.Resolve<CameraStateMachineContext>().cameraLoadedData = data;
|
_thatRightContainer.Resolve<CameraStateMachineContext>().cameraLoadedData = data;
|
||||||
_thatRightContainer.Resolve<CameraStateMachine>().SwitchState(CameraMode.None)
|
_thatRightContainer.Resolve<CameraStateMachine>().SwitchState(CameraMode.None)
|
||||||
.AllowStateTransition(CameraMode.FirstPerson);
|
.AllowStateTransition(CameraMode.ThirdPerson);
|
||||||
|
|
||||||
|
data.Camera.GetUniversalAdditionalCameraData().renderPostProcessing = true;
|
||||||
|
|
||||||
|
_ui2CamLoading.DoProgress();
|
||||||
|
_initialLoading.DoProgress();
|
||||||
|
|
||||||
|
_thatRightContainer.Resolve<CameraFactory>().LoadCinemachineCamera(CameraMode.None).Forget();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void UIInitialized()
|
||||||
|
{
|
||||||
|
_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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void VolumesInitialized()
|
||||||
|
{
|
||||||
|
_initialLoading.DoProgress();
|
||||||
|
|
||||||
|
_thatRightContainer.Resolve<IVolumeService>().TryLoadVolume(VolumeId.MenuRetro);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void VolumeLoaded(VolumeId volumeId)
|
||||||
|
{
|
||||||
|
switch (volumeId)
|
||||||
|
{
|
||||||
|
case VolumeId.MenuRetro:
|
||||||
|
_initialLoading.DoProgress();
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
Application.Quit();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void AudioSourcePoolInitialized()
|
||||||
|
{
|
||||||
|
_initialLoading.DoProgress();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void AudioConfigsLoaded()
|
||||||
|
{
|
||||||
|
_initialLoading.DoProgress();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void CinemachineLoaded(CinemachineCamera cinemachineCamera)
|
||||||
|
{
|
||||||
_initialLoading.DoProgress();
|
_initialLoading.DoProgress();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,19 +1,36 @@
|
|||||||
|
using Code.Example.Race;
|
||||||
|
using Code.Example.Race.Racer;
|
||||||
|
using Code.Example.Race.Track;
|
||||||
|
using Code.Infrastructure.SceneLoader;
|
||||||
using Reflex.Core;
|
using Reflex.Core;
|
||||||
|
using Reflex.Enums;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
using UnityEngine.Serialization;
|
||||||
|
using Resolution = Reflex.Enums.Resolution;
|
||||||
|
|
||||||
namespace Code.Infrastructure.App.SceneInstallers
|
namespace Code.Infrastructure.App.SceneInstallers
|
||||||
{
|
{
|
||||||
public class GameplaySceneInstaller : MonoBehaviour, IInstaller
|
public class GameplaySceneInstaller : MonoBehaviour, IInstaller
|
||||||
{
|
{
|
||||||
|
[SerializeField] private RaceTrackData raceTrackData;
|
||||||
|
|
||||||
public void InstallBindings(ContainerBuilder containerBuilder)
|
public void InstallBindings(ContainerBuilder containerBuilder)
|
||||||
{
|
{
|
||||||
|
containerBuilder.RegisterType(typeof(RacerFactory), new[] { typeof(IRacerFactory) }, Lifetime.Scoped,
|
||||||
|
Resolution.Lazy);
|
||||||
|
containerBuilder.RegisterType(typeof(RaceScores), Lifetime.Scoped,
|
||||||
|
Resolution.Eager);
|
||||||
|
containerBuilder.RegisterValue(raceTrackData);
|
||||||
|
containerBuilder.RegisterType(typeof(RaceGame), Lifetime.Scoped,
|
||||||
|
Resolution.Lazy);
|
||||||
|
|
||||||
containerBuilder.OnContainerBuilt += PostInstall;
|
containerBuilder.OnContainerBuilt += PostInstall;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void PostInstall(Container container)
|
private void PostInstall(Container container)
|
||||||
{
|
{
|
||||||
|
container.Resolve<EventBus.EventBus>()
|
||||||
|
.RaiseEvent<IOnGameplaySceneLoadedHandler>(x => x.OnGameplaySceneInitialized(container));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,15 +1,14 @@
|
|||||||
using Code.Infrastructure.Camera;
|
using System.Threading;
|
||||||
|
using Code.Debug;
|
||||||
|
using Code.Infrastructure.Audio;
|
||||||
using Code.Infrastructure.Generators;
|
using Code.Infrastructure.Generators;
|
||||||
using Code.Infrastructure.SceneLoader;
|
using Code.Infrastructure.UI;
|
||||||
using Cysharp.Threading.Tasks;
|
|
||||||
using UnityEngine;
|
|
||||||
using UnityEngine.SceneManagement;
|
|
||||||
|
|
||||||
namespace Code.Infrastructure.App.States
|
namespace Code.Infrastructure.App.States
|
||||||
{
|
{
|
||||||
[State(typeof(AppStates),typeof(AppStateMachineContext))]
|
[State(typeof(AppStates),typeof(AppStateMachineContext))]
|
||||||
[StateRaisingEvent]
|
[StateRaisingEvent]
|
||||||
public partial class BootstrapState : IOnGameplaySceneLoadedHandler
|
public partial class BootstrapState : IUIPanelLoaded, IReadyToPlayHandle
|
||||||
{
|
{
|
||||||
private EventBus.EventBus _eventBus;
|
private EventBus.EventBus _eventBus;
|
||||||
public BootstrapState(AppStateMachineContext context, EventBus.EventBus eventBus) : base(context,eventBus)
|
public BootstrapState(AppStateMachineContext context, EventBus.EventBus eventBus) : base(context,eventBus)
|
||||||
@@ -21,17 +20,29 @@ namespace Code.Infrastructure.App.States
|
|||||||
protected override void OnEnterState()
|
protected override void OnEnterState()
|
||||||
{
|
{
|
||||||
_eventBus.Subscribe(this);
|
_eventBus.Subscribe(this);
|
||||||
Context.SceneLoader.LoadSceneAsync(SceneId.Gameplay, LoadSceneMode.Single).Forget();
|
|
||||||
|
Context.UIService.TryRemovePanel(UIPanelType.Logo);
|
||||||
|
|
||||||
|
Context.UIService.TryLoadPanel(UIPanelType.DebugSceneChooser);
|
||||||
|
Context.AudioFactory.LoadAudioClips(AudioNames.UISounds);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void OnExitState()
|
protected override void OnExitState()
|
||||||
{
|
{
|
||||||
|
// Context.AudioFactory.ReleaseAudios(AudioNames.UISounds);
|
||||||
|
Context.UIService.TryRemovePanel(UIPanelType.DebugSceneChooser);
|
||||||
_eventBus.Unsubscribe(this);
|
_eventBus.Unsubscribe(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void OnGameplaySceneLoaded()
|
public void UILoaded(UIPanelType uiPanelType)
|
||||||
{
|
{
|
||||||
Debug.Log("Spermageddon");
|
if (uiPanelType != UIPanelType.DebugSceneChooser) return;
|
||||||
|
|
||||||
|
Context.UIService.OpenPanel(uiPanelType);
|
||||||
|
}
|
||||||
|
public void OnReadyToPlay(AudioNames groupName)
|
||||||
|
{
|
||||||
|
Context.AudioService.PlayRepeatedly(AudioNames.UISounds,0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,31 +1,168 @@
|
|||||||
|
using System.Linq;
|
||||||
|
using Code.Example.Race;
|
||||||
|
using Code.Example.Race.Racer;
|
||||||
|
using Code.Example.Race.Racer.AI;
|
||||||
|
using Code.Example.Race.Racer.Player;
|
||||||
|
using Code.Example.Race.Track;
|
||||||
|
using Code.Example.Race.UI;
|
||||||
|
using Code.Infrastructure.Audio;
|
||||||
using Code.Infrastructure.Camera;
|
using Code.Infrastructure.Camera;
|
||||||
|
using Code.Infrastructure.Camera.CameraStates;
|
||||||
using Code.Infrastructure.Generators;
|
using Code.Infrastructure.Generators;
|
||||||
|
using Code.Infrastructure.Input;
|
||||||
|
using Code.Infrastructure.Loadings;
|
||||||
using Code.Infrastructure.SceneLoader;
|
using Code.Infrastructure.SceneLoader;
|
||||||
using UnityEngine;
|
using Code.Infrastructure.UI;
|
||||||
|
using Cysharp.Threading.Tasks;
|
||||||
|
using Reflex.Core;
|
||||||
|
using Reflex.Injectors;
|
||||||
|
using Unity.Cinemachine;
|
||||||
|
using UnityEngine.SceneManagement;
|
||||||
|
|
||||||
namespace Code.Infrastructure.App.States
|
namespace Code.Infrastructure.App.States
|
||||||
{
|
{
|
||||||
[State(typeof(AppStates),typeof(AppStateMachineContext))]
|
[State(typeof(AppStates), typeof(AppStateMachineContext))]
|
||||||
[StateRaisingEvent]
|
[StateRaisingEvent]
|
||||||
public partial class GameplayState : IOnGameplaySceneLoadedHandler
|
public partial class GameplayState :
|
||||||
|
IOnGameplaySceneLoadedHandler,
|
||||||
|
IRaceGameHandle,
|
||||||
|
IRacerFactoryInitializedHandle,
|
||||||
|
IUIPanelLoaded,
|
||||||
|
ICinematicMachineHandle
|
||||||
{
|
{
|
||||||
public GameplayState(AppStateMachineContext context, EventBus.EventBus eventBus) : base(context, eventBus)
|
public GameplayState(AppStateMachineContext context, EventBus.EventBus eventBus) : base(context, eventBus)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
public override AppStates myState => AppStates.Gameplay;
|
public override AppStates myState => AppStates.Gameplay;
|
||||||
|
|
||||||
|
private Loading _gameplayLoading;
|
||||||
|
|
||||||
protected override void OnEnterState()
|
protected override void OnEnterState()
|
||||||
{
|
{
|
||||||
|
EventBus.Subscribe(this);
|
||||||
|
Context.UIService.OpenPanel(UIPanelType.Loading);
|
||||||
|
|
||||||
|
// Scene
|
||||||
|
// RaceGame
|
||||||
|
// Factory
|
||||||
|
// PlayerCounter
|
||||||
|
// WinScreen
|
||||||
|
// CinemachineCamera
|
||||||
|
_gameplayLoading = new Loading(6, GameplayLoadingCompleted);
|
||||||
|
|
||||||
|
Context.UIService.TryLoadPanel(UIPanelType.PlayerScoreCounter);
|
||||||
|
Context.UIService.TryLoadPanel(UIPanelType.WinScreen);
|
||||||
|
Context.SceneLoader.LoadSceneAsync(SceneId.Gameplay, LoadSceneMode.Single).Forget();
|
||||||
|
Context.InputService.EnableMap(ActionMappings.Gameplay);
|
||||||
|
Context.CameraFactory.LoadCinemachineCamera(CameraMode.ThirdPerson).Forget();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void GameplayLoadingCompleted()
|
||||||
|
{
|
||||||
|
Context.AudioService.CancelMusic(AudioNames.UISounds, 0);
|
||||||
|
|
||||||
|
_raceGame.PlaceRacers();
|
||||||
|
|
||||||
|
Context.Camera.SwitchState(CameraMode.ThirdPerson).AllowStateTransition(CameraMode.None);
|
||||||
|
// ((ThirdPersonState)Context.Camera.CurrentBaseState).SetFollowTarget(_raceGame.PlacedRacers[0].gameObject.transform, _raceGame.PlacedRacers[0].CarRigidbody);
|
||||||
|
Context.CameraFactory.GetCinematicCamera(CameraMode.ThirdPerson).transform.position = ((PlayerRacer)_raceGame.PlacedRacers[0]).CameraPosition.position;
|
||||||
|
Context.CameraFactory.GetCinematicCamera(CameraMode.ThirdPerson).transform.rotation = ((PlayerRacer)_raceGame.PlacedRacers[0]).CameraPosition.rotation;
|
||||||
|
|
||||||
|
Context.CameraFactory.GetCinematicCamera(CameraMode.ThirdPerson).Follow =
|
||||||
|
_raceGame.PlacedRacers[0].gameObject.transform;
|
||||||
|
|
||||||
|
Context.UIService.ClosePanel(UIPanelType.Loading);
|
||||||
|
_raceGame.StartRacers();
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void OnExitState()
|
protected override void OnExitState()
|
||||||
{
|
{
|
||||||
|
Context.InputService.DisableMap(ActionMappings.Gameplay);
|
||||||
|
Context.UIService.TryRemovePanel(UIPanelType.PlayerScoreCounter);
|
||||||
|
Context.UIService.TryRemovePanel(UIPanelType.WinScreen);
|
||||||
|
Context.CameraFactory.ReleaseCinemachineCamera(CameraMode.ThirdPerson);
|
||||||
|
Context.InputService.DisableMap(ActionMappings.Gameplay);
|
||||||
|
|
||||||
|
_raceGame = null;
|
||||||
|
|
||||||
|
EventBus.Unsubscribe(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void OnGameplaySceneLoaded()
|
public void OnGameplaySceneLoaded()
|
||||||
{
|
{
|
||||||
Debug.Log("Spermageddon");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private RaceTrackData _raceTrackData;
|
||||||
|
private RaceGame _raceGame;
|
||||||
|
private Container UNTILTHEYFIXCONTAINERS;
|
||||||
|
public void OnGameplaySceneInitialized(Container container)
|
||||||
|
{
|
||||||
|
UNTILTHEYFIXCONTAINERS = container;
|
||||||
|
|
||||||
|
_raceTrackData = container.Resolve<RaceTrackData>();
|
||||||
|
|
||||||
|
Context.CameraFactory.GetCinematicCamera(CameraMode.None).transform.position = _raceTrackData.CameraPosition.transform.position;
|
||||||
|
Context.CameraFactory.GetCinematicCamera(CameraMode.None).transform.rotation = _raceTrackData.CameraPosition.transform.rotation;
|
||||||
|
|
||||||
|
_gameplayLoading.DoProgress();
|
||||||
|
|
||||||
|
container.Resolve<IRacerFactory>();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void RaceGameReady()
|
||||||
|
{
|
||||||
|
_gameplayLoading.DoProgress();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void RaceGameEnded(RaceScores scores)
|
||||||
|
{
|
||||||
|
var winScreen = (WinScreen)Context.UIService.TryGetPanel(UIPanelType.WinScreen);
|
||||||
|
|
||||||
|
var id = 0;
|
||||||
|
var cachedScores = scores.GetScores();
|
||||||
|
|
||||||
|
for (var i = 0; i < cachedScores.Count; i++)
|
||||||
|
if (cachedScores[i].Key.Data.type == RacerType.Player) id = i + 1;
|
||||||
|
|
||||||
|
var winText = $@"{id} МЕСТО\n";
|
||||||
|
winScreen.SetText(winText);
|
||||||
|
|
||||||
|
Context.UIService.ClosePanel(UIPanelType.PlayerScoreCounter);
|
||||||
|
Context.UIService.OpenPanel(UIPanelType.WinScreen);
|
||||||
|
|
||||||
|
EndTheGame().Forget();
|
||||||
|
}
|
||||||
|
|
||||||
|
private async UniTaskVoid EndTheGame()
|
||||||
|
{
|
||||||
|
await UniTask.WaitForSeconds(3f);
|
||||||
|
|
||||||
|
Context.UIService.OpenPanel(UIPanelType.Loading);
|
||||||
|
Context.StateMachine.SwitchState(AppStates.MainMenu).AllowStateTransition(AppStates.Gameplay);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void RacerFactoryInitialized()
|
||||||
|
{
|
||||||
|
_raceGame = UNTILTHEYFIXCONTAINERS.Resolve<RaceGame>();
|
||||||
|
|
||||||
|
_gameplayLoading.DoProgress();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void UILoaded(UIPanelType uiPanelType)
|
||||||
|
{
|
||||||
|
if(uiPanelType == UIPanelType.WinScreen)
|
||||||
|
{
|
||||||
|
_gameplayLoading.DoProgress();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (uiPanelType != UIPanelType.PlayerScoreCounter) return;
|
||||||
|
|
||||||
|
Context.UIService.OpenPanel(UIPanelType.PlayerScoreCounter);
|
||||||
|
_gameplayLoading.DoProgress();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void CinemachineLoaded(CinemachineCamera cinemachineCamera) => _gameplayLoading.DoProgress();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,22 +1,74 @@
|
|||||||
|
using Code.Debug;
|
||||||
|
using Code.Infrastructure.Audio;
|
||||||
using Code.Infrastructure.Generators;
|
using Code.Infrastructure.Generators;
|
||||||
|
using Code.Infrastructure.Loadings;
|
||||||
|
using Code.Infrastructure.SceneLoader;
|
||||||
|
using Code.Infrastructure.UI;
|
||||||
|
using Code.Infrastructure.UI.Panels;
|
||||||
|
using Reflex.Core;
|
||||||
|
using UnityEngine.SceneManagement;
|
||||||
|
|
||||||
namespace Code.Infrastructure.App.States
|
namespace Code.Infrastructure.App.States
|
||||||
{
|
{
|
||||||
[State(typeof(AppStates),typeof(AppStateMachineContext))]
|
[State(typeof(AppStates),typeof(AppStateMachineContext))]
|
||||||
[StateRaisingEvent]
|
[StateRaisingEvent]
|
||||||
public partial class MainMenuState
|
public partial class MainMenuState : IUIPanelLoaded, IReadyToPlayHandle, IOnMainMenuSceneLoadedHandler
|
||||||
{
|
{
|
||||||
|
private EventBus.EventBus _eventBus;
|
||||||
public MainMenuState(AppStateMachineContext context, EventBus.EventBus eventBus) : base(context,eventBus)
|
public MainMenuState(AppStateMachineContext context, EventBus.EventBus eventBus) : base(context,eventBus)
|
||||||
{
|
{
|
||||||
|
_eventBus = eventBus;
|
||||||
}
|
}
|
||||||
|
|
||||||
public override AppStates myState => AppStates.MainMenu;
|
public override AppStates myState => AppStates.MainMenu;
|
||||||
|
private Loading _loading;
|
||||||
protected override void OnEnterState()
|
protected override void OnEnterState()
|
||||||
{
|
{
|
||||||
|
_eventBus.Subscribe(this);
|
||||||
|
|
||||||
|
_loading = new Loading(2, LoadComplete);
|
||||||
|
|
||||||
|
Context.UIService.TryLoadPanel(UIPanelType.DebugSceneChooser);
|
||||||
|
// Context.AudioFactory.LoadAudioClips(AudioNames.UISounds);
|
||||||
|
Context.SceneLoader.LoadSceneAsync(SceneId.MainMenu, LoadSceneMode.Single).Forget();
|
||||||
|
Context.AudioService.PlayRepeatedly(AudioNames.UISounds,0);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void OnExitState()
|
protected override void OnExitState()
|
||||||
{
|
{
|
||||||
|
// 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();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void LoadComplete()
|
||||||
|
{
|
||||||
|
Context.UIService.OpenPanel(UIPanelType.DebugSceneChooser);
|
||||||
|
Context.UIService.ClosePanel(UIPanelType.Loading);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void OnReadyToPlay(AudioNames groupName)
|
||||||
|
{
|
||||||
|
_loading.DoProgress();
|
||||||
|
Context.AudioService.PlayRepeatedly(AudioNames.UISounds,0);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void OnMainMenuSceneLoaded()
|
||||||
|
{
|
||||||
|
_loading.DoProgress();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void OnMainMenuSceneInitialized(Container container)
|
||||||
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 117e5c36ac3f47b2bff18075759dd50e
|
||||||
|
timeCreated: 1769344255
|
||||||
@@ -0,0 +1,106 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Threading;
|
||||||
|
using Code.Infrastructure.Configs;
|
||||||
|
using Code.Infrastructure.EventBus;
|
||||||
|
using Cysharp.Threading.Tasks;
|
||||||
|
using UnityEngine;
|
||||||
|
using UnityEngine.AddressableAssets;
|
||||||
|
using UnityEngine.ResourceManagement.AsyncOperations;
|
||||||
|
|
||||||
|
namespace Code.Infrastructure.Audio
|
||||||
|
{
|
||||||
|
public interface IAudioFactory
|
||||||
|
{
|
||||||
|
UniTaskVoid LoadAudioClips(AudioNames groupName);
|
||||||
|
void ReleaseAudios(AudioNames groupName);
|
||||||
|
}
|
||||||
|
|
||||||
|
public class AudioFactory : IAudioFactory, IDisposable
|
||||||
|
{
|
||||||
|
private string _label;
|
||||||
|
private Dictionary<AudioNames, Dictionary<int, AssetReference>> _audioInfos = new();
|
||||||
|
|
||||||
|
private Dictionary<AudioNames, Dictionary<int, AsyncOperationHandle<AudioClip>>> _clipsHandles = new();
|
||||||
|
private AsyncOperationHandle<IList<AudioInfoConfig>> _configsHandle;
|
||||||
|
private EventBus.EventBus _eventBus;
|
||||||
|
|
||||||
|
public AudioFactory(IConfigLocator configLocator, EventBus.EventBus eventBus)
|
||||||
|
{
|
||||||
|
_eventBus = eventBus;
|
||||||
|
_label = configLocator.TryGetManyConfigAssetReferences<AudioInfoConfig>();
|
||||||
|
|
||||||
|
for (var i = 0; i < typeof(AudioNames).GetEnumValues().Length; i++)
|
||||||
|
{
|
||||||
|
_audioInfos.Add((AudioNames)i, new Dictionary<int, AssetReference>());
|
||||||
|
_clipsHandles.Add((AudioNames)i, new Dictionary<int, AsyncOperationHandle<AudioClip>>());
|
||||||
|
}
|
||||||
|
|
||||||
|
LoadConfigs().Forget();
|
||||||
|
}
|
||||||
|
|
||||||
|
private async UniTaskVoid LoadConfigs()
|
||||||
|
{
|
||||||
|
_configsHandle = Addressables.LoadAssetsAsync<AudioInfoConfig>(_label);
|
||||||
|
|
||||||
|
await _configsHandle.ToUniTask();
|
||||||
|
|
||||||
|
foreach (AudioInfoConfig config in _configsHandle.Result)
|
||||||
|
_audioInfos[config.GroupName].Add(config.id, config.fileReference);
|
||||||
|
|
||||||
|
_eventBus.RaiseEvent<IAudioConfigsLoadedHandle>(ui => ui.AudioConfigsLoaded());
|
||||||
|
}
|
||||||
|
|
||||||
|
public async UniTaskVoid LoadAudioClips(AudioNames groupName)
|
||||||
|
{
|
||||||
|
UnityEngine.Debug.LogWarning($"Audios loaded {groupName}");
|
||||||
|
|
||||||
|
foreach (var audioInfo in _audioInfos[groupName])
|
||||||
|
if (!_clipsHandles[groupName].ContainsKey(audioInfo.Key))
|
||||||
|
_clipsHandles[groupName].Add(audioInfo.Key, Addressables.LoadAssetAsync<AudioClip>(audioInfo.Value));
|
||||||
|
else
|
||||||
|
_clipsHandles[groupName][audioInfo.Key] = Addressables.LoadAssetAsync<AudioClip>(audioInfo.Value);
|
||||||
|
|
||||||
|
foreach (var handle in _clipsHandles[groupName])
|
||||||
|
await handle.Value.ToUniTask();
|
||||||
|
|
||||||
|
_eventBus.RaiseEvent<IAudioClipsEventHandle>(ui =>
|
||||||
|
ui.AudioClipsLoaded(groupName, _clipsHandles[groupName].ToDictionary(
|
||||||
|
x => x.Key,
|
||||||
|
x => x.Value.Result)));
|
||||||
|
}
|
||||||
|
|
||||||
|
public void ReleaseAudios(AudioNames groupName)
|
||||||
|
{
|
||||||
|
UnityEngine.Debug.LogWarning($"Audios unloaded {groupName}");
|
||||||
|
_eventBus.RaiseEvent<IAudioClipsEventHandle>(x=> x.AudioClipsUnLoaded(groupName));
|
||||||
|
|
||||||
|
foreach (var handle in _clipsHandles)
|
||||||
|
Addressables.Release(handle.Value);
|
||||||
|
}
|
||||||
|
public void Dispose()
|
||||||
|
{
|
||||||
|
foreach (var handles in _clipsHandles)
|
||||||
|
{
|
||||||
|
foreach (var handle in handles.Value)
|
||||||
|
{
|
||||||
|
handle.Value.Release();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
_configsHandle.Release();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
internal interface IAudioConfigsLoadedHandle : IGlobalSubscriber
|
||||||
|
{
|
||||||
|
void AudioConfigsLoaded();
|
||||||
|
}
|
||||||
|
|
||||||
|
internal interface IAudioClipsEventHandle : IGlobalSubscriber
|
||||||
|
{
|
||||||
|
void AudioClipsLoaded(AudioNames groupName, Dictionary<int, AudioClip> toDictionary);
|
||||||
|
void AudioClipsUnLoaded(AudioNames groupName);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: cc45c23918ed446681564b467668304b
|
||||||
|
timeCreated: 1769344269
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
using Code.Infrastructure.Generators;
|
||||||
|
|
||||||
|
namespace Code.Infrastructure.Audio
|
||||||
|
{
|
||||||
|
[AudioMixerEnum]
|
||||||
|
public enum AudioGroupType
|
||||||
|
{
|
||||||
|
Master,
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
Loaded 100 of 882 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user