Фабрика игрока
This commit is contained in:
1 parent
653342d080
commit
a7872a0f8c
45 files changed
+395
-168
No files matched your search
@@ -15,7 +15,7 @@ MonoBehaviour:
|
||||
m_DefaultGroup: d790534e015d692428ac5a9ce7d2ceb6
|
||||
m_currentHash:
|
||||
serializedVersion: 2
|
||||
Hash: ffc22690a01aea70596951aee1f02765
|
||||
Hash: 6ac6f4ebd726e03a1c07efe42bb1b362
|
||||
m_OptimizeCatalogSize: 0
|
||||
m_BuildRemoteCatalog: 0
|
||||
m_CatalogRequestsTimeout: 0
|
||||
|
||||
@@ -73,6 +73,11 @@ MonoBehaviour:
|
||||
m_ReadOnly: 0
|
||||
m_SerializedLabels: []
|
||||
FlaggedDuringContentUpdateRestriction: 0
|
||||
- m_GUID: 234ab51636edcbab88dbadfdb7fbfe65
|
||||
m_Address: Example/Platformer/Characters/Player/Player
|
||||
m_ReadOnly: 0
|
||||
m_SerializedLabels: []
|
||||
FlaggedDuringContentUpdateRestriction: 0
|
||||
- m_GUID: 2471ee3760db4ecfe8c313bb2c00daf0
|
||||
m_Address: Assets/Resources_moved/Configs/Audio/Audio Source.prefab
|
||||
m_ReadOnly: 0
|
||||
@@ -372,6 +377,11 @@ MonoBehaviour:
|
||||
m_SerializedLabels:
|
||||
- PlatformerEntity
|
||||
FlaggedDuringContentUpdateRestriction: 0
|
||||
- m_GUID: f281706c5b7913f43891c237c5210d40
|
||||
m_Address: Assets/Resources_moved/Example/Platformer/Configs/PlayerSettings.asset
|
||||
m_ReadOnly: 0
|
||||
m_SerializedLabels: []
|
||||
FlaggedDuringContentUpdateRestriction: 0
|
||||
- m_GUID: f5d189d2c8569c2489fe942137ea0f24
|
||||
m_Address: Assets/Resources_moved/Camera/CinemachineCamera.prefab
|
||||
m_ReadOnly: 0
|
||||
|
||||
@@ -31,11 +31,7 @@ namespace Code.Example.Platformer.Entity
|
||||
[ToConfig] public AssetReference prefabReference;
|
||||
}
|
||||
|
||||
[Config("Configs/Gameplay/Platformer/PlayerSettings")]
|
||||
[Config("", false, true)]
|
||||
public class PlatformerPlayerSettings
|
||||
{
|
||||
[ToConfig] public PlatformerEntityData EntityData;
|
||||
|
||||
[ToConfig] public AssetReference prefabReference;
|
||||
}
|
||||
{ }
|
||||
}
|
||||
@@ -0,0 +1,106 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Code.Infrastructure.Configs;
|
||||
using Code.Infrastructure.EventBus;
|
||||
using Cysharp.Threading.Tasks;
|
||||
using Reflex.Core;
|
||||
using Reflex.Injectors;
|
||||
using UnityEngine;
|
||||
using UnityEngine.AddressableAssets;
|
||||
using UnityEngine.ResourceManagement.AsyncOperations;
|
||||
using UnityEngine.SceneManagement;
|
||||
|
||||
namespace Code.Example.Platformer.Entity
|
||||
{
|
||||
public interface IPlatformerPlayerFactory
|
||||
{
|
||||
UniTaskVoid LoadPlayer();
|
||||
void ReleasePlayer();
|
||||
|
||||
UniTaskVoid SpawnPlayer(Vector3 position);
|
||||
}
|
||||
|
||||
public class PlatformerPlayerFactory : IPlatformerPlayerFactory, IDisposable
|
||||
{
|
||||
private EventBus _eventBus;
|
||||
|
||||
private AssetReference _playerConfigReference;
|
||||
private AsyncOperationHandle<PlatformerEntitySettingsConfig> _playerConfigHandle;
|
||||
private AsyncOperationHandle<GameObject> _playerPrefabHandle;
|
||||
|
||||
private PlatformerEntitySettingsConfig _playerConfig;
|
||||
|
||||
public PlatformerPlayerFactory(IConfigLocator configLocator, EventBus eventBus)
|
||||
{
|
||||
_eventBus = eventBus;
|
||||
_playerConfigReference = configLocator.TryGetConfigAssetReference<PlatformerPlayerSettingsConfig>();
|
||||
|
||||
LoadConfigs().Forget();
|
||||
}
|
||||
|
||||
private async UniTaskVoid LoadConfigs()
|
||||
{
|
||||
_playerConfigHandle = Addressables.LoadAssetAsync<PlatformerEntitySettingsConfig>(_playerConfigReference);
|
||||
|
||||
await _playerConfigHandle.ToUniTask();
|
||||
|
||||
_playerConfig = _playerConfigHandle.Result;
|
||||
|
||||
_eventBus.RaiseEvent<IPlatformerPlayerFactoryInitializedHandle>(x => x.PlatformerPlayerFactoryInitialized());
|
||||
}
|
||||
|
||||
public async UniTaskVoid LoadPlayer()
|
||||
{
|
||||
if (_playerPrefabHandle.IsValid())
|
||||
{
|
||||
_eventBus.RaiseEvent<IPlatformerPlayerLoadedHandle>(x => x.PlatformerPlayerLoaded());
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
UnityEngine.Debug.LogWarning($"Player loaded");
|
||||
_playerPrefabHandle = Addressables.LoadAssetAsync<GameObject>(_playerConfig.prefabReference);
|
||||
|
||||
await _playerPrefabHandle.ToUniTask();
|
||||
var racer = _playerPrefabHandle.Result.GetComponent<Entity>();
|
||||
racer.SetData(_playerConfig.EntityData);
|
||||
|
||||
_eventBus.RaiseEvent<IPlatformerPlayerLoadedHandle>(x => x.PlatformerPlayerLoaded());
|
||||
}
|
||||
|
||||
public void ReleasePlayer()
|
||||
{
|
||||
_playerPrefabHandle.Release();
|
||||
}
|
||||
|
||||
public async UniTaskVoid SpawnPlayer(Vector3 position)
|
||||
{
|
||||
var player = await Addressables.InstantiateAsync(_playerConfig.prefabReference, position, Quaternion.identity).ToUniTask();
|
||||
GameObjectInjector.InjectObject(player, Container.RootContainer); // TODO САМОЕ НЕСТАБИЛЬНОЕ ДЕРЬМО ВО ВСЕЛЕННОЙ КОНТЕЙНЕР ДОЛЖЕН БЫТЬ КОНТЕКСТНЫМ
|
||||
_eventBus.RaiseEvent<IPlatformerPlayerSpawnedHandle>(x => x.PlatformerPlayerSpawned(player.GetComponent<Entity>()));
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
UnityEngine.Debug.LogWarning($"Enemies released");
|
||||
_playerPrefabHandle.Release();
|
||||
|
||||
_playerConfigHandle.Release();
|
||||
}
|
||||
}
|
||||
|
||||
public interface IPlatformerPlayerFactoryInitializedHandle : IGlobalSubscriber
|
||||
{
|
||||
public void PlatformerPlayerFactoryInitialized();
|
||||
}
|
||||
|
||||
public interface IPlatformerPlayerLoadedHandle : IGlobalSubscriber
|
||||
{
|
||||
public void PlatformerPlayerLoaded();
|
||||
}
|
||||
public interface IPlatformerPlayerSpawnedHandle : IGlobalSubscriber
|
||||
{
|
||||
public void PlatformerPlayerSpawned(Entity entity);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 70a3deb8fbb44749b5aeea7b3997a459
|
||||
timeCreated: 1773136472
|
||||
@@ -62,7 +62,7 @@ namespace Code.Example.Platformer.Entity
|
||||
private void JumpPerformed(InputAction.CallbackContext callbackContext)
|
||||
{
|
||||
if (!onGround) return;
|
||||
rigidbody2D.AddForceY(150f);
|
||||
rigidbody2D.AddForceY(100f);
|
||||
|
||||
_acceleration = 1f;
|
||||
}
|
||||
|
||||
@@ -11,7 +11,12 @@ using Resolution = Reflex.Enums.Resolution;
|
||||
|
||||
namespace Code.Example.Platformer
|
||||
{
|
||||
public class PlatformerEnemySceneInstaller : MonoBehaviour, IInstaller, IPlatformerEnemyFactoryInitializedHandle
|
||||
public class PlatformerEnemySceneInstaller :
|
||||
MonoBehaviour,
|
||||
IInstaller,
|
||||
IPlatformerEnemyFactoryInitializedHandle,
|
||||
IPlatformerPlayerFactoryInitializedHandle,
|
||||
IDisposable
|
||||
{
|
||||
// [SerializeField] private PlatformerCanvas gameplayPlatformerCanvas;
|
||||
[SerializeField] private PlatformerFirstLevelData firstLevelData;
|
||||
@@ -27,14 +32,16 @@ namespace Code.Example.Platformer
|
||||
public void InstallBindings(ContainerBuilder containerBuilder)
|
||||
{
|
||||
// Enemies
|
||||
// Player
|
||||
// Container
|
||||
_sceneInit = new(2, LoadingComplete);
|
||||
_sceneInit = new(3, LoadingComplete);
|
||||
|
||||
// containerBuilder.RegisterValue(gameplayPlatformerCanvas);
|
||||
containerBuilder.Parent.Resolve<EventBus>().Subscribe(this);
|
||||
|
||||
containerBuilder.RegisterValue(firstLevelData);
|
||||
containerBuilder.RegisterType(typeof(PlatformerEnemyFactory), new []{typeof(IPlatformerEnemyFactory)}, Lifetime.Scoped, Resolution.Eager);
|
||||
containerBuilder.RegisterType(typeof(PlatformerPlayerFactory), new []{typeof(IPlatformerPlayerFactory)}, Lifetime.Scoped, Resolution.Eager);
|
||||
containerBuilder.OnContainerBuilt += OnContainerBuild;
|
||||
}
|
||||
private Container _container;
|
||||
@@ -51,5 +58,15 @@ namespace Code.Example.Platformer
|
||||
{
|
||||
_sceneInit.DoProgress();
|
||||
}
|
||||
|
||||
public void PlatformerPlayerFactoryInitialized()
|
||||
{
|
||||
_sceneInit.DoProgress();
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
_container.Resolve<EventBus>().Unsubscribe(this);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -17,7 +17,12 @@ namespace Code.Example.Platformer
|
||||
{
|
||||
[State(typeof(AppStates),typeof(AppStateMachineContext))]
|
||||
[StateRaisingEvent]
|
||||
public partial class PlatformerState : IOnPlatformerSceneLoadedHandler, ICinematicMachineHandle, IPlatformerEnemyLoadedHandle
|
||||
public partial class PlatformerState :
|
||||
IOnPlatformerSceneLoadedHandler,
|
||||
ICinematicMachineHandle,
|
||||
IPlatformerEnemyLoadedHandle,
|
||||
IPlatformerPlayerLoadedHandle,
|
||||
IPlatformerPlayerSpawnedHandle
|
||||
{
|
||||
public PlatformerState(AppStateMachineContext context, EventBus eventBus) : base(context, eventBus)
|
||||
{
|
||||
@@ -33,7 +38,8 @@ namespace Code.Example.Platformer
|
||||
// Enemy snail
|
||||
// Enemy bee
|
||||
// Enemy boar
|
||||
_loading = new(5, LoadingCompleted);
|
||||
// Player
|
||||
_loading = new(6, LoadingCompleted);
|
||||
|
||||
Context.UIService.OpenPanel(UIPanelType.Loading);
|
||||
Context.SceneLoader.LoadSceneAsync(SceneId.Platformer, LoadSceneMode.Single).Forget();
|
||||
@@ -48,6 +54,8 @@ namespace Code.Example.Platformer
|
||||
Context.UIService.ClosePanel(UIPanelType.Loading);
|
||||
|
||||
_enemyFactory.SpawnEnemy(PlatformerEntityType.Snail, _firstLevelData.enemySpawnPoints[0].position);
|
||||
|
||||
_playerFactory.SpawnPlayer(_firstLevelData.playerCheckPoints[0].position);
|
||||
}
|
||||
|
||||
|
||||
@@ -57,6 +65,8 @@ namespace Code.Example.Platformer
|
||||
_enemyFactory.ReleaseEnemy(PlatformerEntityType.Snail);
|
||||
_enemyFactory.ReleaseEnemy(PlatformerEntityType.Boar);
|
||||
|
||||
_playerFactory.ReleasePlayer();
|
||||
|
||||
Context.CameraFactory.ReleaseCinemachineCamera(CameraMode.Platformer);
|
||||
EventBus.Unsubscribe(this);
|
||||
Context.InputService.DisableMap(ActionMappings.Platformer);
|
||||
@@ -68,9 +78,14 @@ namespace Code.Example.Platformer
|
||||
}
|
||||
|
||||
private IPlatformerEnemyFactory _enemyFactory;
|
||||
private IPlatformerPlayerFactory _playerFactory;
|
||||
private PlatformerFirstLevelData _firstLevelData;
|
||||
|
||||
private Container _fixdamncontainer;
|
||||
|
||||
public void OnPlatformerSceneInitialized(Container container)
|
||||
{
|
||||
_fixdamncontainer = container;
|
||||
_firstLevelData = container.Resolve<PlatformerFirstLevelData>();
|
||||
_enemyFactory = container.Resolve<IPlatformerEnemyFactory>();
|
||||
|
||||
@@ -78,6 +93,10 @@ namespace Code.Example.Platformer
|
||||
_enemyFactory.LoadEnemy(PlatformerEntityType.Boar);
|
||||
_enemyFactory.LoadEnemy(PlatformerEntityType.Snail);
|
||||
|
||||
_playerFactory = container.Resolve<IPlatformerPlayerFactory>();
|
||||
|
||||
_playerFactory.LoadPlayer();
|
||||
|
||||
_loading.DoProgress();
|
||||
}
|
||||
|
||||
@@ -92,5 +111,15 @@ namespace Code.Example.Platformer
|
||||
{
|
||||
if(entity) _loading.DoProgress();
|
||||
}
|
||||
|
||||
public void PlatformerPlayerLoaded()
|
||||
{
|
||||
_loading.DoProgress();
|
||||
}
|
||||
|
||||
public void PlatformerPlayerSpawned(Entity.Entity entity)
|
||||
{
|
||||
Context.CameraFactory.GetCinematicCamera(CameraMode.Platformer).Follow = entity.transform;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -33,11 +33,13 @@ namespace Code.Infrastructure.Generators
|
||||
public class Config : Attribute
|
||||
{
|
||||
public bool Multiple;
|
||||
public bool OnlyLocator;
|
||||
public string MenuName;
|
||||
public Config(string menuName, bool multiple = false)
|
||||
public Config(string menuName, bool multiple = false, bool onlyLocator = false)
|
||||
{
|
||||
Multiple = multiple;
|
||||
MenuName = menuName;
|
||||
OnlyLocator = onlyLocator;
|
||||
}
|
||||
}
|
||||
public class ToConfig : Attribute
|
||||
|
||||
@@ -43,7 +43,9 @@ using UnityEngine.AddressableAssets;
|
||||
{configUsings}
|
||||
namespace {cfg.Namespace}{{
|
||||
#pragma warning restore CS0105
|
||||
[CreateAssetMenu(fileName = ""{cfg.Name}Config"", menuName = ""{attribute.MenuName}"")]
|
||||
|
||||
{(!attribute.OnlyLocator ? $@"[CreateAssetMenu(fileName = ""{cfg.Name}Config"", menuName = ""{attribute.MenuName}"")]" : "")}
|
||||
|
||||
public class {cfg.Name}Config : ScriptableObject
|
||||
{{
|
||||
{configFields}
|
||||
@@ -84,7 +86,6 @@ public class {cfg.Name}Config : ScriptableObject
|
||||
{{
|
||||
SystemConfigsReferences systemConfigsReferences = Resources.Load<SystemConfigsReferences>(""SystemConfigsReferences"");
|
||||
{configAddCode}
|
||||
//_singleConfigReferences.Add(typeof(ScenesAssetReferences), systemConfigsReferences.scenesAssetReferences);
|
||||
}}
|
||||
}}
|
||||
}}
|
||||
|
||||
@@ -12,32 +12,25 @@ MonoBehaviour:
|
||||
m_Script: {fileID: 11500000, guid: 728b0ad306a64bd28d47fc4d052c5e81, type: 3}
|
||||
m_Name: SystemConfigsReferences
|
||||
m_EditorClassIdentifier: Assembly-CSharp::Code.Infrastructure.Configs.SystemConfigsReferences
|
||||
scenesAssetReferences:
|
||||
m_AssetGUID: d54fabdcc748a594aa0551dcd235c7c2
|
||||
AudioInfo: AudioInfoConfig
|
||||
PlatformerEntitySettings: PlatformerEntity
|
||||
PlatformerPlayerSettings:
|
||||
m_AssetGUID: f281706c5b7913f43891c237c5210d40
|
||||
m_SubObjectName:
|
||||
m_SubObjectType:
|
||||
m_SubObjectGUID:
|
||||
m_EditorAssetChanged: 0
|
||||
AudioSourceSettings: AudioSettingsConfig
|
||||
SceneInfo: SceneConfig
|
||||
VolumeSettings: PostProccessVolume
|
||||
InputService:
|
||||
m_AssetGUID: eab71c0cf90c4b94294e497d3734cfe1
|
||||
m_SubObjectName:
|
||||
m_SubObjectType:
|
||||
m_SubObjectGUID:
|
||||
m_EditorAssetChanged: 0
|
||||
UIPanelSettings: UIPanelConfig
|
||||
PlatformerEnemySettings: PlatformerEntity
|
||||
LayerMasksConfig: LayerMaskConfig
|
||||
RacerSettings: RacerConfig
|
||||
GameCamera:
|
||||
m_AssetGUID: c42e39e2fb64cdd45b2ebc4b723d9d0c
|
||||
m_SubObjectName:
|
||||
m_SubObjectType:
|
||||
m_SubObjectGUID:
|
||||
m_EditorAssetChanged: 1
|
||||
AudioInfo: AudioInfoConfig
|
||||
UIPanelSettings: UIPanelConfig
|
||||
RacerSettings: RacerConfig
|
||||
LayerMasksConfig: LayerMaskConfig
|
||||
AudioSourceSettings: AudioSettingsConfig
|
||||
AudioSourcePrefab:
|
||||
m_AssetGUID: d7dd69cfadda3d6e18ec390724be0d80
|
||||
m_SubObjectName:
|
||||
@@ -50,4 +43,11 @@ MonoBehaviour:
|
||||
m_SubObjectType:
|
||||
m_SubObjectGUID:
|
||||
m_EditorAssetChanged: 0
|
||||
SceneInfo: SceneConfig
|
||||
CameraSettings: CameraConfig
|
||||
InputService:
|
||||
m_AssetGUID: eab71c0cf90c4b94294e497d3734cfe1
|
||||
m_SubObjectName:
|
||||
m_SubObjectType:
|
||||
m_SubObjectGUID:
|
||||
m_EditorAssetChanged: 0
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: c91e92e9b7b60014794734630320a2d7
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 0e96dfe21eac05f49a28da6c61086a72
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 88cee293d19174242bd915a2be9e1e34
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
File renamed without changes.
File renamed without changes.
@@ -88,7 +88,7 @@ MonoBehaviour:
|
||||
m_Script: {fileID: 11500000, guid: 886251e9a18ece04ea8e61686c173e1b, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier: Unity.Cinemachine::Unity.Cinemachine.CinemachinePositionComposer
|
||||
CameraDistance: 3
|
||||
CameraDistance: 4
|
||||
DeadZoneDepth: 0
|
||||
Composition:
|
||||
ScreenPosition: {x: 0, y: 0}
|
||||
@@ -101,7 +101,7 @@ MonoBehaviour:
|
||||
Offset: {x: 0, y: 0}
|
||||
CenterOnActivate: 1
|
||||
TargetOffset: {x: 0, y: 0, z: 0}
|
||||
Damping: {x: 1, y: 1, z: 1}
|
||||
Damping: {x: 1, y: 0.5, z: 1}
|
||||
Lookahead:
|
||||
Enabled: 0
|
||||
Time: 0
|
||||
|
||||
@@ -9,16 +9,16 @@ MonoBehaviour:
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: c75c4d6c834f6bae6bef22279173f226, type: 3}
|
||||
m_Script: {fileID: 11500000, guid: d9f34335a0d495815967b971fedf1519, type: 3}
|
||||
m_Name: Bee
|
||||
m_EditorClassIdentifier: Assembly-CSharp::Code.Example.Platformer.Entity.PlatformerEntitySettingsConfig
|
||||
racerData:
|
||||
name: Bee
|
||||
speed: 1
|
||||
acceleration: 2
|
||||
damage: 1
|
||||
EntityData:
|
||||
name:
|
||||
speed: 0
|
||||
acceleration: 0
|
||||
damage: 0
|
||||
type: 2
|
||||
maxHealth: 1
|
||||
maxHealth: 0
|
||||
prefabReference:
|
||||
m_AssetGUID: 0eb645a0c96b1c437bf0712d6b856b7c
|
||||
m_SubObjectName:
|
||||
|
||||
@@ -9,16 +9,16 @@ MonoBehaviour:
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: c75c4d6c834f6bae6bef22279173f226, type: 3}
|
||||
m_Script: {fileID: 11500000, guid: d9f34335a0d495815967b971fedf1519, type: 3}
|
||||
m_Name: Boar
|
||||
m_EditorClassIdentifier: Assembly-CSharp::Code.Example.Platformer.Entity.PlatformerEntitySettingsConfig
|
||||
racerData:
|
||||
name: Boar
|
||||
speed: 0.5
|
||||
acceleration: 2
|
||||
damage: 1
|
||||
EntityData:
|
||||
name:
|
||||
speed: 0
|
||||
acceleration: 0
|
||||
damage: 0
|
||||
type: 1
|
||||
maxHealth: 2
|
||||
maxHealth: 0
|
||||
prefabReference:
|
||||
m_AssetGUID: d0a994964f42e0c0dad3da32f7b52c90
|
||||
m_SubObjectName:
|
||||
|
||||
@@ -9,16 +9,16 @@ MonoBehaviour:
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: c75c4d6c834f6bae6bef22279173f226, type: 3}
|
||||
m_Script: {fileID: 11500000, guid: d9f34335a0d495815967b971fedf1519, type: 3}
|
||||
m_Name: Snail
|
||||
m_EditorClassIdentifier: Assembly-CSharp::Code.Example.Platformer.Entity.PlatformerEntitySettingsConfig
|
||||
racerData:
|
||||
name: Snaily
|
||||
speed: 1
|
||||
acceleration: 2
|
||||
damage: 1
|
||||
EntityData:
|
||||
name:
|
||||
speed: 0
|
||||
acceleration: 0
|
||||
damage: 0
|
||||
type: 3
|
||||
maxHealth: 1
|
||||
maxHealth: 0
|
||||
prefabReference:
|
||||
m_AssetGUID: 77a268730c52ad461920f3459fdda1a0
|
||||
m_SubObjectName:
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
%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: d9f34335a0d495815967b971fedf1519, type: 3}
|
||||
m_Name: PlayerSettings
|
||||
m_EditorClassIdentifier: Assembly-CSharp::Code.Example.Platformer.Entity.PlatformerEntitySettingsConfig
|
||||
EntityData:
|
||||
name:
|
||||
speed: 1
|
||||
acceleration: 2
|
||||
damage: 1
|
||||
type: 0
|
||||
maxHealth: 3
|
||||
prefabReference:
|
||||
m_AssetGUID: 234ab51636edcbab88dbadfdb7fbfe65
|
||||
m_SubObjectName:
|
||||
m_SubObjectType:
|
||||
m_SubObjectGUID:
|
||||
m_EditorAssetChanged: 0
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f281706c5b7913f43891c237c5210d40
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 11400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -180,7 +180,7 @@ MonoBehaviour:
|
||||
enemySpawnPoints:
|
||||
- {fileID: 591811690}
|
||||
playerCheckPoints:
|
||||
- {fileID: 0}
|
||||
- {fileID: 1862008542}
|
||||
--- !u!1 &97537770
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -954,6 +954,37 @@ Transform:
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!1 &1862008541
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 1862008542}
|
||||
m_Layer: 0
|
||||
m_Name: SpawnPoint (2)
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &1862008542
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1862008541}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: -0.413, y: -0.05, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!1 &1947090009
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -1368,63 +1399,6 @@ Transform:
|
||||
m_Children: []
|
||||
m_Father: {fileID: 595108274}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!1001 &3315900791696923540
|
||||
PrefabInstance:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 2
|
||||
m_Modification:
|
||||
serializedVersion: 3
|
||||
m_TransformParent: {fileID: 0}
|
||||
m_Modifications:
|
||||
- target: {fileID: 454703662689100337, guid: 234ab51636edcbab88dbadfdb7fbfe65, type: 3}
|
||||
propertyPath: m_Name
|
||||
value: Player
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8736793596959961972, guid: 234ab51636edcbab88dbadfdb7fbfe65, type: 3}
|
||||
propertyPath: m_LocalPosition.x
|
||||
value: 0.07
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8736793596959961972, guid: 234ab51636edcbab88dbadfdb7fbfe65, type: 3}
|
||||
propertyPath: m_LocalPosition.y
|
||||
value: 0.03
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8736793596959961972, guid: 234ab51636edcbab88dbadfdb7fbfe65, type: 3}
|
||||
propertyPath: m_LocalPosition.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8736793596959961972, guid: 234ab51636edcbab88dbadfdb7fbfe65, type: 3}
|
||||
propertyPath: m_LocalRotation.w
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8736793596959961972, guid: 234ab51636edcbab88dbadfdb7fbfe65, type: 3}
|
||||
propertyPath: m_LocalRotation.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8736793596959961972, guid: 234ab51636edcbab88dbadfdb7fbfe65, type: 3}
|
||||
propertyPath: m_LocalRotation.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8736793596959961972, guid: 234ab51636edcbab88dbadfdb7fbfe65, type: 3}
|
||||
propertyPath: m_LocalRotation.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8736793596959961972, guid: 234ab51636edcbab88dbadfdb7fbfe65, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8736793596959961972, guid: 234ab51636edcbab88dbadfdb7fbfe65, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8736793596959961972, guid: 234ab51636edcbab88dbadfdb7fbfe65, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
m_RemovedComponents: []
|
||||
m_RemovedGameObjects: []
|
||||
m_AddedGameObjects: []
|
||||
m_AddedComponents: []
|
||||
m_SourcePrefab: {fileID: 100100000, guid: 234ab51636edcbab88dbadfdb7fbfe65, type: 3}
|
||||
--- !u!1660057539 &9223372036854775807
|
||||
SceneRoots:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -1432,7 +1406,7 @@ SceneRoots:
|
||||
- {fileID: 60958143}
|
||||
- {fileID: 1464509737}
|
||||
- {fileID: 595108274}
|
||||
- {fileID: 3315900791696923540}
|
||||
- {fileID: 97537771}
|
||||
- {fileID: 1369074043}
|
||||
- {fileID: 591811690}
|
||||
- {fileID: 1862008542}
|
||||
@@ -9,7 +9,9 @@ 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;
|
||||
|
||||
@@ -7,7 +7,9 @@ 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;
|
||||
|
||||
@@ -8,7 +8,9 @@ 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;
|
||||
|
||||
@@ -10,7 +10,9 @@ using UnityEngine.AddressableAssets;
|
||||
|
||||
namespace Code.Infrastructure.Camera{
|
||||
#pragma warning restore CS0105
|
||||
|
||||
[CreateAssetMenu(fileName = "CameraSettingsConfig", menuName = "Configs/Camera/CameraSettings")]
|
||||
|
||||
public class CameraSettingsConfig : ScriptableObject
|
||||
{
|
||||
public System.Single fov;
|
||||
|
||||
@@ -7,7 +7,9 @@ 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;
|
||||
|
||||
@@ -55,7 +55,6 @@ using Code.Infrastructure.Input;
|
||||
|
||||
_singleConfigReferences.Add(typeof(Code.Infrastructure.Input.InputServiceConfig), systemConfigsReferences.InputService);
|
||||
|
||||
//_singleConfigReferences.Add(typeof(ScenesAssetReferences), systemConfigsReferences.scenesAssetReferences);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,7 +7,9 @@ using UnityEngine.AddressableAssets;
|
||||
|
||||
namespace Code.Infrastructure.Camera{
|
||||
#pragma warning restore CS0105
|
||||
|
||||
[CreateAssetMenu(fileName = "GameCameraConfig", menuName = "Configs/Camera/CameraConfig")]
|
||||
|
||||
public class GameCameraConfig : ScriptableObject
|
||||
{
|
||||
public UnityEngine.AddressableAssets.AssetReference Camera;
|
||||
|
||||
@@ -7,7 +7,9 @@ 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;
|
||||
|
||||
@@ -8,7 +8,9 @@ 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;
|
||||
|
||||
@@ -8,7 +8,9 @@ using UnityEngine.AddressableAssets;
|
||||
|
||||
namespace Code.Example.Platformer.Entity{
|
||||
#pragma warning restore CS0105
|
||||
|
||||
[CreateAssetMenu(fileName = "PlatformerEntitySettingsConfig", menuName = "Configs/Gameplay/Platformer/EntitySettings")]
|
||||
|
||||
public class PlatformerEntitySettingsConfig : ScriptableObject
|
||||
{
|
||||
public Code.Example.Platformer.Entity.PlatformerEntityData EntityData;
|
||||
|
||||
@@ -1,18 +1,16 @@
|
||||
|
||||
#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 = "PlatformerPlayerSettingsConfig", menuName = "Configs/Gameplay/Platformer/PlayerSettings")]
|
||||
|
||||
|
||||
|
||||
public class PlatformerPlayerSettingsConfig : ScriptableObject
|
||||
{
|
||||
public Code.Example.Platformer.Entity.PlatformerEntityData EntityData;
|
||||
public UnityEngine.AddressableAssets.AssetReference prefabReference;
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
@@ -8,7 +8,9 @@ using UnityEngine.AddressableAssets;
|
||||
|
||||
namespace Code.Example.Race.Racer{
|
||||
#pragma warning restore CS0105
|
||||
|
||||
[CreateAssetMenu(fileName = "RacerSettingsConfig", menuName = "Configs/Gameplay/RacerSettings")]
|
||||
|
||||
public class RacerSettingsConfig : ScriptableObject
|
||||
{
|
||||
public Code.Example.Race.Racer.RacerData racerData;
|
||||
|
||||
@@ -8,7 +8,9 @@ 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;
|
||||
|
||||
@@ -9,7 +9,9 @@ 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;
|
||||
|
||||
@@ -9,7 +9,9 @@ using UnityEngine.AddressableAssets;
|
||||
|
||||
namespace Code.Infrastructure.Volume{
|
||||
#pragma warning restore CS0105
|
||||
|
||||
[CreateAssetMenu(fileName = "VolumeSettingsConfig", menuName = "Configs/PostProcessing/VolumeSetting")]
|
||||
|
||||
public class VolumeSettingsConfig : ScriptableObject
|
||||
{
|
||||
public UnityEngine.AddressableAssets.AssetReference prefab;
|
||||
|
||||
Reference in new issue
Block a user