Init
This commit is contained in:
1 parent
a73338916a
commit
fbc1cc8d3e
207 files changed
+10327
-2
No files matched your search
@@ -0,0 +1,20 @@
|
||||
|
||||
#pragma warning disable CS0105
|
||||
using Code.Infrastructure.Audio;
|
||||
using System;
|
||||
using UnityEngine.AddressableAssets;
|
||||
|
||||
using UnityEngine;
|
||||
using UnityEngine.AddressableAssets;
|
||||
|
||||
namespace Code.Infrastructure.Audio{
|
||||
#pragma warning restore CS0105
|
||||
[CreateAssetMenu(fileName = "AudioInfoConfig", menuName = "Configs/Audio/AudioInfo")]
|
||||
public class AudioInfoConfig : ScriptableObject
|
||||
{
|
||||
public Code.Infrastructure.Audio.AudioNames GroupName;
|
||||
public System.Int32 id;
|
||||
public UnityEngine.AddressableAssets.AssetReference fileReference;
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: a8b089dd854c0a084ba749d31f8b399f
|
||||
@@ -0,0 +1,17 @@
|
||||
|
||||
#pragma warning disable CS0105
|
||||
|
||||
// using Code.Infrastructure.Audio;
|
||||
|
||||
#pragma warning restore CS0105
|
||||
namespace Code.Infrastructure.Audio{
|
||||
public partial class AudioService
|
||||
{
|
||||
private partial void InitializeMixer(){
|
||||
|
||||
_audioMixerGroups.Add(Code.Infrastructure.Audio.AudioGroupType.Master, _mixer.FindMatchingGroups("Master")[0]);
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: a277529887b1e2e4688f63c5c886c6fe
|
||||
@@ -0,0 +1,16 @@
|
||||
|
||||
#pragma warning disable CS0105
|
||||
using UnityEngine.AddressableAssets;
|
||||
|
||||
using UnityEngine;
|
||||
using UnityEngine.AddressableAssets;
|
||||
|
||||
namespace Code.Infrastructure.Audio{
|
||||
#pragma warning restore CS0105
|
||||
[CreateAssetMenu(fileName = "AudioSourcePrefabConfig", menuName = "Configs/Audio/AudioSourceSettings")]
|
||||
public class AudioSourcePrefabConfig : ScriptableObject
|
||||
{
|
||||
public UnityEngine.AddressableAssets.AssetReference sourcePrefab;
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: ba4d0c0f70786a459b739ae33e66122a
|
||||
@@ -0,0 +1,18 @@
|
||||
|
||||
#pragma warning disable CS0105
|
||||
using System;
|
||||
using Code.Infrastructure.Audio;
|
||||
|
||||
using UnityEngine;
|
||||
using UnityEngine.AddressableAssets;
|
||||
|
||||
namespace Code.Infrastructure.Audio{
|
||||
#pragma warning restore CS0105
|
||||
[CreateAssetMenu(fileName = "AudioSourceSettingsConfig", menuName = "Configs/Audio/AudioSourceSettings")]
|
||||
public class AudioSourceSettingsConfig : ScriptableObject
|
||||
{
|
||||
public System.Single spatialBlend;
|
||||
public Code.Infrastructure.Audio.AudioSourceType sourceType;
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 85a3854301201dc0d93ecb89c2f30e92
|
||||
@@ -0,0 +1,16 @@
|
||||
|
||||
#pragma warning disable CS0105
|
||||
using UnityEngine.AddressableAssets;
|
||||
|
||||
using UnityEngine;
|
||||
using UnityEngine.AddressableAssets;
|
||||
|
||||
namespace Code.Infrastructure.UI{
|
||||
#pragma warning restore CS0105
|
||||
[CreateAssetMenu(fileName = "CanvasSettingsConfig", menuName = "Configs/UI/CanvasSettings")]
|
||||
public class CanvasSettingsConfig : ScriptableObject
|
||||
{
|
||||
public UnityEngine.AddressableAssets.AssetReference Prefab;
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 865301742f93c7b4688d84f5bec5c27e
|
||||
@@ -0,0 +1,54 @@
|
||||
|
||||
// <auto-generated/>
|
||||
#pragma warning disable CS0105
|
||||
using Code.Infrastructure.StateMachine;
|
||||
|
||||
using Code.Infrastructure.App.States;
|
||||
|
||||
using Code.Infrastructure.App.States;
|
||||
|
||||
using Code.Example.Platformer;
|
||||
|
||||
using Code.Infrastructure.App.States;
|
||||
|
||||
#pragma warning restore CS0105
|
||||
namespace Code.Infrastructure.App
|
||||
{
|
||||
|
||||
public partial class AppStateMachine : AbstractStateMachine<Code.Infrastructure.App.AppStates,Code.Infrastructure.App.AppStateMachineContext>
|
||||
{
|
||||
|
||||
public AppStateMachine(Code.Infrastructure.App.AppStateMachineContext context, EventBus.EventBus eventBus) : base(context)
|
||||
{
|
||||
|
||||
var stateGameplayState = new GameplayState(StateMachineContext,eventBus);
|
||||
States.Add(stateGameplayState.myState, stateGameplayState);
|
||||
|
||||
var stateBootstrapState = new BootstrapState(StateMachineContext,eventBus);
|
||||
States.Add(stateBootstrapState.myState, stateBootstrapState);
|
||||
|
||||
var statePlatformerState = new PlatformerState(StateMachineContext,eventBus);
|
||||
States.Add(statePlatformerState.myState, statePlatformerState);
|
||||
|
||||
var stateMainMenuState = new MainMenuState(StateMachineContext,eventBus);
|
||||
States.Add(stateMainMenuState.myState, stateMainMenuState);
|
||||
|
||||
}
|
||||
|
||||
protected override bool CheckTransitionAllowed(Code.Infrastructure.App.AppStates nextState) => AllowedStates.HasFlag(nextState);
|
||||
protected override void ResetAllowedTransitions() => AllowedStates = 0;
|
||||
}
|
||||
|
||||
public static class AppStateMachineExtensions
|
||||
{
|
||||
public static AbstractStateMachine<Code.Infrastructure.App.AppStates, Code.Infrastructure.App.AppStateMachineContext> AllowStateTransition(
|
||||
this AbstractStateMachine<Code.Infrastructure.App.AppStates, Code.Infrastructure.App.AppStateMachineContext> stateMachine, Code.Infrastructure.App.AppStates state)
|
||||
{
|
||||
if (stateMachine == null) return null;
|
||||
|
||||
stateMachine.AllowedStates |= state;
|
||||
return stateMachine;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 5a6c59a69440bf440a166390c52d5c65
|
||||
+23
@@ -0,0 +1,23 @@
|
||||
|
||||
|
||||
// retard-generated
|
||||
|
||||
using Code.Infrastructure.StateMachine;
|
||||
|
||||
namespace Code.Infrastructure.App.States
|
||||
{
|
||||
public partial class BootstrapState : BaseState<Code.Infrastructure.App.AppStates, Code.Infrastructure.App.AppStateMachineContext>
|
||||
{
|
||||
|
||||
protected override void _fireEnterState()
|
||||
{
|
||||
EventBus.RaiseEvent<IEnterStateHandle<Code.Infrastructure.App.States.BootstrapState>>(h => h.EnterState());
|
||||
}
|
||||
|
||||
protected override void _fireExitState()
|
||||
{
|
||||
EventBus.RaiseEvent<IExitStateHandle<Code.Infrastructure.App.States.BootstrapState>>(h => h.ExitState());
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: a7addc3cce102d548b48a5714208d030
|
||||
@@ -0,0 +1,59 @@
|
||||
|
||||
#pragma warning disable CS0105
|
||||
using Code.Example.Race.Racer;
|
||||
using Code.Infrastructure.Configs;
|
||||
using Code.Infrastructure.Camera;
|
||||
using Code.Infrastructure.Audio;
|
||||
using Code.Infrastructure.Camera;
|
||||
using Code.Infrastructure.UI;
|
||||
using Code.Infrastructure.UI;
|
||||
using Code.Infrastructure.SceneLoader;
|
||||
using Code.Infrastructure.Audio;
|
||||
using Code.Infrastructure.Volume;
|
||||
using Code.Example.Platformer.Entity;
|
||||
using Code.Infrastructure.Audio;
|
||||
using Code.Infrastructure.Input;
|
||||
|
||||
using UnityEngine;
|
||||
#pragma warning restore CS0105
|
||||
|
||||
namespace Code.Infrastructure.Configs
|
||||
{
|
||||
|
||||
public partial class ConfigLocator
|
||||
{
|
||||
partial void LoadConfigs()
|
||||
{
|
||||
SystemConfigsReferences systemConfigsReferences = Resources.Load<SystemConfigsReferences>("SystemConfigsReferences");
|
||||
|
||||
_multipleConfigReferences.Add(typeof(Code.Example.Race.Racer.RacerSettingsConfig), systemConfigsReferences.RacerSettings);
|
||||
|
||||
_multipleConfigReferences.Add(typeof(Code.Infrastructure.Configs.LayerMasksConfigConfig), systemConfigsReferences.LayerMasksConfig);
|
||||
|
||||
_multipleConfigReferences.Add(typeof(Code.Infrastructure.Camera.CameraSettingsConfig), systemConfigsReferences.CameraSettings);
|
||||
|
||||
_singleConfigReferences.Add(typeof(Code.Infrastructure.Audio.AudioSourcePrefabConfig), systemConfigsReferences.AudioSourcePrefab);
|
||||
|
||||
_singleConfigReferences.Add(typeof(Code.Infrastructure.Camera.GameCameraConfig), systemConfigsReferences.GameCamera);
|
||||
|
||||
_singleConfigReferences.Add(typeof(Code.Infrastructure.UI.CanvasSettingsConfig), systemConfigsReferences.CanvasSettings);
|
||||
|
||||
_multipleConfigReferences.Add(typeof(Code.Infrastructure.UI.UIPanelSettingsConfig), systemConfigsReferences.UIPanelSettings);
|
||||
|
||||
_multipleConfigReferences.Add(typeof(Code.Infrastructure.SceneLoader.SceneInfoConfig), systemConfigsReferences.SceneInfo);
|
||||
|
||||
_multipleConfigReferences.Add(typeof(Code.Infrastructure.Audio.AudioInfoConfig), systemConfigsReferences.AudioInfo);
|
||||
|
||||
_multipleConfigReferences.Add(typeof(Code.Infrastructure.Volume.VolumeSettingsConfig), systemConfigsReferences.VolumeSettings);
|
||||
|
||||
_multipleConfigReferences.Add(typeof(Code.Example.Platformer.Entity.PlatformerEnemySettingsConfig), systemConfigsReferences.PlatformerEnemySettings);
|
||||
|
||||
_multipleConfigReferences.Add(typeof(Code.Infrastructure.Audio.AudioSourceSettingsConfig), systemConfigsReferences.AudioSourceSettings);
|
||||
|
||||
_singleConfigReferences.Add(typeof(Code.Infrastructure.Input.InputServiceConfig), systemConfigsReferences.InputService);
|
||||
|
||||
//_singleConfigReferences.Add(typeof(ScenesAssetReferences), systemConfigsReferences.scenesAssetReferences);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: b516a9c04f1000e43936564c38e25cfb
|
||||
@@ -0,0 +1,10 @@
|
||||
using UnityEngine.AddressableAssets;
|
||||
|
||||
namespace Code.Infrastructure.Configs
|
||||
{
|
||||
public interface IConfigLocator
|
||||
{
|
||||
AssetReference TryGetConfigAssetReference<T>();
|
||||
string TryGetManyConfigAssetReferences<T>();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 251b70a9c67d4c108c8a512ed10a3c09
|
||||
timeCreated: 1767125435
|
||||
@@ -0,0 +1,16 @@
|
||||
|
||||
#pragma warning disable CS0105
|
||||
using UnityEngine.InputSystem;
|
||||
|
||||
using UnityEngine;
|
||||
using UnityEngine.AddressableAssets;
|
||||
|
||||
namespace Code.Infrastructure.Input{
|
||||
#pragma warning restore CS0105
|
||||
[CreateAssetMenu(fileName = "InputServiceConfig", menuName = "Configs/InputService")]
|
||||
public class InputServiceConfig : ScriptableObject
|
||||
{
|
||||
public UnityEngine.InputSystem.InputActionAsset inputActionAsset;
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: ab6d921463750b04aaccb1bf3b2d9608
|
||||
@@ -0,0 +1,18 @@
|
||||
|
||||
#pragma warning disable CS0105
|
||||
using UnityEngine;
|
||||
using Code.Infrastructure.Configs;
|
||||
|
||||
using UnityEngine;
|
||||
using UnityEngine.AddressableAssets;
|
||||
|
||||
namespace Code.Infrastructure.Configs{
|
||||
#pragma warning restore CS0105
|
||||
[CreateAssetMenu(fileName = "LayerMasksConfigConfig", menuName = "Configs/LayerMasksConfig")]
|
||||
public class LayerMasksConfigConfig : ScriptableObject
|
||||
{
|
||||
public UnityEngine.LayerMask mask;
|
||||
public Code.Infrastructure.Configs.LayerMaskType type;
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 614273355800ddbe584d9d7404b5a234
|
||||
@@ -0,0 +1,18 @@
|
||||
|
||||
#pragma warning disable CS0105
|
||||
using UnityEngine.AddressableAssets;
|
||||
using Code.Infrastructure.SceneLoader;
|
||||
|
||||
using UnityEngine;
|
||||
using UnityEngine.AddressableAssets;
|
||||
|
||||
namespace Code.Infrastructure.SceneLoader{
|
||||
#pragma warning restore CS0105
|
||||
[CreateAssetMenu(fileName = "SceneInfoConfig", menuName = "Configs/SceneConfig")]
|
||||
public class SceneInfoConfig : ScriptableObject
|
||||
{
|
||||
public UnityEngine.AddressableAssets.AssetReference SceneAsset;
|
||||
public Code.Infrastructure.SceneLoader.SceneId SceneId;
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e2d19619e7539f14ea973463204f542c
|
||||
@@ -0,0 +1,52 @@
|
||||
|
||||
#pragma warning disable CS0105
|
||||
|
||||
using Code.Infrastructure.EventBus;
|
||||
|
||||
#pragma warning restore CS0105
|
||||
|
||||
namespace Code.Infrastructure.SceneLoader
|
||||
{
|
||||
public partial class SceneLoader{
|
||||
partial void SetupScenesInfo(){
|
||||
|
||||
|
||||
_scenesActions.Add(SceneId.MainMenu,() => _eventBus.RaiseEvent<IOnMainMenuSceneLoadedHandler>(h=> h.OnMainMenuSceneLoaded()));
|
||||
|
||||
|
||||
_scenesActions.Add(SceneId.Gameplay,() => _eventBus.RaiseEvent<IOnGameplaySceneLoadedHandler>(h=> h.OnGameplaySceneLoaded()));
|
||||
|
||||
|
||||
_scenesActions.Add(SceneId.SoundTest,() => _eventBus.RaiseEvent<IOnSoundTestSceneLoadedHandler>(h=> h.OnSoundTestSceneLoaded()));
|
||||
|
||||
|
||||
_scenesActions.Add(SceneId.Platformer,() => _eventBus.RaiseEvent<IOnPlatformerSceneLoadedHandler>(h=> h.OnPlatformerSceneLoaded()));
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public interface IOnMainMenuSceneLoadedHandler : IGlobalSubscriber
|
||||
{
|
||||
void OnMainMenuSceneLoaded();
|
||||
void OnMainMenuSceneInitialized(Reflex.Core.Container container); // Until its fixed
|
||||
}
|
||||
|
||||
public interface IOnGameplaySceneLoadedHandler : IGlobalSubscriber
|
||||
{
|
||||
void OnGameplaySceneLoaded();
|
||||
void OnGameplaySceneInitialized(Reflex.Core.Container container); // Until its fixed
|
||||
}
|
||||
|
||||
public interface IOnSoundTestSceneLoadedHandler : IGlobalSubscriber
|
||||
{
|
||||
void OnSoundTestSceneLoaded();
|
||||
void OnSoundTestSceneInitialized(Reflex.Core.Container container); // Until its fixed
|
||||
}
|
||||
|
||||
public interface IOnPlatformerSceneLoadedHandler : IGlobalSubscriber
|
||||
{
|
||||
void OnPlatformerSceneLoaded();
|
||||
void OnPlatformerSceneInitialized(Reflex.Core.Container container); // Until its fixed
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 5687485408450064f98da1725a20926b
|
||||
@@ -0,0 +1,38 @@
|
||||
|
||||
#pragma warning disable CS0105
|
||||
using Code.Example.Race.Racer;
|
||||
using Code.Infrastructure.Configs;
|
||||
using Code.Infrastructure.Camera;
|
||||
using Code.Infrastructure.Audio;
|
||||
using Code.Infrastructure.Camera;
|
||||
using Code.Infrastructure.UI;
|
||||
using Code.Infrastructure.UI;
|
||||
using Code.Infrastructure.SceneLoader;
|
||||
using Code.Infrastructure.Audio;
|
||||
using Code.Infrastructure.Volume;
|
||||
using Code.Example.Platformer.Entity;
|
||||
using Code.Infrastructure.Audio;
|
||||
using Code.Infrastructure.Input;
|
||||
|
||||
using UnityEngine.AddressableAssets;
|
||||
#pragma warning restore CS0105
|
||||
|
||||
namespace Code.Infrastructure.Configs{
|
||||
public partial class SystemConfigsReferences
|
||||
{
|
||||
public string RacerSettings;
|
||||
public string LayerMasksConfig;
|
||||
public string CameraSettings;
|
||||
public AssetReference AudioSourcePrefab;
|
||||
public AssetReference GameCamera;
|
||||
public AssetReference CanvasSettings;
|
||||
public string UIPanelSettings;
|
||||
public string SceneInfo;
|
||||
public string AudioInfo;
|
||||
public string VolumeSettings;
|
||||
public string PlatformerEnemySettings;
|
||||
public string AudioSourceSettings;
|
||||
public AssetReference InputService;
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 4e3bd6b172c28ca48b40dd639ef19caf
|
||||
@@ -0,0 +1,18 @@
|
||||
|
||||
#pragma warning disable CS0105
|
||||
using UnityEngine.AddressableAssets;
|
||||
using Code.Infrastructure.UI;
|
||||
|
||||
using UnityEngine;
|
||||
using UnityEngine.AddressableAssets;
|
||||
|
||||
namespace Code.Infrastructure.UI{
|
||||
#pragma warning restore CS0105
|
||||
[CreateAssetMenu(fileName = "UIPanelSettingsConfig", menuName = "Configs/UI/UIPanelSettings")]
|
||||
public class UIPanelSettingsConfig : ScriptableObject
|
||||
{
|
||||
public UnityEngine.AddressableAssets.AssetReference Prefab;
|
||||
public Code.Infrastructure.UI.UIPanelType UIPanelType;
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 17bdede85b436f44e992b27d170ccbc2
|
||||
Reference in new issue
Block a user