Platformer example started

This commit is contained in:
ThomasCharester committed 2026-02-22 13:59:04 +03:00
1 parent efcfaae647
commit 9f026b76d6
325 files changed
+23540 -270

No files matched your search

@@ -0,0 +1,23 @@
// retard-generated
using Code.Infrastructure.StateMachine;
namespace Code.Example.Platformer
{
public partial class PlatformerState : BaseState<Code.Infrastructure.App.AppStates, Code.Infrastructure.App.AppStateMachineContext>
{
protected override void _fireEnterState()
{
EventBus.RaiseEvent<IEnterStateHandle<Code.Example.Platformer.PlatformerState>>(h => h.EnterState());
}
protected override void _fireExitState()
{
EventBus.RaiseEvent<IExitStateHandle<Code.Example.Platformer.PlatformerState>>(h => h.ExitState());
}
}
}
@@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: ed9829b7d38443871a5583caffbfedf7
@@ -7,6 +7,8 @@ using Code.Infrastructure.App.States;
using Code.Infrastructure.App.States;
using Code.Example.Platformer;
using Code.Infrastructure.App.States;
#pragma warning restore CS0105
@@ -19,15 +21,18 @@ public partial class AppStateMachine : AbstractStateMachine<Code.Infrastructure.
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);
var stateGameplayState = new GameplayState(StateMachineContext,eventBus);
States.Add(stateGameplayState.myState, stateGameplayState);
}
protected override bool CheckTransitionAllowed(Code.Infrastructure.App.AppStates nextState) => AllowedStates.HasFlag(nextState);
@@ -17,12 +17,12 @@ public partial class CameraStateMachine : AbstractStateMachine<Code.Infrastructu
public CameraStateMachine(Code.Infrastructure.Camera.CameraStateMachineContext context, EventBus.EventBus eventBus) : base(context)
{
var stateThirdPersonState = new ThirdPersonState(StateMachineContext,eventBus);
States.Add(stateThirdPersonState.myState, stateThirdPersonState);
var stateNoneCameraState = new NoneCameraState(StateMachineContext,eventBus);
States.Add(stateNoneCameraState.myState, stateNoneCameraState);
var stateThirdPersonState = new ThirdPersonState(StateMachineContext,eventBus);
States.Add(stateThirdPersonState.myState, stateThirdPersonState);
}
protected override bool CheckTransitionAllowed(Code.Infrastructure.Camera.CameraMode nextState) => AllowedStates.HasFlag(nextState);
@@ -1,15 +1,17 @@
#pragma warning disable CS0105
using Code.Infrastructure.Camera;
using Code.Example.Race.Racer;
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.Audio;
using Code.Infrastructure.Audio;
using Code.Infrastructure.UI;
using Code.Infrastructure.SceneLoader;
using Code.Infrastructure.Audio;
using Code.Infrastructure.Volume;
using Code.Infrastructure.Camera;
using Code.Example.Platformer.Entity;
using Code.Infrastructure.Audio;
using Code.Infrastructure.Input;
using UnityEngine;
@@ -24,25 +26,29 @@ using Code.Infrastructure.Input;
{
SystemConfigsReferences systemConfigsReferences = Resources.Load<SystemConfigsReferences>("SystemConfigsReferences");
_singleConfigReferences.Add(typeof(Code.Infrastructure.Camera.GameCameraConfig), systemConfigsReferences.GameCamera);
_multipleConfigReferences.Add(typeof(Code.Example.Race.Racer.RacerSettingsConfig), systemConfigsReferences.RacerSettings);
_multipleConfigReferences.Add(typeof(Code.Infrastructure.Audio.AudioSourceSettingsConfig), systemConfigsReferences.AudioSourceSettings);
_multipleConfigReferences.Add(typeof(Code.Infrastructure.Configs.LayerMasksConfigConfig), systemConfigsReferences.LayerMasksConfig);
_singleConfigReferences.Add(typeof(Code.Infrastructure.UI.CanvasSettingsConfig), systemConfigsReferences.CanvasSettings);
_multipleConfigReferences.Add(typeof(Code.Infrastructure.Audio.AudioInfoConfig), systemConfigsReferences.AudioInfo);
_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.Infrastructure.Camera.CameraSettingsConfig), systemConfigsReferences.CameraSettings);
_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);
@@ -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 Code.Example.Platformer.Entity;
using UnityEngine.AddressableAssets;
using UnityEngine;
using UnityEngine.AddressableAssets;
namespace Code.Example.Platformer.Entity{
#pragma warning restore CS0105
[CreateAssetMenu(fileName = "PlatformerEnemySettingsConfig", menuName = "Configs/Gameplay/Platformer/EnemySettings")]
public class PlatformerEnemySettingsConfig : ScriptableObject
{
public Code.Example.Platformer.Entity.PlatformerEnemyData racerData;
public UnityEngine.AddressableAssets.AssetReference prefabReference;
}
}
@@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: c75c4d6c834f6bae6bef22279173f226
@@ -19,6 +19,9 @@ partial void SetupScenesInfo(){
_scenesActions.Add(SceneId.SoundTest,() => _eventBus.RaiseEvent<IOnSoundTestSceneLoadedHandler>(h=> h.OnSoundTestSceneLoaded()));
_scenesActions.Add(SceneId.Platformer,() => _eventBus.RaiseEvent<IOnPlatformerSceneLoadedHandler>(h=> h.OnPlatformerSceneLoaded()));
}
}
@@ -40,4 +43,10 @@ partial void SetupScenesInfo(){
void OnSoundTestSceneInitialized(Reflex.Core.Container container); // Until its fixed
}
public interface IOnPlatformerSceneLoadedHandler : IGlobalSubscriber
{
void OnPlatformerSceneLoaded();
void OnPlatformerSceneInitialized(Reflex.Core.Container container); // Until its fixed
}
}
@@ -1,15 +1,17 @@
#pragma warning disable CS0105
using Code.Infrastructure.Camera;
using Code.Example.Race.Racer;
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.Audio;
using Code.Infrastructure.Audio;
using Code.Infrastructure.UI;
using Code.Infrastructure.SceneLoader;
using Code.Infrastructure.Audio;
using Code.Infrastructure.Volume;
using Code.Infrastructure.Camera;
using Code.Example.Platformer.Entity;
using Code.Infrastructure.Audio;
using Code.Infrastructure.Input;
using UnityEngine.AddressableAssets;
@@ -18,16 +20,18 @@ using Code.Infrastructure.Input;
namespace Code.Infrastructure.Configs{
public partial class SystemConfigsReferences
{
public AssetReference GameCamera;
public string RacerSettings;
public string AudioSourceSettings;
public AssetReference CanvasSettings;
public string AudioInfo;
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 CameraSettings;
public string PlatformerEnemySettings;
public string AudioSourceSettings;
public AssetReference InputService;
}