From 93819c1dd3db3173ccba192e44b0dcdea09d01f0 Mon Sep 17 00:00:00 2001 From: ThomasCharester Date: Mon, 9 Mar 2026 16:28:40 +0300 Subject: [PATCH] =?UTF-8?q?=D0=9F=D0=BB=D0=B0=D1=82=D1=84=D0=BE=D1=80?= =?UTF-8?q?=D0=BC=D0=B5=D1=80=20=D0=B2=D1=80=D0=B0=D0=B3=D0=B8,=20=D0=B8?= =?UTF-8?q?=D0=BD=D1=84=D1=80=D0=B0=D1=81=D1=82=D1=80=D1=83=D0=BA=D1=82?= =?UTF-8?q?=D1=83=D1=80=D0=B0,=20=D0=B3=D0=B5=D1=80=D0=BE=D0=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .idea/.idea.Infra/.idea/workspace.xml | 79 ++- .../AssetGroups/Default Local Group.asset | 22 +- .../Example/Platformer/Entity/Enemies/Boar.cs | 7 +- .../Code/Example/Platformer/Entity/Entity.cs | 13 + .../Example/Platformer/Entity/EntityHealth.cs | 27 + .../Platformer/Entity/EntityHealth.cs.meta | 3 + .../Entity/PlatformerEnemyFactory.cs | 97 +++- .../Example/Platformer/Entity/PlayerEntity.cs | 77 ++- .../Example/Platformer/PlatformerState.cs | 4 +- .../Race/Racer/Player/PlayerCarInput.cs | 16 +- .../Example/Race/UI/PlayerScoreCounter.cs | 2 +- Assets/Code/Example/Race/UI/PlayerScores.cs | 2 +- Assets/Code/Example/Race/UI/WinScreen.cs | 2 +- .../Code/Infrastructure/App/PapaInstaller.cs | 38 +- .../App/States/BootstrapState.cs | 23 +- .../App/States/GameplayState.cs | 26 +- .../App/States/MainMenuState.cs | 20 +- .../Infrastructure/Configs/LayerMaskType.cs | 4 +- .../Generators/UIPanelEventsGenerator.cs | 71 +++ .../Generators/UIPanelEventsGenerator.cs.meta | 3 + .../Infrastructure/Input/ActionMappings.cs | 14 +- .../SceneLoader/ScenesAssetReferences.cs | 2 - .../UI/Panels/DamnEmptyPanel.cs | 17 - .../UI/Panels/DamnEmptyPanel.cs.meta | 3 - .../Infrastructure/UI/Panels/LoadingPanel.cs | 2 +- .../Infrastructure/UI/Panels/LogoPanel.cs | 2 +- .../UI/Panels/MenuChoosePanel.cs | 2 +- Assets/Code/Infrastructure/UI/UIFactory.cs | 9 +- .../Code/Infrastructure/UI/UIFactory.cs.meta | 3 +- Assets/Code/Infrastructure/UI/UIPanel.cs | 8 + .../Code/Infrastructure/UI/UIPanelSettings.cs | 1 + Assets/Code/Infrastructure/UI/UIService.cs | 95 +++- Assets/InputSystem_Actions.inputactions | 180 +++++- .../Platformer/Characters/Player/Attack.anim | 41 +- .../Characters/Player/Player.prefab | 6 +- .../Player/PlayerPlatformer.controller | 4 +- .../Example/Platformer/Boar.prefab | 11 +- .../Configs/LayerMasks/Enemies.asset} | 16 +- .../Configs/LayerMasks/Enemies.asset.meta} | 2 +- .../Configs/LayerMasks/Player.asset} | 11 +- .../Configs/LayerMasks/Player.asset.meta} | 2 +- .../Example/Platformer/Platformer.unity | 532 +++++++++++++----- .../Example/Platformer/Snail.prefab | 24 +- ...e.UI.PlayerScoreCounterEvents.Generated.cs | 38 ++ ...PlayerScoreCounterEvents.Generated.cs.meta | 2 + ...le.Race.UI.PlayerScoresEvents.Generated.cs | 38 ++ ...ce.UI.PlayerScoresEvents.Generated.cs.meta | 2 + ...ample.Race.UI.WinScreenEvents.Generated.cs | 38 ++ ....Race.UI.WinScreenEvents.Generated.cs.meta | 2 + ...structure.App.AppStateMachine.Generated.cs | 16 +- ...ure.Camera.CameraStateMachine.Generated.cs | 6 +- ....UI.Panels.LoadingPanelEvents.Generated.cs | 37 ++ ...anels.LoadingPanelEvents.Generated.cs.meta | 2 + ...ure.UI.Panels.LogoPanelEvents.Generated.cs | 37 ++ ...I.Panels.LogoPanelEvents.Generated.cs.meta | 2 + ....Panels.MenuChoosePanelEvents.Generated.cs | 37 ++ ...ls.MenuChoosePanelEvents.Generated.cs.meta | 2 + .../ConfigLocator.Generated.cs | 58 +- ...PlatformerEnemySettingsConfig.Generated.cs | 4 +- .../SystemConfigsReferences.Generated.cs | 40 +- .../UIPanelSettingsConfig.Generated.cs | 2 + 61 files changed, 1463 insertions(+), 423 deletions(-) create mode 100644 Assets/Code/Example/Platformer/Entity/EntityHealth.cs create mode 100644 Assets/Code/Example/Platformer/Entity/EntityHealth.cs.meta create mode 100644 Assets/Code/Infrastructure/Generators/UIPanelEventsGenerator.cs create mode 100644 Assets/Code/Infrastructure/Generators/UIPanelEventsGenerator.cs.meta delete mode 100644 Assets/Code/Infrastructure/UI/Panels/DamnEmptyPanel.cs delete mode 100644 Assets/Code/Infrastructure/UI/Panels/DamnEmptyPanel.cs.meta rename Assets/Resources_moved/{ScenesAssetReferences.asset => Example/Platformer/Configs/LayerMasks/Enemies.asset} (54%) rename Assets/Resources_moved/{ScenesAssetReferences.asset.meta => Example/Platformer/Configs/LayerMasks/Enemies.asset.meta} (79%) rename Assets/Resources_moved/{DebugClassConfig.asset => Example/Platformer/Configs/LayerMasks/Player.asset} (51%) rename Assets/Resources_moved/{DebugClassConfig.asset.meta => Example/Platformer/Configs/LayerMasks/Player.asset.meta} (79%) create mode 100644 Assets/UnityCodeGen.Generated/Code.Example.Race.UI.PlayerScoreCounterEvents.Generated.cs create mode 100644 Assets/UnityCodeGen.Generated/Code.Example.Race.UI.PlayerScoreCounterEvents.Generated.cs.meta create mode 100644 Assets/UnityCodeGen.Generated/Code.Example.Race.UI.PlayerScoresEvents.Generated.cs create mode 100644 Assets/UnityCodeGen.Generated/Code.Example.Race.UI.PlayerScoresEvents.Generated.cs.meta create mode 100644 Assets/UnityCodeGen.Generated/Code.Example.Race.UI.WinScreenEvents.Generated.cs create mode 100644 Assets/UnityCodeGen.Generated/Code.Example.Race.UI.WinScreenEvents.Generated.cs.meta create mode 100644 Assets/UnityCodeGen.Generated/Code.Infrastructure.UI.Panels.LoadingPanelEvents.Generated.cs create mode 100644 Assets/UnityCodeGen.Generated/Code.Infrastructure.UI.Panels.LoadingPanelEvents.Generated.cs.meta create mode 100644 Assets/UnityCodeGen.Generated/Code.Infrastructure.UI.Panels.LogoPanelEvents.Generated.cs create mode 100644 Assets/UnityCodeGen.Generated/Code.Infrastructure.UI.Panels.LogoPanelEvents.Generated.cs.meta create mode 100644 Assets/UnityCodeGen.Generated/Code.Infrastructure.UI.Panels.MenuChoosePanelEvents.Generated.cs create mode 100644 Assets/UnityCodeGen.Generated/Code.Infrastructure.UI.Panels.MenuChoosePanelEvents.Generated.cs.meta diff --git a/.idea/.idea.Infra/.idea/workspace.xml b/.idea/.idea.Infra/.idea/workspace.xml index e90ea2c..e862135 100644 --- a/.idea/.idea.Infra/.idea/workspace.xml +++ b/.idea/.idea.Infra/.idea/workspace.xml @@ -5,18 +5,58 @@ - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - + + + + + + + + + + @@ -141,23 +183,4 @@ - - - - - file://$PROJECT_DIR$/Assets/Code/Infrastructure/App/States/MainMenuState.cs - 58 - - - - - - - - - - \ No newline at end of file diff --git a/Assets/AddressableAssetsData/AssetGroups/Default Local Group.asset b/Assets/AddressableAssetsData/AssetGroups/Default Local Group.asset index f5313b6..fa80189 100644 --- a/Assets/AddressableAssetsData/AssetGroups/Default Local Group.asset +++ b/Assets/AddressableAssetsData/AssetGroups/Default Local Group.asset @@ -171,6 +171,12 @@ MonoBehaviour: m_ReadOnly: 0 m_SerializedLabels: [] FlaggedDuringContentUpdateRestriction: 0 + - m_GUID: 69e720c0a88f4f9499af76a887cd9fdf + m_Address: Assets/Resources_moved/Example/Platformer/Configs/LayerMasks/Player.asset + m_ReadOnly: 0 + m_SerializedLabels: + - LayerMaskConfig + FlaggedDuringContentUpdateRestriction: 0 - m_GUID: 6a86e03165bcd491ba987514d0da38bd m_Address: Assets/Resources_moved/Configs/Audio/Infos/UI/launchSelect1.asset m_ReadOnly: 0 @@ -236,11 +242,6 @@ MonoBehaviour: m_SerializedLabels: - AudioInfoConfig FlaggedDuringContentUpdateRestriction: 0 - - m_GUID: a78f552da8f156b469b95652e4b0209d - m_Address: DebugClassConfig - m_ReadOnly: 0 - m_SerializedLabels: [] - FlaggedDuringContentUpdateRestriction: 0 - m_GUID: a9d36f968917dc35cb0e534af9ea6e59 m_Address: Assets/Resources_moved/Configs/Audio/Infos/UI/launchSelectMenu.asset m_ReadOnly: 0 @@ -278,17 +279,18 @@ MonoBehaviour: m_ReadOnly: 0 m_SerializedLabels: [] FlaggedDuringContentUpdateRestriction: 0 + - m_GUID: cc76fd76d78cd364880ebe8330a05834 + m_Address: Assets/Resources_moved/Example/Platformer/Configs/LayerMasks/Enemies.asset + m_ReadOnly: 0 + m_SerializedLabels: + - LayerMaskConfig + FlaggedDuringContentUpdateRestriction: 0 - m_GUID: d2750e654bd192d41a48144c43b41302 m_Address: Assets/Resources_moved/Configs/UI/Logo.asset m_ReadOnly: 0 m_SerializedLabels: - UIPanelConfig FlaggedDuringContentUpdateRestriction: 0 - - m_GUID: d54fabdcc748a594aa0551dcd235c7c2 - m_Address: ScenesAssetReferences - m_ReadOnly: 0 - m_SerializedLabels: [] - FlaggedDuringContentUpdateRestriction: 0 - m_GUID: d7dd69cfadda3d6e18ec390724be0d80 m_Address: Assets/Resources_moved/Configs/Audio/AudioSourcePrefabConfig.asset m_ReadOnly: 0 diff --git a/Assets/Code/Example/Platformer/Entity/Enemies/Boar.cs b/Assets/Code/Example/Platformer/Entity/Enemies/Boar.cs index 7ad5b21..78a2f24 100644 --- a/Assets/Code/Example/Platformer/Entity/Enemies/Boar.cs +++ b/Assets/Code/Example/Platformer/Entity/Enemies/Boar.cs @@ -13,14 +13,15 @@ namespace Code.Example.Platformer.Entity.Enemies protected override void Move() { - if (_target) { - _directionRight = (transform.position - _target.position).magnitude < float.Epsilon; + _directionRight = ((_target.position - transform.position)).x > float.Epsilon; + UnityEngine.Debug.DrawLine(transform.position, (transform.position + (_target.position - transform.position)), Color.salmon); + CheckupDirection(); rigidbody2D.linearVelocityX = _directionRight ? 0.5f : -0.5f; - rigidbody2D.linearVelocity *= _acceleration; + rigidbody2D.linearVelocityX *= _acceleration; } else { diff --git a/Assets/Code/Example/Platformer/Entity/Entity.cs b/Assets/Code/Example/Platformer/Entity/Entity.cs index 4b1e483..b95a580 100644 --- a/Assets/Code/Example/Platformer/Entity/Entity.cs +++ b/Assets/Code/Example/Platformer/Entity/Entity.cs @@ -14,6 +14,15 @@ namespace Code.Example.Platformer.Entity [SerializeField] protected Animator animator; [SerializeField] protected SpriteRenderer spriteRenderer; [SerializeField] private Vector2 groundPoint; + + private EntityHealth _health; + private PlatformerEntityData _data; + + public void SetData(PlatformerEntityData data) + { + _data = data; + _health = new(data.maxHealth); + } protected bool onGround; @@ -29,7 +38,9 @@ namespace Code.Example.Platformer.Entity { onGround = CheckGround(); animator.SetBool(OnGround, onGround); + Move(); + if(rigidbody2D.linearVelocity.x is > 0.01f or < -0.01f) HandleFlipX(); } @@ -40,5 +51,7 @@ namespace Code.Example.Platformer.Entity } protected abstract void Move(); + + public virtual void GetDamage(int damage) => _health.GiveDamage(damage); } } \ No newline at end of file diff --git a/Assets/Code/Example/Platformer/Entity/EntityHealth.cs b/Assets/Code/Example/Platformer/Entity/EntityHealth.cs new file mode 100644 index 0000000..5f85861 --- /dev/null +++ b/Assets/Code/Example/Platformer/Entity/EntityHealth.cs @@ -0,0 +1,27 @@ +namespace Code.Example.Platformer.Entity +{ + public class EntityHealth + { + private int _health, _maxHealth; + public bool IsDead { get; private set; } + + public EntityHealth(int initialHealth) + { + _health = initialHealth; + } + + public void GiveDamage(int damage) + { + _health -= damage; + + if(_health <= 0) IsDead = true; + } + + public void Heal(int heal) + { + if (IsDead) return; + if (_health + heal > _maxHealth) _health = _maxHealth; + else _health += heal; + } + } +} \ No newline at end of file diff --git a/Assets/Code/Example/Platformer/Entity/EntityHealth.cs.meta b/Assets/Code/Example/Platformer/Entity/EntityHealth.cs.meta new file mode 100644 index 0000000..6ac4301 --- /dev/null +++ b/Assets/Code/Example/Platformer/Entity/EntityHealth.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: a3078030faef42b5bddd46a7c5c91d95 +timeCreated: 1773058870 \ No newline at end of file diff --git a/Assets/Code/Example/Platformer/Entity/PlatformerEnemyFactory.cs b/Assets/Code/Example/Platformer/Entity/PlatformerEnemyFactory.cs index 2de21da..06e8ae8 100644 --- a/Assets/Code/Example/Platformer/Entity/PlatformerEnemyFactory.cs +++ b/Assets/Code/Example/Platformer/Entity/PlatformerEnemyFactory.cs @@ -1,32 +1,115 @@ using System; +using System.Collections.Generic; +using System.Linq; +using Code.Infrastructure.Configs; +using Code.Infrastructure.EventBus; using Code.Infrastructure.Generators; +using Cysharp.Threading.Tasks; +using UnityEngine; using UnityEngine.AddressableAssets; +using UnityEngine.ResourceManagement.AsyncOperations; namespace Code.Example.Platformer.Entity { - [Config("Configs/Gameplay/Platformer/EnemySettings", true)] - public class PlatformerEnemySettings + [Config("Configs/Gameplay/Platformer/EntitySettings", true)] + public class PlatformerEntitySettings { - [ToConfig] public PlatformerEnemyData racerData; + [ToConfig] public PlatformerEntityData EntityData; [ToConfig] public AssetReference prefabReference; } [Serializable] - public struct PlatformerEnemyData + public struct PlatformerEntityData { public string name; public float speed; + public float acceleration; public int damage; - public PlatformerEnemyType type; + public PlatformerEntityType type; + public int maxHealth; } - public enum PlatformerEnemyType + public enum PlatformerEntityType { - Dummy + Player, + Boar, + Bee, + Snail } public class PlatformerEnemyFactory { + private EventBus _eventBus; + private string _enemyConfigsLabel; + private AsyncOperationHandle> _enemyConfigsHandle; + private Dictionary> _enemyPrefabsHandle = new(); + + private Dictionary _enemyConfigs; + + public PlatformerEnemyFactory(IConfigLocator configLocator, EventBus eventBus) + { + _eventBus = eventBus; + _enemyConfigsLabel = configLocator.TryGetManyConfigAssetReferences(); + + LoadConfigs().Forget(); + } + + private async UniTaskVoid LoadConfigs() + { + _enemyConfigsHandle = Addressables.LoadAssetsAsync(_enemyConfigsLabel); + + await _enemyConfigsHandle.ToUniTask(); + + _enemyConfigs = _enemyConfigsHandle.Result.ToDictionary(x => x.racerData.type); + _enemyConfigs.Remove(PlatformerEntityType.Player); + + _eventBus.RaiseEvent(x => x.PlatformerFactoryInitialized()); + } + + public async UniTaskVoid LoadRacer(PlatformerEntityType racerType) + { + if (racerType == PlatformerEntityType.Player) return; + + if (_enemyPrefabsHandle.ContainsKey(racerType)) + { + _eventBus.RaiseEvent(x => x.PlatformerEnemyLoaded(racerType, null)); + + return; + } + UnityEngine.Debug.LogWarning($"Racer loaded {racerType}"); + _enemyPrefabsHandle.Add(racerType, + Addressables.LoadAssetAsync(_enemyConfigs[racerType].prefabReference)); + + await _enemyPrefabsHandle[racerType].ToUniTask(); + var racer = _enemyPrefabsHandle[racerType].Result.GetComponent(); + racer.SetData(_enemyConfigs[racerType].racerData); + + _eventBus.RaiseEvent(x => x.PlatformerEnemyLoaded(racerType, racer)); + } + + public void ReleaseRacer(PlatformerEntityType racerType) + { + _enemyPrefabsHandle[racerType].Release(); + _enemyPrefabsHandle.Remove(racerType); + } + + public void Dispose() + { + UnityEngine.Debug.LogWarning($"Racers released"); + foreach (var prefab in _enemyPrefabsHandle) + prefab.Value.Release(); + _enemyPrefabsHandle.Clear(); + + _enemyConfigsHandle.Release(); + } + } + public interface IPlatformerFactoryInitializedHandle : IGlobalSubscriber + { + public void PlatformerFactoryInitialized(); + } + public interface IPlatformerEnemyLoadedHandle : IGlobalSubscriber + { + public void PlatformerEnemyLoaded(PlatformerEntityType type, Entity entity); } } \ No newline at end of file diff --git a/Assets/Code/Example/Platformer/Entity/PlayerEntity.cs b/Assets/Code/Example/Platformer/Entity/PlayerEntity.cs index 93b34f1..074190c 100644 --- a/Assets/Code/Example/Platformer/Entity/PlayerEntity.cs +++ b/Assets/Code/Example/Platformer/Entity/PlayerEntity.cs @@ -1,4 +1,6 @@ -using System; +using Code.Infrastructure.Audio; +using Code.Infrastructure.Camera; +using Code.Infrastructure.Configs; using Code.Infrastructure.Input; using Reflex.Attributes; using UnityEngine; @@ -8,34 +10,48 @@ namespace Code.Example.Platformer.Entity { public class PlayerEntity : Entity { + private static readonly int OnAttack = Animator.StringToHash("OnAttack"); private IInputService _inputService; [Inject] - private void Construct(IInputService inputService) + private void Construct(IInputService inputService, IAudioService audioService) { + _audioService = audioService; + _inputService = inputService; - _inputService.BindActionPerformed((int)ActionMappings.Gameplay, (int)GameplayActions.Move, + _inputService.BindActionPerformed((int)ActionMappings.Platformer, (int)PlatformerActions.Move, MovementPerformed); - _inputService.BindActionCancelled((int)ActionMappings.Gameplay, (int)GameplayActions.Move, + _inputService.BindActionCancelled((int)ActionMappings.Platformer, (int)PlatformerActions.Move, MovementCancelled); - _inputService.BindActionPerformed((int)ActionMappings.Gameplay, (int)GameplayActions.Brake, JumpPerformed); + _inputService.BindActionPerformed((int)ActionMappings.Platformer, (int)PlatformerActions.Jump, JumpPerformed); + _inputService.BindActionPerformed((int)ActionMappings.Platformer, (int)PlatformerActions.Attack, AttackPerformed); + _inputService.BindActionPerformed((int)ActionMappings.Platformer, (int)PlatformerActions.Sprint, SprintPerformed); + _inputService.BindActionCancelled((int)ActionMappings.Platformer, (int)PlatformerActions.Sprint, SprintCancelled); + + //cameraFactory.GetCinematicCamera(CameraMode.Platformer).Follow = transform; , CameraFactory cameraFactory } private void OnDestroy() { - _inputService.UnbindActionPerformed((int)ActionMappings.Gameplay, (int)GameplayActions.Move, + _inputService.UnbindActionPerformed((int)ActionMappings.Platformer, (int)PlatformerActions.Move, MovementPerformed); - _inputService.UnbindActionCancelled((int)ActionMappings.Gameplay, (int)GameplayActions.Move, + _inputService.UnbindActionCancelled((int)ActionMappings.Platformer, (int)PlatformerActions.Move, MovementCancelled); - _inputService.UnbindActionPerformed((int)ActionMappings.Gameplay, (int)GameplayActions.Brake, JumpPerformed); + _inputService.UnbindActionPerformed((int)ActionMappings.Platformer, (int)PlatformerActions.Jump, JumpPerformed); + _inputService.UnbindActionPerformed((int)ActionMappings.Platformer, (int)PlatformerActions.Attack, AttackPerformed); + _inputService.UnbindActionPerformed((int)ActionMappings.Platformer, (int)PlatformerActions.Sprint, SprintPerformed); + _inputService.UnbindActionCancelled((int)ActionMappings.Platformer, (int)PlatformerActions.Sprint, SprintCancelled); } + private float _acceleration = 1f; + protected override void Move() { - rigidbody2D.linearVelocityX = _moveDirection.x * 5f; + rigidbody2D.linearVelocityX = _moveDirection.x * 2f * _acceleration; } private Vector2 _moveDirection; + private IAudioService _audioService; private void MovementPerformed(InputAction.CallbackContext callbackContext) => _moveDirection = callbackContext.ReadValue(); @@ -46,7 +62,48 @@ namespace Code.Example.Platformer.Entity private void JumpPerformed(InputAction.CallbackContext callbackContext) { if (!onGround) return; - rigidbody2D.AddForceY(100f); + rigidbody2D.AddForceY(150f); + + _acceleration = 1f; } + + [SerializeField] private Vector2 attackOffset; + + private void AttackPerformed(InputAction.CallbackContext callbackContext) + { + if (!onGround) return; + // + + // + _audioService.PlayOneShot(AudioNames.UISounds, 1); + animator.SetBool(OnAttack, true); + } + + public void CastAttack() + { + var damagedOnes = + Physics2D.OverlapPointAll((Vector2)transform.position + attackOffset, LayerMasks.Masks[LayerMaskType.PlatformerEnemy]); + + if (damagedOnes == null) return; + + foreach (var damaged in damagedOnes) + { + damaged.gameObject.GetComponent().GetDamage(1); + _audioService.PlayOneShot(AudioNames.UISounds, 2); + } + } + + private void SprintPerformed(InputAction.CallbackContext callbackContext) + { + if (!onGround) return; + // + _acceleration = 3f; + } + private void SprintCancelled(InputAction.CallbackContext callbackContext) + { + _acceleration = 1f; + } + + public void AttackEnd() => animator.SetBool(OnAttack, false); } } \ No newline at end of file diff --git a/Assets/Code/Example/Platformer/PlatformerState.cs b/Assets/Code/Example/Platformer/PlatformerState.cs index 4d55a14..94097e2 100644 --- a/Assets/Code/Example/Platformer/PlatformerState.cs +++ b/Assets/Code/Example/Platformer/PlatformerState.cs @@ -30,7 +30,7 @@ namespace Code.Example.Platformer Context.UIService.OpenPanel(UIPanelType.Loading); Context.SceneLoader.LoadSceneAsync(SceneId.Platformer, LoadSceneMode.Single).Forget(); - Context.InputService.EnableMap(ActionMappings.Gameplay); + Context.InputService.EnableMap(ActionMappings.Platformer); Context.CameraFactory.LoadCinemachineCamera(CameraMode.Platformer).Forget(); } private Loading _loading; @@ -45,7 +45,7 @@ namespace Code.Example.Platformer protected override void OnExitState() { Context.CameraFactory.ReleaseCinemachineCamera(CameraMode.Platformer); - Context.InputService.DisableMap(ActionMappings.Gameplay); + Context.InputService.DisableMap(ActionMappings.Platformer); EventBus.Unsubscribe(this); } diff --git a/Assets/Code/Example/Race/Racer/Player/PlayerCarInput.cs b/Assets/Code/Example/Race/Racer/Player/PlayerCarInput.cs index 8236edc..c94ef76 100644 --- a/Assets/Code/Example/Race/Racer/Player/PlayerCarInput.cs +++ b/Assets/Code/Example/Race/Racer/Player/PlayerCarInput.cs @@ -15,10 +15,10 @@ namespace Code.Example.Race.Racer.Player public void Construct(IInputService inputService) { _inputService = inputService; - _inputService.BindActionPerformed((int)ActionMappings.Gameplay, (int)GameplayActions.Move, MovementPerformed); - _inputService.BindActionCancelled((int)ActionMappings.Gameplay, (int)GameplayActions.Move, MovementEnded); - _inputService.BindActionPerformed((int)ActionMappings.Gameplay, (int)GameplayActions.Brake, BrakePerformed); - _inputService.BindActionCancelled((int)ActionMappings.Gameplay, (int)GameplayActions.Brake, BrakeEnded); + _inputService.BindActionPerformed((int)ActionMappings.Race, (int)RaceActions.Move, MovementPerformed); + _inputService.BindActionCancelled((int)ActionMappings.Race, (int)RaceActions.Move, MovementEnded); + _inputService.BindActionPerformed((int)ActionMappings.Race, (int)RaceActions.Brake, BrakePerformed); + _inputService.BindActionCancelled((int)ActionMappings.Race, (int)RaceActions.Brake, BrakeEnded); } private void MovementPerformed(InputAction.CallbackContext context) => MovementInput = context.ReadValue(); @@ -32,10 +32,10 @@ namespace Code.Example.Race.Racer.Player private void OnDestroy() { if (_inputService == null) return; - _inputService.UnbindActionPerformed((int)ActionMappings.Gameplay, (int)GameplayActions.Move, MovementPerformed); - _inputService.UnbindActionCancelled((int)ActionMappings.Gameplay, (int)GameplayActions.Move, MovementEnded); - _inputService.UnbindActionPerformed((int)ActionMappings.Gameplay, (int)GameplayActions.Brake, BrakePerformed); - _inputService.UnbindActionCancelled((int)ActionMappings.Gameplay, (int)GameplayActions.Brake, BrakeEnded); + _inputService.UnbindActionPerformed((int)ActionMappings.Race, (int)RaceActions.Move, MovementPerformed); + _inputService.UnbindActionCancelled((int)ActionMappings.Race, (int)RaceActions.Move, MovementEnded); + _inputService.UnbindActionPerformed((int)ActionMappings.Race, (int)RaceActions.Brake, BrakePerformed); + _inputService.UnbindActionCancelled((int)ActionMappings.Race, (int)RaceActions.Brake, BrakeEnded); } } } \ No newline at end of file diff --git a/Assets/Code/Example/Race/UI/PlayerScoreCounter.cs b/Assets/Code/Example/Race/UI/PlayerScoreCounter.cs index e6cf2c9..ca226a9 100644 --- a/Assets/Code/Example/Race/UI/PlayerScoreCounter.cs +++ b/Assets/Code/Example/Race/UI/PlayerScoreCounter.cs @@ -8,7 +8,7 @@ using UnityEngine; namespace Code.Example.Race.UI { - public class PlayerScoreCounter : UIPanel, IScoreChangedHandle + public partial class PlayerScoreCounter : UIPanel, IScoreChangedHandle { [SerializeField] private TMP_Text playerScore; private EventBus _eventBus; diff --git a/Assets/Code/Example/Race/UI/PlayerScores.cs b/Assets/Code/Example/Race/UI/PlayerScores.cs index 5496eb3..ca55f96 100644 --- a/Assets/Code/Example/Race/UI/PlayerScores.cs +++ b/Assets/Code/Example/Race/UI/PlayerScores.cs @@ -8,7 +8,7 @@ using UnityEngine.UI; namespace Code.Example.Race.UI { - public class PlayerScores : UIPanel + public partial class PlayerScores : UIPanel { [SerializeField] private Image image; [SerializeField] private TMP_Text scoreText; diff --git a/Assets/Code/Example/Race/UI/WinScreen.cs b/Assets/Code/Example/Race/UI/WinScreen.cs index 48b5292..dbcad5f 100644 --- a/Assets/Code/Example/Race/UI/WinScreen.cs +++ b/Assets/Code/Example/Race/UI/WinScreen.cs @@ -7,7 +7,7 @@ using UnityEngine.UI; namespace Code.Example.Race.UI { - public class WinScreen : UIPanel + public partial class WinScreen : UIPanel { [SerializeField] private Image image; [SerializeField] private TMP_Text winText; diff --git a/Assets/Code/Infrastructure/App/PapaInstaller.cs b/Assets/Code/Infrastructure/App/PapaInstaller.cs index 40981e6..40db6b2 100644 --- a/Assets/Code/Infrastructure/App/PapaInstaller.cs +++ b/Assets/Code/Infrastructure/App/PapaInstaller.cs @@ -6,6 +6,7 @@ using Code.Infrastructure.Input; using Code.Infrastructure.Loadings; using Code.Infrastructure.SceneLoader; using Code.Infrastructure.UI; +using Code.Infrastructure.UI.Panels; using Code.Infrastructure.Volume; using Reflex.Core; using Reflex.Enums; @@ -23,7 +24,8 @@ namespace Code.Infrastructure.App IInputServiceInitializedHandle, ICameraInitializedHandle, IUIInitializedHandle, - IUIPanelLoaded, + ILoadingPanelCreatedHandle, + ILogoPanelCreatedHandle, IVolumesInitializedHandle, IVolumeLoaded, IAudioSourcePoolInitializedHandle, @@ -151,26 +153,8 @@ namespace Code.Infrastructure.App _ui2CamLoading.DoProgress(); _initialLoading.DoProgress(); - _thatRightContainer.Resolve().TryLoadPanel(UIPanelType.Logo); - _thatRightContainer.Resolve().TryLoadPanel(UIPanelType.Loading); - } - - public void UILoaded(UIPanelType uiPanelType) - { - switch (uiPanelType) - { - case UIPanelType.Logo: - _thatRightContainer.Resolve().OpenPanel(UIPanelType.Logo); - - _initialLoading.DoProgress(); - break; - case UIPanelType.Loading: - // _thatRightContainer.Resolve().OpenPanel(UIPanelType.Logo); - break; - default: - Application.Quit(); - break; - } + _thatRightContainer.Resolve().TryLoadCreatePanel(UIPanelType.Logo); + _thatRightContainer.Resolve().TryLoadCreatePanel(UIPanelType.Loading); } public void VolumesInitialized() @@ -212,5 +196,17 @@ namespace Code.Infrastructure.App { _initialLoading.DoProgress(); } + + public void LoadingPanelCreated(UIPanel panel) + { + _thatRightContainer.Resolve().OpenPanel(UIPanelType.Logo); + + _initialLoading.DoProgress(); + } + + public void LogoPanelCreated(UIPanel panel) + { + + } } } \ No newline at end of file diff --git a/Assets/Code/Infrastructure/App/States/BootstrapState.cs b/Assets/Code/Infrastructure/App/States/BootstrapState.cs index 17d99c0..dc0de91 100644 --- a/Assets/Code/Infrastructure/App/States/BootstrapState.cs +++ b/Assets/Code/Infrastructure/App/States/BootstrapState.cs @@ -1,14 +1,13 @@ -using System.Threading; -using Code.Debug; using Code.Infrastructure.Audio; using Code.Infrastructure.Generators; -using Code.Infrastructure.UI; +using Code.Infrastructure.UI; +using Code.Infrastructure.UI.Panels; namespace Code.Infrastructure.App.States { [State(typeof(AppStates),typeof(AppStateMachineContext))] [StateRaisingEvent] - public partial class BootstrapState : IUIPanelLoaded, IReadyToPlayHandle + public partial class BootstrapState : IReadyToPlayHandle, IMenuChoosePanelCreatedHandle { private EventBus.EventBus _eventBus; public BootstrapState(AppStateMachineContext context, EventBus.EventBus eventBus) : base(context,eventBus) @@ -23,7 +22,7 @@ namespace Code.Infrastructure.App.States Context.UIService.TryRemovePanel(UIPanelType.Logo); - Context.UIService.TryLoadPanel(UIPanelType.DebugSceneChooser); + Context.UIService.TryLoadCreatePanel(UIPanelType.DebugSceneChooser); Context.AudioFactory.LoadAudioClips(AudioNames.UISounds); } @@ -33,16 +32,16 @@ namespace Code.Infrastructure.App.States Context.UIService.TryRemovePanel(UIPanelType.DebugSceneChooser); _eventBus.Unsubscribe(this); } - - public void UILoaded(UIPanelType uiPanelType) - { - if (uiPanelType != UIPanelType.DebugSceneChooser) return; - - Context.UIService.OpenPanel(uiPanelType); - } + public void OnReadyToPlay(AudioNames groupName) { Context.AudioService.PlayRepeatedly(AudioNames.UISounds,0); } + + public void MenuChoosePanelCreated(UIPanel panel) + { + panel.gameObject.SetActive(true); + panel.Open(); + } } } \ No newline at end of file diff --git a/Assets/Code/Infrastructure/App/States/GameplayState.cs b/Assets/Code/Infrastructure/App/States/GameplayState.cs index aeb30e4..9ed9e4f 100644 --- a/Assets/Code/Infrastructure/App/States/GameplayState.cs +++ b/Assets/Code/Infrastructure/App/States/GameplayState.cs @@ -18,7 +18,7 @@ using Reflex.Core; using Reflex.Injectors; using Unity.Cinemachine; using UnityEngine.SceneManagement; - +// Ивенты создания панелей сломаны TODO namespace Code.Infrastructure.App.States { [State(typeof(AppStates), typeof(AppStateMachineContext))] @@ -27,7 +27,6 @@ namespace Code.Infrastructure.App.States IOnGameplaySceneLoadedHandler, IRaceGameHandle, IRacerFactoryInitializedHandle, - IUIPanelLoaded, ICinematicMachineHandle { public GameplayState(AppStateMachineContext context, EventBus.EventBus eventBus) : base(context, eventBus) @@ -52,11 +51,11 @@ namespace Code.Infrastructure.App.States // CinemachineCamera _gameplayLoading = new Loading(7, GameplayLoadingCompleted); - Context.UIService.TryLoadPanel(UIPanelType.PlayerScoreCounter); - Context.UIService.TryLoadPanel(UIPanelType.WinScreen); - Context.UIService.TryLoadPanel(UIPanelType.PlayerScores); + Context.UIService.TryLoadCreatePanel(UIPanelType.PlayerScoreCounter); + Context.UIService.TryLoadCreatePanel(UIPanelType.WinScreen); + Context.UIService.TryLoadCreatePanel(UIPanelType.PlayerScores); Context.SceneLoader.LoadSceneAsync(SceneId.Gameplay, LoadSceneMode.Single).Forget(); - Context.InputService.EnableMap(ActionMappings.Gameplay); + Context.InputService.EnableMap(ActionMappings.Race); Context.CameraFactory.LoadCinemachineCamera(CameraMode.ThirdPerson).Forget(); } @@ -85,7 +84,7 @@ namespace Code.Infrastructure.App.States Context.UIService.TryRemovePanel(UIPanelType.WinScreen); Context.UIService.TryRemovePanel(UIPanelType.PlayerScores); Context.CameraFactory.ReleaseCinemachineCamera(CameraMode.ThirdPerson); - Context.InputService.DisableMap(ActionMappings.Gameplay); + Context.InputService.DisableMap(ActionMappings.Race); _raceGame = null; @@ -120,7 +119,7 @@ namespace Code.Infrastructure.App.States public void RaceGameEnded(RaceScores scores) { - var winScreen = (WinScreen)Context.UIService.TryGetPanel(UIPanelType.WinScreen); + var winScreen = (WinScreen)Context.UIService.TryGetSinglePanel(UIPanelType.WinScreen); var id = 0; var cachedScores = scores.GetScores(); @@ -133,7 +132,7 @@ namespace Code.Infrastructure.App.States var winText = $@"{id} МЕСТО\n"; winScreen.SetText(winText); - var getPanel = Context.UIService.TryGetPanel(UIPanelType.PlayerScores); + var getPanel = Context.UIService.TryGetSinglePanel(UIPanelType.PlayerScores); ((PlayerScores)getPanel) .SetText(UNTILTHEYFIXCONTAINERS.Resolve().GetRaces()); Context.UIService.ClosePanel(UIPanelType.PlayerScoreCounter); @@ -176,5 +175,14 @@ namespace Code.Infrastructure.App.States } public void CinemachineLoaded(CinemachineCamera cinemachineCamera) => _gameplayLoading.DoProgress(); + public void UISinglePanelLoaded(UIPanelType uiPanelType) + { + + } + + public void UISinglePanelRemoved(UIPanelType uiPanelType) + { + throw new System.NotImplementedException(); + } } } \ No newline at end of file diff --git a/Assets/Code/Infrastructure/App/States/MainMenuState.cs b/Assets/Code/Infrastructure/App/States/MainMenuState.cs index 1b41a92..72d5f23 100644 --- a/Assets/Code/Infrastructure/App/States/MainMenuState.cs +++ b/Assets/Code/Infrastructure/App/States/MainMenuState.cs @@ -12,7 +12,7 @@ namespace Code.Infrastructure.App.States { [State(typeof(AppStates),typeof(AppStateMachineContext))] [StateRaisingEvent] - public partial class MainMenuState : IUIPanelLoaded, IReadyToPlayHandle, IOnMainMenuSceneLoadedHandler + public partial class MainMenuState : IReadyToPlayHandle, IOnMainMenuSceneLoadedHandler, IMenuChoosePanelCreatedHandle { public MainMenuState(AppStateMachineContext context, EventBus.EventBus eventBus) : base(context,eventBus) { @@ -26,7 +26,7 @@ namespace Code.Infrastructure.App.States _loading = new Loading(2, LoadComplete); - Context.UIService.TryLoadPanel(UIPanelType.DebugSceneChooser); + Context.UIService.TryLoadCreatePanel(UIPanelType.DebugSceneChooser); // Context.AudioFactory.LoadAudioClips(AudioNames.UISounds); Context.SceneLoader.LoadSceneAsync(SceneId.MainMenu, LoadSceneMode.Single).Forget(); Context.AudioService.PlayRepeatedly(AudioNames.UISounds,0); @@ -39,14 +39,6 @@ namespace Code.Infrastructure.App.States 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); @@ -68,5 +60,13 @@ namespace Code.Infrastructure.App.States { } + + public void MenuChoosePanelCreated(UIPanel panel) + { + panel.gameObject.SetActive(true); + panel.Open(); + + _loading.DoProgress(); + } } } \ No newline at end of file diff --git a/Assets/Code/Infrastructure/Configs/LayerMaskType.cs b/Assets/Code/Infrastructure/Configs/LayerMaskType.cs index 0460f83..03bdc36 100644 --- a/Assets/Code/Infrastructure/Configs/LayerMaskType.cs +++ b/Assets/Code/Infrastructure/Configs/LayerMaskType.cs @@ -2,6 +2,8 @@ namespace Code.Infrastructure.Configs { public enum LayerMaskType { - PlatformerGround + PlatformerGround, + PlatformerEnemy, + PlatformerPlayer } } \ No newline at end of file diff --git a/Assets/Code/Infrastructure/Generators/UIPanelEventsGenerator.cs b/Assets/Code/Infrastructure/Generators/UIPanelEventsGenerator.cs new file mode 100644 index 0000000..2b60359 --- /dev/null +++ b/Assets/Code/Infrastructure/Generators/UIPanelEventsGenerator.cs @@ -0,0 +1,71 @@ +#if UNITY_EDITOR +using Code.Infrastructure.UI; +using UnityCodeGen; +using UnityEditor; + +namespace Code.Infrastructure.Generators +{ + [Generator] + public class UIPanelEventsGenerator : ICodeGenerator + { + public void Execute(GeneratorContext context) + { + GenerateStates(context); + } + + private void GenerateStates(GeneratorContext context) + { + var states = TypeCache.GetTypesDerivedFrom(); + + foreach (var st in states) + { + var fireStatesCode = $@" + public override void FireCreatedEvent() + {{ + _eventBus.RaiseEvent(h => h.{st.Name}Created(this)); + }} + + public override void FireRemovedEvent() + {{ + _eventBus.RaiseEvent(h => h.{st.Name}Removed()); + }} +"; + var fireStatesInterfacesCode = $@" + + public interface I{st.Name}CreatedHandle : IGlobalSubscriber + {{ + void {st.Name}Created(UIPanel panel); + }} + + public interface I{st.Name}RemovedHandle : IGlobalSubscriber + {{ + void {st.Name}Removed(); + }} +"; + + var statesCode = $@" + +// retard-generated + +using Code.Infrastructure.UI; +using Code.Infrastructure.EventBus; +using Code.Infrastructure.StateMachine; + +namespace {st.Namespace} +{{ + public partial class {st.Name} + {{ + {fireStatesCode} + }} + + {fireStatesInterfacesCode} +}} +"; + + + context.AddCode($"{st.FullName}Events.Generated.cs", statesCode); + } + } + } +} +#endif \ No newline at end of file diff --git a/Assets/Code/Infrastructure/Generators/UIPanelEventsGenerator.cs.meta b/Assets/Code/Infrastructure/Generators/UIPanelEventsGenerator.cs.meta new file mode 100644 index 0000000..41d555a --- /dev/null +++ b/Assets/Code/Infrastructure/Generators/UIPanelEventsGenerator.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: e534143b792f4c2692451b19fb9b7e98 +timeCreated: 1773046409 \ No newline at end of file diff --git a/Assets/Code/Infrastructure/Input/ActionMappings.cs b/Assets/Code/Infrastructure/Input/ActionMappings.cs index 736dbc6..de1f3b0 100644 --- a/Assets/Code/Infrastructure/Input/ActionMappings.cs +++ b/Assets/Code/Infrastructure/Input/ActionMappings.cs @@ -3,13 +3,21 @@ namespace Code.Infrastructure.Input public enum ActionMappings { MainMenu, - Gameplay, + Race, + Platformer, Debug } - public enum GameplayActions + public enum RaceActions { Move, - Brake, + Brake, + } + public enum PlatformerActions + { + Move, + Jump, + Attack, + Sprint, } public enum DebugActions { diff --git a/Assets/Code/Infrastructure/SceneLoader/ScenesAssetReferences.cs b/Assets/Code/Infrastructure/SceneLoader/ScenesAssetReferences.cs index 9196154..cf22d8c 100644 --- a/Assets/Code/Infrastructure/SceneLoader/ScenesAssetReferences.cs +++ b/Assets/Code/Infrastructure/SceneLoader/ScenesAssetReferences.cs @@ -1,11 +1,9 @@ using UnityEngine; -using UnityEngine.AddressableAssets; namespace Code.Infrastructure.SceneLoader { [CreateAssetMenu(fileName = "ScenesAssetReferences", menuName = "Configs/ScenesAssetReferences")] public class ScenesAssetReferences : ScriptableObject { - public AssetReference gameplaySceneReference; } } \ No newline at end of file diff --git a/Assets/Code/Infrastructure/UI/Panels/DamnEmptyPanel.cs b/Assets/Code/Infrastructure/UI/Panels/DamnEmptyPanel.cs deleted file mode 100644 index ac8509a..0000000 --- a/Assets/Code/Infrastructure/UI/Panels/DamnEmptyPanel.cs +++ /dev/null @@ -1,17 +0,0 @@ -using System; - -namespace Code.Infrastructure.UI.Panels -{ - public class DamnEmptyPanel : UIPanel - { - public override void Open(Action callback = null) - { - callback?.Invoke(); - } - - public override void Close(Action callback = null) - { - callback?.Invoke(); - } - } -} \ No newline at end of file diff --git a/Assets/Code/Infrastructure/UI/Panels/DamnEmptyPanel.cs.meta b/Assets/Code/Infrastructure/UI/Panels/DamnEmptyPanel.cs.meta deleted file mode 100644 index 429536a..0000000 --- a/Assets/Code/Infrastructure/UI/Panels/DamnEmptyPanel.cs.meta +++ /dev/null @@ -1,3 +0,0 @@ -fileFormatVersion: 2 -guid: ce4e618236c441ca857ad458fa13e09d -timeCreated: 1769347387 \ No newline at end of file diff --git a/Assets/Code/Infrastructure/UI/Panels/LoadingPanel.cs b/Assets/Code/Infrastructure/UI/Panels/LoadingPanel.cs index c4d821d..0e2eefd 100644 --- a/Assets/Code/Infrastructure/UI/Panels/LoadingPanel.cs +++ b/Assets/Code/Infrastructure/UI/Panels/LoadingPanel.cs @@ -5,7 +5,7 @@ using UnityEngine.UI; namespace Code.Infrastructure.UI.Panels { - public class LoadingPanel : UIPanel + public partial class LoadingPanel : UIPanel { [SerializeField] private RawImage image; [SerializeField] private Color shownColor; diff --git a/Assets/Code/Infrastructure/UI/Panels/LogoPanel.cs b/Assets/Code/Infrastructure/UI/Panels/LogoPanel.cs index 36ff523..63dbe4a 100644 --- a/Assets/Code/Infrastructure/UI/Panels/LogoPanel.cs +++ b/Assets/Code/Infrastructure/UI/Panels/LogoPanel.cs @@ -5,7 +5,7 @@ using UnityEngine.UI; namespace Code.Infrastructure.UI.Panels { - public class LogoPanel : UIPanel + public partial class LogoPanel : UIPanel { [SerializeField] private Image image; [SerializeField] private Color shownColor; diff --git a/Assets/Code/Infrastructure/UI/Panels/MenuChoosePanel.cs b/Assets/Code/Infrastructure/UI/Panels/MenuChoosePanel.cs index bae8bb7..3c3c2e0 100644 --- a/Assets/Code/Infrastructure/UI/Panels/MenuChoosePanel.cs +++ b/Assets/Code/Infrastructure/UI/Panels/MenuChoosePanel.cs @@ -6,7 +6,7 @@ using UnityEngine; namespace Code.Infrastructure.UI.Panels { - public class MenuChoosePanel : UIPanel + public partial class MenuChoosePanel : UIPanel { [Inject] IAudioService _audioService; [SerializeField] private SceneChooser sceneChooser; diff --git a/Assets/Code/Infrastructure/UI/UIFactory.cs b/Assets/Code/Infrastructure/UI/UIFactory.cs index 6be6254..b2ed562 100644 --- a/Assets/Code/Infrastructure/UI/UIFactory.cs +++ b/Assets/Code/Infrastructure/UI/UIFactory.cs @@ -12,14 +12,16 @@ namespace Code.Infrastructure.UI { public interface IUIFactory { - UniTaskVoid LoadPanel(UIPanelType panelType); + UniTaskVoid LoadPanel(UIPanelType panelType, Transform parent = null); void ReleasePanel(UIPanel panel); Canvas Canvas { get; } + bool CheckIsMultiple(UIPanelType panelType); } public class UIFactory : IDisposable, IUIFactory { private Dictionary _configs; + public bool CheckIsMultiple(UIPanelType panelType) => _configs[panelType].Multiple; private AssetReference _canvasConfigReference; private string _configsLabel; private EventBus.EventBus _eventBus; @@ -41,9 +43,9 @@ namespace Code.Infrastructure.UI LoadConfigs().Forget(); } - public async UniTaskVoid LoadPanel(UIPanelType panelType) + public async UniTaskVoid LoadPanel(UIPanelType panelType, Transform parent = null) { - var panel = (await Addressables.InstantiateAsync(_configs[panelType].Prefab, _canvas.transform).ToUniTask()) + var panel = (await Addressables.InstantiateAsync(_configs[panelType].Prefab, parent ?? _canvas.transform).ToUniTask()) .GetComponent(); UnityEngine.Debug.LogWarning($"Panel loaded {panelType}"); @@ -90,5 +92,6 @@ namespace Code.Infrastructure.UI public interface IUIPanelLoadedHandle : IGlobalSubscriber { void UIPanelLoaded(UIPanel panel, UIPanelType panelType); + List TryGetMultiplePanels(UIPanelType panelType); } } \ No newline at end of file diff --git a/Assets/Code/Infrastructure/UI/UIFactory.cs.meta b/Assets/Code/Infrastructure/UI/UIFactory.cs.meta index 41887d6..eb82efa 100644 --- a/Assets/Code/Infrastructure/UI/UIFactory.cs.meta +++ b/Assets/Code/Infrastructure/UI/UIFactory.cs.meta @@ -1,3 +1,2 @@ fileFormatVersion: 2 -guid: 8447b81247b24f1b869b0067aeeff0b8 -timeCreated: 1768979324 \ No newline at end of file +guid: 8447b81247b24f1b869b0067aeeff0b8 \ No newline at end of file diff --git a/Assets/Code/Infrastructure/UI/UIPanel.cs b/Assets/Code/Infrastructure/UI/UIPanel.cs index f002c46..4945789 100644 --- a/Assets/Code/Infrastructure/UI/UIPanel.cs +++ b/Assets/Code/Infrastructure/UI/UIPanel.cs @@ -1,13 +1,21 @@ using System; +using Reflex.Attributes; using UnityEngine; namespace Code.Infrastructure.UI { public abstract class UIPanel : MonoBehaviour { + public UIPanelType PanelType { get; set; } + [SerializeField] protected bool injectMeSenpai; public bool InjectMeSenpai => injectMeSenpai; + [Inject] protected EventBus.EventBus _eventBus; public abstract void Open(Action callback = null); public abstract void Close(Action callback = null); + + public virtual void FireCreatedEvent(){} + public virtual void FireRemovedEvent(){} } + } \ No newline at end of file diff --git a/Assets/Code/Infrastructure/UI/UIPanelSettings.cs b/Assets/Code/Infrastructure/UI/UIPanelSettings.cs index 76021a1..c30f60d 100644 --- a/Assets/Code/Infrastructure/UI/UIPanelSettings.cs +++ b/Assets/Code/Infrastructure/UI/UIPanelSettings.cs @@ -8,6 +8,7 @@ namespace Code.Infrastructure.UI { [ToConfig] public AssetReference Prefab; [ToConfig] public UIPanelType UIPanelType; + [ToConfig] public bool Multiple; } [Config("Configs/UI/CanvasSettings")] diff --git a/Assets/Code/Infrastructure/UI/UIService.cs b/Assets/Code/Infrastructure/UI/UIService.cs index 148b055..3ad4760 100644 --- a/Assets/Code/Infrastructure/UI/UIService.cs +++ b/Assets/Code/Infrastructure/UI/UIService.cs @@ -1,9 +1,11 @@ using System; using System.Collections.Generic; +using System.Linq; using Code.Infrastructure.EventBus; using Reflex.Core; using Reflex.Extensions; using Reflex.Injectors; +using UnityEngine; using UnityEngine.SceneManagement; namespace Code.Infrastructure.UI @@ -12,15 +14,18 @@ namespace Code.Infrastructure.UI { void OpenPanel(UIPanelType uiPanelType); void ClosePanel(UIPanelType uiPanelType); - void TryLoadPanel(UIPanelType uiPanelType); + void TryLoadCreatePanel(UIPanelType uiPanelType, Transform parent = null); void TryRemovePanel(UIPanelType uiPanelType); void SetCanvasCamera(UnityEngine.Camera camera); - UIPanel TryGetPanel(UIPanelType panelType); + UIPanel TryGetSinglePanel(UIPanelType panelType); + void TryRemovePanel(UIPanel panel); } + // Крайне неудобно пользоваться public class UIService : IUIPanelLoadedHandle, IUIService { - private Dictionary _loadedPanels = new(); + private Dictionary _loadedSinglePanels = new(); + private Dictionary> _loadedMultiplePanels = new(); private EventBus.EventBus _eventBus; private IUIFactory _factory; @@ -40,49 +45,101 @@ namespace Code.Infrastructure.UI public void OpenPanel(UIPanelType uiPanelType) { - _loadedPanels[uiPanelType].gameObject.SetActive(true); - _loadedPanels[uiPanelType].Open(); + _loadedSinglePanels[uiPanelType].gameObject.SetActive(true); + _loadedSinglePanels[uiPanelType].Open(); } // TODO Close event public void ClosePanel(UIPanelType uiPanelType) { - _loadedPanels[uiPanelType].Close(() => { _loadedPanels[uiPanelType].gameObject.SetActive(false); }); + _loadedSinglePanels[uiPanelType].Close(() => + { + _loadedSinglePanels[uiPanelType].gameObject.SetActive(false); + }); } - public void TryLoadPanel(UIPanelType uiPanelType) => _factory.LoadPanel(uiPanelType); + public void TryLoadCreatePanel(UIPanelType uiPanelType, Transform parent = null) => _factory.LoadPanel(uiPanelType, parent); public void UIPanelLoaded(UIPanel panel, UIPanelType panelType) { - _loadedPanels.Add(panelType, panel); + panel.PanelType = panelType; + + if (!_factory.CheckIsMultiple(panelType)) + _loadedSinglePanels.Add(panelType, panel); + else + { + if (!_loadedMultiplePanels.ContainsKey(panelType)) + _loadedMultiplePanels.Add(panelType, new List()); + _loadedMultiplePanels[panelType].Add(panel); + } if (panel.InjectMeSenpai) GameObjectInjector.InjectRecursive(panel.gameObject, Container.RootContainer); + else + GameObjectInjector.InjectSingle(panel.gameObject, Container.RootContainer); // GameObjectInjector.InjectRecursive(panel.gameObject, SceneManager.GetActiveScene().GetSceneContainer()); // Скорее всего будут нужны компоненты текущей сцены - - _eventBus.RaiseEvent(ui => ui.UILoaded(panelType)); + + panel.FireCreatedEvent(); } public void TryRemovePanel(UIPanelType uiPanelType) { - _loadedPanels[uiPanelType].Close(() => + if (_factory.CheckIsMultiple(uiPanelType)) { - _loadedPanels[uiPanelType].gameObject.SetActive(false); + UnityEngine.Debug.LogError("Это для единичных панелей олух"); + return; + } + _loadedSinglePanels[uiPanelType].Close(() => + { + _loadedSinglePanels[uiPanelType].gameObject.SetActive(false); RemovePanel(uiPanelType); }); } + public void TryRemovePanel(UIPanel panel) + { + panel.Close(() => + { + panel.gameObject.SetActive(false); + RemovePanel(panel); + // _eventBus.RaiseEvent(x=> x.UIMultiplePanelRemoved(panel)); + }); + } private void RemovePanel(UIPanelType panelType) { - _factory.ReleasePanel(_loadedPanels[panelType]); - _loadedPanels.Remove(panelType); + if (!_factory.CheckIsMultiple(panelType)) + { + var temp = _loadedSinglePanels[panelType]; + _loadedSinglePanels.Remove(panelType); + + temp.FireRemovedEvent(); + + _factory.ReleasePanel(temp); + } + else + { + var temp = _loadedMultiplePanels[panelType]; + _loadedMultiplePanels.Remove(panelType); + + foreach (var panel in temp) + { + panel.FireRemovedEvent(); + _factory.ReleasePanel(panel); + } + } } - public UIPanel TryGetPanel(UIPanelType panelType) => _loadedPanels.GetValueOrDefault(panelType); - } + private void RemovePanel(UIPanel panel) + { + _loadedMultiplePanels[panel.PanelType].Remove(panel); + panel.FireRemovedEvent(); + + _factory.ReleasePanel(panel); + + if(_loadedMultiplePanels[panel.PanelType].Count == 0) _loadedMultiplePanels.Remove(panel.PanelType); + } - public interface IUIPanelLoaded : IGlobalSubscriber - { - void UILoaded(UIPanelType uiPanelType); + public UIPanel TryGetSinglePanel(UIPanelType panelType) => _loadedSinglePanels.GetValueOrDefault(panelType); + public List TryGetMultiplePanels(UIPanelType panelType) => _loadedMultiplePanels.GetValueOrDefault(panelType); } } \ No newline at end of file diff --git a/Assets/InputSystem_Actions.inputactions b/Assets/InputSystem_Actions.inputactions index eb5bc57..5f0c005 100644 --- a/Assets/InputSystem_Actions.inputactions +++ b/Assets/InputSystem_Actions.inputactions @@ -31,7 +31,7 @@ ] }, { - "name": "Player", + "name": "Race", "id": "df70fa95-8a34-4494-b137-73ab6b9c7d37", "actions": [ { @@ -65,7 +65,7 @@ "name": "Attack", "type": "Button", "id": "6c2ab1b8-8984-453a-af3d-a3c78ae1679a", - "expectedControlType": "Button", + "expectedControlType": "", "processors": "", "interactions": "", "initialStateCheck": false @@ -524,6 +524,182 @@ } ] }, + { + "name": "Platformer", + "id": "40cb7908-4da6-4c87-b920-2b844b3218f6", + "actions": [ + { + "name": "Move", + "type": "Value", + "id": "9bf834c4-d1a4-45ed-bb7c-d2bdf3f3e315", + "expectedControlType": "Vector2", + "processors": "", + "interactions": "", + "initialStateCheck": true + }, + { + "name": "Brake", + "type": "Button", + "id": "7f2126e6-bbec-4c2a-b618-0dbca52cd042", + "expectedControlType": "", + "processors": "", + "interactions": "", + "initialStateCheck": false + }, + { + "name": "Attack", + "type": "Button", + "id": "7d31109a-00f6-4131-aa36-bcdc4859f642", + "expectedControlType": "", + "processors": "", + "interactions": "", + "initialStateCheck": false + }, + { + "name": "Sprint", + "type": "Button", + "id": "fcc52df1-fd26-4d3d-ad2b-2f790c76cc0c", + "expectedControlType": "", + "processors": "", + "interactions": "", + "initialStateCheck": false + } + ], + "bindings": [ + { + "name": "WASD", + "id": "8903ed29-eb88-4f99-8d95-6c8e421ee6f2", + "path": "Dpad", + "interactions": "", + "processors": "", + "groups": "", + "action": "Move", + "isComposite": true, + "isPartOfComposite": false + }, + { + "name": "up", + "id": "122a382c-8e70-43cc-b8f5-c3894ddad62d", + "path": "/w", + "interactions": "", + "processors": "", + "groups": ";Keyboard&Mouse", + "action": "Move", + "isComposite": false, + "isPartOfComposite": true + }, + { + "name": "up", + "id": "934bf63a-3b77-4f15-bcee-3b56bf991856", + "path": "/upArrow", + "interactions": "", + "processors": "", + "groups": ";Keyboard&Mouse", + "action": "Move", + "isComposite": false, + "isPartOfComposite": true + }, + { + "name": "down", + "id": "c827aa40-0f6d-4b4a-8cb7-0faca68c9ad9", + "path": "/s", + "interactions": "", + "processors": "", + "groups": ";Keyboard&Mouse", + "action": "Move", + "isComposite": false, + "isPartOfComposite": true + }, + { + "name": "down", + "id": "74a1aef0-68e8-4459-adbe-9beaaa5dc912", + "path": "/downArrow", + "interactions": "", + "processors": "", + "groups": ";Keyboard&Mouse", + "action": "Move", + "isComposite": false, + "isPartOfComposite": true + }, + { + "name": "left", + "id": "79813cf5-83d8-43f0-9334-8a7c06c4084a", + "path": "/a", + "interactions": "", + "processors": "", + "groups": ";Keyboard&Mouse", + "action": "Move", + "isComposite": false, + "isPartOfComposite": true + }, + { + "name": "left", + "id": "12588093-45c6-4429-ab90-898ee680f20c", + "path": "/leftArrow", + "interactions": "", + "processors": "", + "groups": ";Keyboard&Mouse", + "action": "Move", + "isComposite": false, + "isPartOfComposite": true + }, + { + "name": "right", + "id": "39f297a2-959f-460b-899a-6b5bcb120351", + "path": "/d", + "interactions": "", + "processors": "", + "groups": ";Keyboard&Mouse", + "action": "Move", + "isComposite": false, + "isPartOfComposite": true + }, + { + "name": "right", + "id": "ecc53228-111e-4d21-9d12-4e44a6058a29", + "path": "/rightArrow", + "interactions": "", + "processors": "", + "groups": ";Keyboard&Mouse", + "action": "Move", + "isComposite": false, + "isPartOfComposite": true + }, + { + "name": "", + "id": "e483ce90-354f-4db1-ba5e-5152406920ed", + "path": "/space", + "interactions": "", + "processors": "", + "groups": ";Keyboard&Mouse", + "action": "Brake", + "isComposite": false, + "isPartOfComposite": false + }, + { + "name": "", + "id": "5610643d-b7a2-4115-8b4c-4a783faa6898", + "path": "/e", + "interactions": "", + "processors": "", + "groups": ";Keyboard&Mouse", + "action": "Attack", + "isComposite": false, + "isPartOfComposite": false + }, + { + "name": "", + "id": "75a0e210-258a-46bb-a038-eacab792befc", + "path": "/shift", + "interactions": "", + "processors": "", + "groups": ";Keyboard&Mouse", + "action": "Sprint", + "isComposite": false, + "isPartOfComposite": false + } + ] + }, { "name": "UI", "id": "272f6d14-89ba-496f-b7ff-215263d3219f", diff --git a/Assets/Resources/Example/Platformer/Characters/Player/Attack.anim b/Assets/Resources/Example/Platformer/Characters/Player/Attack.anim index 56b217b..ba5032c 100644 --- a/Assets/Resources/Example/Platformer/Characters/Player/Attack.anim +++ b/Assets/Resources/Example/Platformer/Characters/Player/Attack.anim @@ -22,21 +22,21 @@ AnimationClip: curve: - time: 0 value: {fileID: 1526024632, guid: 481e518c0a26ed391b01df46ad010f8f, type: 3} - - time: 0.083333336 + - time: 0.05 value: {fileID: -149383372, guid: 481e518c0a26ed391b01df46ad010f8f, type: 3} - - time: 0.16666667 + - time: 0.1 value: {fileID: -1161840778, guid: 481e518c0a26ed391b01df46ad010f8f, type: 3} - - time: 0.25 + - time: 0.15 value: {fileID: 1802860133, guid: 481e518c0a26ed391b01df46ad010f8f, type: 3} - - time: 0.33333334 + - time: 0.2 value: {fileID: 55767095, guid: 481e518c0a26ed391b01df46ad010f8f, type: 3} - - time: 0.41666666 + - time: 0.26666668 value: {fileID: 529439664, guid: 481e518c0a26ed391b01df46ad010f8f, type: 3} - - time: 0.5 + - time: 0.31666666 value: {fileID: 1184257701, guid: 481e518c0a26ed391b01df46ad010f8f, type: 3} - - time: 0.5833333 + - time: 0.36666667 value: {fileID: -1605253944, guid: 481e518c0a26ed391b01df46ad010f8f, type: 3} - - time: 0.6666667 + - time: 0.41666666 value: {fileID: -1605253944, guid: 481e518c0a26ed391b01df46ad010f8f, type: 3} attribute: m_Sprite path: @@ -74,7 +74,7 @@ AnimationClip: m_AdditiveReferencePoseClip: {fileID: 0} m_AdditiveReferencePoseTime: 0 m_StartTime: 0 - m_StopTime: 0.68333334 + m_StopTime: 0.43333334 m_OrientationOffsetY: 0 m_Level: 0 m_CycleOffset: 0 @@ -93,4 +93,25 @@ AnimationClip: m_EulerEditorCurves: [] m_HasGenericRootTransform: 0 m_HasMotionFloatCurves: 0 - m_Events: [] + m_Events: + - time: 0.05 + functionName: CastAttack + data: + objectReferenceParameter: {fileID: 0} + floatParameter: 0 + intParameter: 0 + messageOptions: 0 + - time: 0.26666668 + functionName: CastAttack + data: + objectReferenceParameter: {fileID: 0} + floatParameter: 0 + intParameter: 0 + messageOptions: 0 + - time: 0.4 + functionName: AttackEnd + data: + objectReferenceParameter: {fileID: 0} + floatParameter: 0 + intParameter: 0 + messageOptions: 0 diff --git a/Assets/Resources/Example/Platformer/Characters/Player/Player.prefab b/Assets/Resources/Example/Platformer/Characters/Player/Player.prefab index 4122e6a..174cca0 100644 --- a/Assets/Resources/Example/Platformer/Characters/Player/Player.prefab +++ b/Assets/Resources/Example/Platformer/Characters/Player/Player.prefab @@ -14,7 +14,7 @@ GameObject: - component: {fileID: 6786408946074889384} - component: {fileID: 7285218563850982413} - component: {fileID: 5637894485084274858} - m_Layer: 0 + m_Layer: 10 m_Name: Player m_TagString: Untagged m_Icon: {fileID: 0} @@ -123,7 +123,7 @@ Rigidbody2D: m_Simulated: 1 m_UseFullKinematicContacts: 0 m_UseAutoMass: 0 - m_Mass: 1 + m_Mass: 0.5 m_LinearDamping: 0 m_AngularDamping: 0.05 m_GravityScale: 1 @@ -137,7 +137,7 @@ Rigidbody2D: m_Interpolate: 0 m_SleepingMode: 1 m_CollisionDetection: 0 - m_Constraints: 0 + m_Constraints: 4 --- !u!95 &7285218563850982413 Animator: serializedVersion: 7 diff --git a/Assets/Resources/Example/Platformer/Characters/Player/PlayerPlatformer.controller b/Assets/Resources/Example/Platformer/Characters/Player/PlayerPlatformer.controller index e733bd9..efbbf01 100644 --- a/Assets/Resources/Example/Platformer/Characters/Player/PlayerPlatformer.controller +++ b/Assets/Resources/Example/Platformer/Characters/Player/PlayerPlatformer.controller @@ -177,7 +177,7 @@ AnimatorStateTransition: m_Name: m_Conditions: - m_ConditionMode: 1 - m_ConditionEvent: Attacking + m_ConditionEvent: OnAttack m_EventTreshold: 0 m_DstStateMachine: {fileID: 0} m_DstState: {fileID: 829475626526463519} @@ -253,7 +253,7 @@ AnimatorController: m_DefaultInt: 0 m_DefaultBool: 0 m_Controller: {fileID: 9100000} - - m_Name: Attacking + - m_Name: OnAttack m_Type: 4 m_DefaultFloat: 0 m_DefaultInt: 0 diff --git a/Assets/Resources_moved/Example/Platformer/Boar.prefab b/Assets/Resources_moved/Example/Platformer/Boar.prefab index b82b0d6..2735661 100644 --- a/Assets/Resources_moved/Example/Platformer/Boar.prefab +++ b/Assets/Resources_moved/Example/Platformer/Boar.prefab @@ -63,7 +63,7 @@ BoxCollider2D: m_CallbackLayers: serializedVersion: 2 m_Bits: 4294967295 - m_IsTrigger: 0 + m_IsTrigger: 1 m_UsedByEffector: 0 m_CompositeOperation: 0 m_CompositeOrder: 0 @@ -246,7 +246,7 @@ Rigidbody2D: m_Simulated: 1 m_UseFullKinematicContacts: 0 m_UseAutoMass: 1 - m_Mass: 0.861575 + m_Mass: 0.105875 m_LinearDamping: 0 m_AngularDamping: 0.05 m_GravityScale: 1 @@ -298,7 +298,6 @@ MonoBehaviour: rigidbody2D: {fileID: 8711850399479606103} animator: {fileID: -3155582984912602300} spriteRenderer: {fileID: 7973072655843182893} - groundPoint: {x: 0, y: 0} - groundLeft: {x: 0, y: 0} - groundRight: {x: 0, y: 0} - _directionRight: 0 + groundPoint: {x: 0, y: -0.4} + groundLeft: {x: -0.3, y: -0.4} + groundRight: {x: 0.3, y: -0.4} diff --git a/Assets/Resources_moved/ScenesAssetReferences.asset b/Assets/Resources_moved/Example/Platformer/Configs/LayerMasks/Enemies.asset similarity index 54% rename from Assets/Resources_moved/ScenesAssetReferences.asset rename to Assets/Resources_moved/Example/Platformer/Configs/LayerMasks/Enemies.asset index f2475b5..4eaeae3 100644 --- a/Assets/Resources_moved/ScenesAssetReferences.asset +++ b/Assets/Resources_moved/Example/Platformer/Configs/LayerMasks/Enemies.asset @@ -9,12 +9,10 @@ MonoBehaviour: m_GameObject: {fileID: 0} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 9759979f397044a5bcb03ded0d1c9561, type: 3} - m_Name: ScenesAssetReferences - m_EditorClassIdentifier: Assembly-CSharp::Code.Infrastructure.SceneLoader.ScenesAssetReferences - gameplaySceneReference: - m_AssetGUID: - m_SubObjectName: - m_SubObjectType: - m_SubObjectGUID: - m_EditorAssetChanged: 0 + m_Script: {fileID: 11500000, guid: 614273355800ddbe584d9d7404b5a234, type: 3} + m_Name: Enemies + m_EditorClassIdentifier: Assembly-CSharp::Code.Infrastructure.Configs.LayerMasksConfigConfig + mask: + serializedVersion: 2 + m_Bits: 2048 + type: 1 diff --git a/Assets/Resources_moved/ScenesAssetReferences.asset.meta b/Assets/Resources_moved/Example/Platformer/Configs/LayerMasks/Enemies.asset.meta similarity index 79% rename from Assets/Resources_moved/ScenesAssetReferences.asset.meta rename to Assets/Resources_moved/Example/Platformer/Configs/LayerMasks/Enemies.asset.meta index 9acebc6..df6e239 100644 --- a/Assets/Resources_moved/ScenesAssetReferences.asset.meta +++ b/Assets/Resources_moved/Example/Platformer/Configs/LayerMasks/Enemies.asset.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: d54fabdcc748a594aa0551dcd235c7c2 +guid: cc76fd76d78cd364880ebe8330a05834 NativeFormatImporter: externalObjects: {} mainObjectFileID: 11400000 diff --git a/Assets/Resources_moved/DebugClassConfig.asset b/Assets/Resources_moved/Example/Platformer/Configs/LayerMasks/Player.asset similarity index 51% rename from Assets/Resources_moved/DebugClassConfig.asset rename to Assets/Resources_moved/Example/Platformer/Configs/LayerMasks/Player.asset index 109e8b8..da1cd5a 100644 --- a/Assets/Resources_moved/DebugClassConfig.asset +++ b/Assets/Resources_moved/Example/Platformer/Configs/LayerMasks/Player.asset @@ -9,7 +9,10 @@ MonoBehaviour: m_GameObject: {fileID: 0} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 2bdfef8d142a3e1438c89da242d2be2f, type: 3} - m_Name: DebugClassConfig - m_EditorClassIdentifier: Assembly-CSharp::DebugClassConfig - _a: 5 + m_Script: {fileID: 11500000, guid: 614273355800ddbe584d9d7404b5a234, type: 3} + m_Name: Player + m_EditorClassIdentifier: Assembly-CSharp::Code.Infrastructure.Configs.LayerMasksConfigConfig + mask: + serializedVersion: 2 + m_Bits: 1024 + type: 2 diff --git a/Assets/Resources_moved/DebugClassConfig.asset.meta b/Assets/Resources_moved/Example/Platformer/Configs/LayerMasks/Player.asset.meta similarity index 79% rename from Assets/Resources_moved/DebugClassConfig.asset.meta rename to Assets/Resources_moved/Example/Platformer/Configs/LayerMasks/Player.asset.meta index 40a64f6..a506102 100644 --- a/Assets/Resources_moved/DebugClassConfig.asset.meta +++ b/Assets/Resources_moved/Example/Platformer/Configs/LayerMasks/Player.asset.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: a78f552da8f156b469b95652e4b0209d +guid: 69e720c0a88f4f9499af76a887cd9fdf NativeFormatImporter: externalObjects: {} mainObjectFileID: 11400000 diff --git a/Assets/Resources_moved/Example/Platformer/Platformer.unity b/Assets/Resources_moved/Example/Platformer/Platformer.unity index ca72723..428ca90 100644 --- a/Assets/Resources_moved/Example/Platformer/Platformer.unity +++ b/Assets/Resources_moved/Example/Platformer/Platformer.unity @@ -207,6 +207,144 @@ Transform: m_Children: [] m_Father: {fileID: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &321811368 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 321811371} + - component: {fileID: 321811370} + - component: {fileID: 321811369} + m_Layer: 9 + m_Name: Buildings_0 (5) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!61 &321811369 +BoxCollider2D: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 321811368} + m_Enabled: 1 + serializedVersion: 3 + m_Density: 1 + m_Material: {fileID: 0} + m_IncludeLayers: + serializedVersion: 2 + m_Bits: 0 + m_ExcludeLayers: + serializedVersion: 2 + m_Bits: 0 + m_LayerOverridePriority: 0 + m_ForceSendLayers: + serializedVersion: 2 + m_Bits: 4294967295 + m_ForceReceiveLayers: + serializedVersion: 2 + m_Bits: 4294967295 + m_ContactCaptureLayers: + serializedVersion: 2 + m_Bits: 4294967295 + m_CallbackLayers: + serializedVersion: 2 + m_Bits: 4294967295 + m_IsTrigger: 0 + m_UsedByEffector: 0 + m_CompositeOperation: 1 + m_CompositeOrder: 0 + m_Offset: {x: 0, y: 0} + m_SpriteTilingProperty: + border: {x: 0, y: 0, z: 0, w: 0} + pivot: {x: 0.5, y: 0.5} + oldSize: {x: 0.8, y: 0.67} + newSize: {x: 0.8, y: 0.67} + adaptiveTilingThreshold: 0.5 + drawMode: 0 + adaptiveTiling: 0 + m_AutoTiling: 0 + m_Size: {x: 0.8, y: 0.67} + m_EdgeRadius: 0 +--- !u!212 &321811370 +SpriteRenderer: + serializedVersion: 2 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 321811368} + m_Enabled: 1 + m_CastShadows: 0 + m_ReceiveShadows: 0 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 0 + m_RayTraceProcedural: 0 + m_RayTracingAccelStructBuildFlagsOverride: 0 + m_RayTracingAccelStructBuildFlags: 1 + m_SmallMeshCulling: 1 + m_ForceMeshLod: -1 + m_MeshLodSelectionBias: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 9dfc825aed78fcd4ba02077103263b40, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 0 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_GlobalIlluminationMeshLod: 0 + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_MaskInteraction: 0 + m_Sprite: {fileID: -1902027194, guid: 6b7c943308e1fcdd5b986969ed12d0ae, type: 3} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_FlipX: 0 + m_FlipY: 0 + m_DrawMode: 0 + m_Size: {x: 0.8, y: 0.67} + m_AdaptiveModeThreshold: 0.5 + m_SpriteTileMode: 0 + m_WasSpriteAssigned: 1 + m_SpriteSortPoint: 0 +--- !u!4 &321811371 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 321811368} + serializedVersion: 2 + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 1.584, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 595108274} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1 &494311809 GameObject: m_ObjectHideFlags: 0 @@ -218,8 +356,6 @@ GameObject: - component: {fileID: 494311810} - component: {fileID: 494311812} - component: {fileID: 494311811} - - component: {fileID: 494311814} - - component: {fileID: 494311813} m_Layer: 9 m_Name: Buildings_0 (3) m_TagString: Untagged @@ -347,13 +483,52 @@ SpriteRenderer: m_SpriteTileMode: 0 m_WasSpriteAssigned: 1 m_SpriteSortPoint: 0 ---- !u!66 &494311813 +--- !u!1 &595108273 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 595108274} + - component: {fileID: 595108276} + - component: {fileID: 595108275} + m_Layer: 9 + m_Name: Location + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &595108274 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 595108273} + serializedVersion: 2 + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 1.707, y: -0.802, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 1237014523} + - {fileID: 494311810} + - {fileID: 1947090012} + - {fileID: 2009006007} + - {fileID: 2086297240} + - {fileID: 321811371} + m_Father: {fileID: 0} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!66 &595108275 CompositeCollider2D: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 494311809} + m_GameObject: {fileID: 595108273} m_Enabled: 1 serializedVersion: 3 m_Density: 1 @@ -382,39 +557,89 @@ CompositeCollider2D: m_CompositeOperation: 0 m_CompositeOrder: 0 m_Offset: {x: 0, y: 0} - m_GeometryType: 0 + m_GeometryType: 1 m_GenerationType: 0 m_EdgeRadius: 0 m_ColliderPaths: + - m_Collider: {fileID: 1237014524} + m_ColliderPaths: + - - X: -12090000 + Y: 3350000 + - X: -20090000 + Y: 3350000 + - X: -20090000 + Y: -3350000 + - X: -12090000 + Y: -3350000 - m_Collider: {fileID: 494311811} m_ColliderPaths: - - - X: 4000000 + - - X: -20070000 Y: 3350000 - - X: -4000000 + - X: -28070002 Y: 3350000 - - X: -4000000 + - X: -28070002 Y: -3350000 - - X: 4000000 + - X: -20070000 + Y: -3350000 + - m_Collider: {fileID: 1947090010} + m_ColliderPaths: + - - X: -4100000 + Y: 3350000 + - X: -12100000 + Y: 3350000 + - X: -12100000 + Y: -3350000 + - X: -4100000 + Y: -3350000 + - m_Collider: {fileID: 2009006005} + m_ColliderPaths: + - - X: 11850001 + Y: 3350000 + - X: 3850000 + Y: 3350000 + - X: 3850000 + Y: -3350000 + - X: 11850001 + Y: -3350000 + - m_Collider: {fileID: 2086297238} + m_ColliderPaths: + - - X: 3889999 + Y: 3350000 + - X: -4110000 + Y: 3350000 + - X: -4110000 + Y: -3350000 + - X: 3889999 + Y: -3350000 + - m_Collider: {fileID: 321811369} + m_ColliderPaths: + - - X: 19839998 + Y: 3350000 + - X: 11839999 + Y: 3350000 + - X: 11839999 + Y: -3350000 + - X: 19839998 Y: -3350000 m_CompositePaths: m_Paths: - - - {x: 0.3999707, y: -0.335} - - {x: 0.3999707, y: 0.335} - - {x: -0.4, y: 0.3349707} - - {x: -0.3999707, y: -0.335} + - - {x: -2.8070002, y: -0.335} + - {x: 1.9839998, y: -0.335} + - {x: 1.9839998, y: 0.335} + - {x: -2.8070002, y: 0.335} m_VertexDistance: 0.0005 - m_OffsetDistance: 0.00005 + m_OffsetDistance: 0 m_UseDelaunayMesh: 0 - m_CompositeGameObject: {fileID: 494311809} ---- !u!50 &494311814 + m_CompositeGameObject: {fileID: 595108273} +--- !u!50 &595108276 Rigidbody2D: serializedVersion: 5 m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 494311809} - m_BodyType: 0 + m_GameObject: {fileID: 595108273} + m_BodyType: 2 m_Simulated: 1 m_UseFullKinematicContacts: 0 m_UseAutoMass: 0 @@ -433,41 +658,6 @@ Rigidbody2D: m_SleepingMode: 1 m_CollisionDetection: 0 m_Constraints: 0 ---- !u!1 &595108273 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 595108274} - m_Layer: 0 - m_Name: Location - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &595108274 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 595108273} - serializedVersion: 2 - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 1.707, y: -0.802, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: - - {fileID: 1237014523} - - {fileID: 494311810} - - {fileID: 1947090012} - - {fileID: 2086297240} - m_Father: {fileID: 0} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1 &1237014521 GameObject: m_ObjectHideFlags: 0 @@ -592,7 +782,7 @@ BoxCollider2D: m_Bits: 4294967295 m_IsTrigger: 0 m_UsedByEffector: 0 - m_CompositeOperation: 0 + m_CompositeOperation: 1 m_CompositeOrder: 0 m_Offset: {x: 0, y: 0} m_SpriteTilingProperty: @@ -778,7 +968,7 @@ BoxCollider2D: m_Bits: 4294967295 m_IsTrigger: 0 m_UsedByEffector: 0 - m_CompositeOperation: 0 + m_CompositeOperation: 1 m_CompositeOrder: 0 m_Offset: {x: 0, y: 0} m_SpriteTilingProperty: @@ -866,6 +1056,144 @@ Transform: m_Children: [] m_Father: {fileID: 595108274} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &2009006004 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 2009006007} + - component: {fileID: 2009006006} + - component: {fileID: 2009006005} + m_Layer: 9 + m_Name: Buildings_0 (4) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!61 &2009006005 +BoxCollider2D: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2009006004} + m_Enabled: 1 + serializedVersion: 3 + m_Density: 1 + m_Material: {fileID: 0} + m_IncludeLayers: + serializedVersion: 2 + m_Bits: 0 + m_ExcludeLayers: + serializedVersion: 2 + m_Bits: 0 + m_LayerOverridePriority: 0 + m_ForceSendLayers: + serializedVersion: 2 + m_Bits: 4294967295 + m_ForceReceiveLayers: + serializedVersion: 2 + m_Bits: 4294967295 + m_ContactCaptureLayers: + serializedVersion: 2 + m_Bits: 4294967295 + m_CallbackLayers: + serializedVersion: 2 + m_Bits: 4294967295 + m_IsTrigger: 0 + m_UsedByEffector: 0 + m_CompositeOperation: 1 + m_CompositeOrder: 0 + m_Offset: {x: 0, y: 0} + m_SpriteTilingProperty: + border: {x: 0, y: 0, z: 0, w: 0} + pivot: {x: 0.5, y: 0.5} + oldSize: {x: 0.8, y: 0.67} + newSize: {x: 0.8, y: 0.67} + adaptiveTilingThreshold: 0.5 + drawMode: 0 + adaptiveTiling: 0 + m_AutoTiling: 0 + m_Size: {x: 0.8, y: 0.67} + m_EdgeRadius: 0 +--- !u!212 &2009006006 +SpriteRenderer: + serializedVersion: 2 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2009006004} + m_Enabled: 1 + m_CastShadows: 0 + m_ReceiveShadows: 0 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 0 + m_RayTraceProcedural: 0 + m_RayTracingAccelStructBuildFlagsOverride: 0 + m_RayTracingAccelStructBuildFlags: 1 + m_SmallMeshCulling: 1 + m_ForceMeshLod: -1 + m_MeshLodSelectionBias: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 9dfc825aed78fcd4ba02077103263b40, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 0 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_GlobalIlluminationMeshLod: 0 + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_MaskInteraction: 0 + m_Sprite: {fileID: -1902027194, guid: 6b7c943308e1fcdd5b986969ed12d0ae, type: 3} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_FlipX: 0 + m_FlipY: 0 + m_DrawMode: 0 + m_Size: {x: 0.8, y: 0.67} + m_AdaptiveModeThreshold: 0.5 + m_SpriteTileMode: 0 + m_WasSpriteAssigned: 1 + m_SpriteSortPoint: 0 +--- !u!4 &2009006007 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2009006004} + serializedVersion: 2 + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0.785, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 595108274} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1 &2086297237 GameObject: m_ObjectHideFlags: 0 @@ -916,7 +1244,7 @@ BoxCollider2D: m_Bits: 4294967295 m_IsTrigger: 0 m_UsedByEffector: 0 - m_CompositeOperation: 0 + m_CompositeOperation: 1 m_CompositeOrder: 0 m_Offset: {x: 0, y: 0} m_SpriteTilingProperty: @@ -1016,18 +1344,6 @@ PrefabInstance: propertyPath: m_Name value: Player objectReference: {fileID: 0} - - target: {fileID: 454703662689100337, guid: 234ab51636edcbab88dbadfdb7fbfe65, type: 3} - propertyPath: m_Layer - value: 10 - objectReference: {fileID: 0} - - target: {fileID: 6786408946074889384, guid: 234ab51636edcbab88dbadfdb7fbfe65, type: 3} - propertyPath: m_Mass - value: 0.5 - objectReference: {fileID: 0} - - target: {fileID: 6786408946074889384, guid: 234ab51636edcbab88dbadfdb7fbfe65, type: 3} - propertyPath: m_Constraints - value: 4 - objectReference: {fileID: 0} - target: {fileID: 8736793596959961972, guid: 234ab51636edcbab88dbadfdb7fbfe65, type: 3} propertyPath: m_LocalPosition.x value: 0.07 @@ -1133,10 +1449,6 @@ PrefabInstance: propertyPath: 'partolPoints.Array.data[1]' value: objectReference: {fileID: 1369074043} - - target: {fileID: 8927136534498308671, guid: 0eb645a0c96b1c437bf0712d6b856b7c, type: 3} - propertyPath: m_Simulated - value: 0 - objectReference: {fileID: 0} m_RemovedComponents: [] m_RemovedGameObjects: [] m_AddedGameObjects: [] @@ -1194,26 +1506,6 @@ PrefabInstance: propertyPath: m_Name value: Boar objectReference: {fileID: 0} - - target: {fileID: 5713908768014139622, guid: d0a994964f42e0c0dad3da32f7b52c90, type: 3} - propertyPath: groundLeft.x - value: -0.3 - objectReference: {fileID: 0} - - target: {fileID: 5713908768014139622, guid: d0a994964f42e0c0dad3da32f7b52c90, type: 3} - propertyPath: groundLeft.y - value: -0.4 - objectReference: {fileID: 0} - - target: {fileID: 5713908768014139622, guid: d0a994964f42e0c0dad3da32f7b52c90, type: 3} - propertyPath: groundPoint.y - value: -0.4 - objectReference: {fileID: 0} - - target: {fileID: 5713908768014139622, guid: d0a994964f42e0c0dad3da32f7b52c90, type: 3} - propertyPath: groundRight.x - value: 0.3 - objectReference: {fileID: 0} - - target: {fileID: 5713908768014139622, guid: d0a994964f42e0c0dad3da32f7b52c90, type: 3} - propertyPath: groundRight.y - value: -0.4 - objectReference: {fileID: 0} m_RemovedComponents: [] m_RemovedGameObjects: [] m_AddedGameObjects: [] @@ -1231,17 +1523,13 @@ PrefabInstance: propertyPath: m_Name value: Snail objectReference: {fileID: 0} - - target: {fileID: 2523079170963062473, guid: 77a268730c52ad461920f3459fdda1a0, type: 3} - propertyPath: m_Layer - value: 11 - objectReference: {fileID: 0} - target: {fileID: 4330041015761084350, guid: 77a268730c52ad461920f3459fdda1a0, type: 3} propertyPath: m_LocalPosition.x value: -0.346 objectReference: {fileID: 0} - target: {fileID: 4330041015761084350, guid: 77a268730c52ad461920f3459fdda1a0, type: 3} propertyPath: m_LocalPosition.y - value: -0.292 + value: -0.306 objectReference: {fileID: 0} - target: {fileID: 4330041015761084350, guid: 77a268730c52ad461920f3459fdda1a0, type: 3} propertyPath: m_LocalPosition.z @@ -1276,60 +1564,14 @@ PrefabInstance: value: 0 objectReference: {fileID: 0} - target: {fileID: 6897803134956731688, guid: 77a268730c52ad461920f3459fdda1a0, type: 3} - propertyPath: m_Mass - value: 0.1 - objectReference: {fileID: 0} - - target: {fileID: 6897803134956731688, guid: 77a268730c52ad461920f3459fdda1a0, type: 3} - propertyPath: m_Simulated + propertyPath: m_CollisionDetection value: 1 objectReference: {fileID: 0} m_RemovedComponents: [] m_RemovedGameObjects: [] m_AddedGameObjects: [] - m_AddedComponents: - - targetCorrespondingSourceObject: {fileID: 2523079170963062473, guid: 77a268730c52ad461920f3459fdda1a0, type: 3} - insertIndex: -1 - addedObject: {fileID: 7850265554012673611} + m_AddedComponents: [] m_SourcePrefab: {fileID: 100100000, guid: 77a268730c52ad461920f3459fdda1a0, type: 3} ---- !u!1 &7850265554012673607 stripped -GameObject: - m_CorrespondingSourceObject: {fileID: 2523079170963062473, guid: 77a268730c52ad461920f3459fdda1a0, type: 3} - m_PrefabInstance: {fileID: 7850265554012673606} - m_PrefabAsset: {fileID: 0} ---- !u!95 &7850265554012673608 stripped -Animator: - m_CorrespondingSourceObject: {fileID: 958628273609526838, guid: 77a268730c52ad461920f3459fdda1a0, type: 3} - m_PrefabInstance: {fileID: 7850265554012673606} - m_PrefabAsset: {fileID: 0} ---- !u!50 &7850265554012673609 stripped -Rigidbody2D: - m_CorrespondingSourceObject: {fileID: 6897803134956731688, guid: 77a268730c52ad461920f3459fdda1a0, type: 3} - m_PrefabInstance: {fileID: 7850265554012673606} - m_PrefabAsset: {fileID: 0} ---- !u!212 &7850265554012673610 stripped -SpriteRenderer: - m_CorrespondingSourceObject: {fileID: 200530768292093389, guid: 77a268730c52ad461920f3459fdda1a0, type: 3} - m_PrefabInstance: {fileID: 7850265554012673606} - m_PrefabAsset: {fileID: 0} ---- !u!114 &7850265554012673611 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 7850265554012673607} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 4bb753139de944f69f426cbc1ec9ec92, type: 3} - m_Name: - m_EditorClassIdentifier: Assembly-CSharp::Code.Example.Platformer.Entity.Enemies.Snail - rigidbody2D: {fileID: 7850265554012673609} - animator: {fileID: 7850265554012673608} - spriteRenderer: {fileID: 7850265554012673610} - groundPoint: {x: 0, y: -0.2} - groundLeft: {x: -0.3, y: -0.2} - groundRight: {x: 0.3, y: -0.2} - _directionRight: 1 --- !u!1660057539 &9223372036854775807 SceneRoots: m_ObjectHideFlags: 0 diff --git a/Assets/Resources_moved/Example/Platformer/Snail.prefab b/Assets/Resources_moved/Example/Platformer/Snail.prefab index 3a71398..df3a9cf 100644 --- a/Assets/Resources_moved/Example/Platformer/Snail.prefab +++ b/Assets/Resources_moved/Example/Platformer/Snail.prefab @@ -13,7 +13,8 @@ GameObject: - component: {fileID: 6713950355016476722} - component: {fileID: 6897803134956731688} - component: {fileID: 958628273609526838} - m_Layer: 0 + - component: {fileID: 3604994681784900202} + m_Layer: 11 m_Name: Snail m_TagString: Untagged m_Icon: {fileID: 0} @@ -152,7 +153,7 @@ Rigidbody2D: m_Simulated: 1 m_UseFullKinematicContacts: 0 m_UseAutoMass: 0 - m_Mass: 0.064399995 + m_Mass: 0.1 m_LinearDamping: 0 m_AngularDamping: 0.05 m_GravityScale: 1 @@ -189,3 +190,22 @@ Animator: m_AllowConstantClipSamplingOptimization: 1 m_KeepAnimatorStateOnDisable: 0 m_WriteDefaultValuesOnDisable: 0 +--- !u!114 &3604994681784900202 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2523079170963062473} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 4bb753139de944f69f426cbc1ec9ec92, type: 3} + m_Name: + m_EditorClassIdentifier: Assembly-CSharp::Code.Example.Platformer.Entity.Enemies.Snail + rigidbody2D: {fileID: 6897803134956731688} + animator: {fileID: 958628273609526838} + spriteRenderer: {fileID: 200530768292093389} + groundPoint: {x: 0, y: -0.2} + groundLeft: {x: -0.3, y: -0.2} + groundRight: {x: 0.3, y: -0.2} + _directionRight: 1 diff --git a/Assets/UnityCodeGen.Generated/Code.Example.Race.UI.PlayerScoreCounterEvents.Generated.cs b/Assets/UnityCodeGen.Generated/Code.Example.Race.UI.PlayerScoreCounterEvents.Generated.cs new file mode 100644 index 0000000..2cc00d9 --- /dev/null +++ b/Assets/UnityCodeGen.Generated/Code.Example.Race.UI.PlayerScoreCounterEvents.Generated.cs @@ -0,0 +1,38 @@ + + +// retard-generated + +using Code.Infrastructure.EventBus; +using Code.Infrastructure.StateMachine; +using Code.Infrastructure.UI; + +namespace Code.Example.Race.UI +{ + public partial class PlayerScoreCounter + { + + public override void FireCreatedEvent() + { + _eventBus.RaiseEvent(h => h.PlayerScoreCounterCreated(this)); + } + + public override void FireRemovedEvent() + { + _eventBus.RaiseEvent(h => h.PlayerScoreCounterRemoved()); + } + + } + + + + public interface IPlayerScoreCounterCreatedHandle : IGlobalSubscriber + { + void PlayerScoreCounterCreated(UIPanel panel); + } + + public interface IPlayerScoreCounterRemovedHandle : IGlobalSubscriber + { + void PlayerScoreCounterRemoved(); + } + +} diff --git a/Assets/UnityCodeGen.Generated/Code.Example.Race.UI.PlayerScoreCounterEvents.Generated.cs.meta b/Assets/UnityCodeGen.Generated/Code.Example.Race.UI.PlayerScoreCounterEvents.Generated.cs.meta new file mode 100644 index 0000000..0d1a9bc --- /dev/null +++ b/Assets/UnityCodeGen.Generated/Code.Example.Race.UI.PlayerScoreCounterEvents.Generated.cs.meta @@ -0,0 +1,2 @@ +fileFormatVersion: 2 +guid: 3e7bcd1ea1d0c9d409ebc2fbfb7bcbda \ No newline at end of file diff --git a/Assets/UnityCodeGen.Generated/Code.Example.Race.UI.PlayerScoresEvents.Generated.cs b/Assets/UnityCodeGen.Generated/Code.Example.Race.UI.PlayerScoresEvents.Generated.cs new file mode 100644 index 0000000..f7eaa63 --- /dev/null +++ b/Assets/UnityCodeGen.Generated/Code.Example.Race.UI.PlayerScoresEvents.Generated.cs @@ -0,0 +1,38 @@ + + +// retard-generated + +using Code.Infrastructure.EventBus; +using Code.Infrastructure.StateMachine; +using Code.Infrastructure.UI; + +namespace Code.Example.Race.UI +{ + public partial class PlayerScores + { + + public override void FireCreatedEvent() + { + _eventBus.RaiseEvent(h => h.PlayerScoresCreated(this)); + } + + public override void FireRemovedEvent() + { + _eventBus.RaiseEvent(h => h.PlayerScoresRemoved()); + } + + } + + + + public interface IPlayerScoresCreatedHandle : IGlobalSubscriber + { + void PlayerScoresCreated(UIPanel panel); + } + + public interface IPlayerScoresRemovedHandle : IGlobalSubscriber + { + void PlayerScoresRemoved(); + } + +} diff --git a/Assets/UnityCodeGen.Generated/Code.Example.Race.UI.PlayerScoresEvents.Generated.cs.meta b/Assets/UnityCodeGen.Generated/Code.Example.Race.UI.PlayerScoresEvents.Generated.cs.meta new file mode 100644 index 0000000..c8ca09d --- /dev/null +++ b/Assets/UnityCodeGen.Generated/Code.Example.Race.UI.PlayerScoresEvents.Generated.cs.meta @@ -0,0 +1,2 @@ +fileFormatVersion: 2 +guid: ed4ee430bfb443e45888c6b7c8d9737a \ No newline at end of file diff --git a/Assets/UnityCodeGen.Generated/Code.Example.Race.UI.WinScreenEvents.Generated.cs b/Assets/UnityCodeGen.Generated/Code.Example.Race.UI.WinScreenEvents.Generated.cs new file mode 100644 index 0000000..24559fd --- /dev/null +++ b/Assets/UnityCodeGen.Generated/Code.Example.Race.UI.WinScreenEvents.Generated.cs @@ -0,0 +1,38 @@ + + +// retard-generated + +using Code.Infrastructure.UI; +using Code.Infrastructure.EventBus; +using Code.Infrastructure.StateMachine; + +namespace Code.Example.Race.UI +{ + public partial class WinScreen + { + + public override void FireCreatedEvent() + { + _eventBus.RaiseEvent(h => h.WinScreenCreated(this)); + } + + public override void FireRemovedEvent() + { + _eventBus.RaiseEvent(h => h.WinScreenRemoved()); + } + + } + + + + public interface IWinScreenCreatedHandle : IGlobalSubscriber + { + void WinScreenCreated(UIPanel panel); + } + + public interface IWinScreenRemovedHandle : IGlobalSubscriber + { + void WinScreenRemoved(); + } + +} diff --git a/Assets/UnityCodeGen.Generated/Code.Example.Race.UI.WinScreenEvents.Generated.cs.meta b/Assets/UnityCodeGen.Generated/Code.Example.Race.UI.WinScreenEvents.Generated.cs.meta new file mode 100644 index 0000000..9342514 --- /dev/null +++ b/Assets/UnityCodeGen.Generated/Code.Example.Race.UI.WinScreenEvents.Generated.cs.meta @@ -0,0 +1,2 @@ +fileFormatVersion: 2 +guid: 316bf9eb00546714d8ae3e96b0f563f7 \ No newline at end of file diff --git a/Assets/UnityCodeGen.Generated/Code.Infrastructure.App.AppStateMachine.Generated.cs b/Assets/UnityCodeGen.Generated/Code.Infrastructure.App.AppStateMachine.Generated.cs index 37d18c2..41d3e69 100644 --- a/Assets/UnityCodeGen.Generated/Code.Infrastructure.App.AppStateMachine.Generated.cs +++ b/Assets/UnityCodeGen.Generated/Code.Infrastructure.App.AppStateMachine.Generated.cs @@ -5,10 +5,10 @@ using Code.Infrastructure.StateMachine; using Code.Infrastructure.App.States; -using Code.Infrastructure.App.States; - using Code.Example.Platformer; +using Code.Infrastructure.App.States; + using Code.Infrastructure.App.States; #pragma warning restore CS0105 @@ -21,18 +21,18 @@ public partial class AppStateMachine : AbstractStateMachine AllowedStates.HasFlag(nextState); diff --git a/Assets/UnityCodeGen.Generated/Code.Infrastructure.Camera.CameraStateMachine.Generated.cs b/Assets/UnityCodeGen.Generated/Code.Infrastructure.Camera.CameraStateMachine.Generated.cs index e674824..5bf2b20 100644 --- a/Assets/UnityCodeGen.Generated/Code.Infrastructure.Camera.CameraStateMachine.Generated.cs +++ b/Assets/UnityCodeGen.Generated/Code.Infrastructure.Camera.CameraStateMachine.Generated.cs @@ -17,12 +17,12 @@ public partial class CameraStateMachine : AbstractStateMachine AllowedStates.HasFlag(nextState); diff --git a/Assets/UnityCodeGen.Generated/Code.Infrastructure.UI.Panels.LoadingPanelEvents.Generated.cs b/Assets/UnityCodeGen.Generated/Code.Infrastructure.UI.Panels.LoadingPanelEvents.Generated.cs new file mode 100644 index 0000000..04fe8e8 --- /dev/null +++ b/Assets/UnityCodeGen.Generated/Code.Infrastructure.UI.Panels.LoadingPanelEvents.Generated.cs @@ -0,0 +1,37 @@ + + +// retard-generated + +using Code.Infrastructure.EventBus; +using Code.Infrastructure.StateMachine; + +namespace Code.Infrastructure.UI.Panels +{ + public partial class LoadingPanel + { + + public override void FireCreatedEvent() + { + _eventBus.RaiseEvent(h => h.LoadingPanelCreated(this)); + } + + public override void FireRemovedEvent() + { + _eventBus.RaiseEvent(h => h.LoadingPanelRemoved()); + } + + } + + + + public interface ILoadingPanelCreatedHandle : IGlobalSubscriber + { + void LoadingPanelCreated(UIPanel panel); + } + + public interface ILoadingPanelRemovedHandle : IGlobalSubscriber + { + void LoadingPanelRemoved(); + } + +} diff --git a/Assets/UnityCodeGen.Generated/Code.Infrastructure.UI.Panels.LoadingPanelEvents.Generated.cs.meta b/Assets/UnityCodeGen.Generated/Code.Infrastructure.UI.Panels.LoadingPanelEvents.Generated.cs.meta new file mode 100644 index 0000000..7137726 --- /dev/null +++ b/Assets/UnityCodeGen.Generated/Code.Infrastructure.UI.Panels.LoadingPanelEvents.Generated.cs.meta @@ -0,0 +1,2 @@ +fileFormatVersion: 2 +guid: 366a0dfcffa8af64a9692870e278d0ff \ No newline at end of file diff --git a/Assets/UnityCodeGen.Generated/Code.Infrastructure.UI.Panels.LogoPanelEvents.Generated.cs b/Assets/UnityCodeGen.Generated/Code.Infrastructure.UI.Panels.LogoPanelEvents.Generated.cs new file mode 100644 index 0000000..0003c70 --- /dev/null +++ b/Assets/UnityCodeGen.Generated/Code.Infrastructure.UI.Panels.LogoPanelEvents.Generated.cs @@ -0,0 +1,37 @@ + + +// retard-generated + +using Code.Infrastructure.EventBus; +using Code.Infrastructure.StateMachine; + +namespace Code.Infrastructure.UI.Panels +{ + public partial class LogoPanel + { + + public override void FireCreatedEvent() + { + _eventBus.RaiseEvent(h => h.LogoPanelCreated(this)); + } + + public override void FireRemovedEvent() + { + _eventBus.RaiseEvent(h => h.LogoPanelRemoved()); + } + + } + + + + public interface ILogoPanelCreatedHandle : IGlobalSubscriber + { + void LogoPanelCreated(UIPanel panel); + } + + public interface ILogoPanelRemovedHandle : IGlobalSubscriber + { + void LogoPanelRemoved(); + } + +} diff --git a/Assets/UnityCodeGen.Generated/Code.Infrastructure.UI.Panels.LogoPanelEvents.Generated.cs.meta b/Assets/UnityCodeGen.Generated/Code.Infrastructure.UI.Panels.LogoPanelEvents.Generated.cs.meta new file mode 100644 index 0000000..fb4861e --- /dev/null +++ b/Assets/UnityCodeGen.Generated/Code.Infrastructure.UI.Panels.LogoPanelEvents.Generated.cs.meta @@ -0,0 +1,2 @@ +fileFormatVersion: 2 +guid: c5614b342dee1c34cb8a1f79905cdb24 \ No newline at end of file diff --git a/Assets/UnityCodeGen.Generated/Code.Infrastructure.UI.Panels.MenuChoosePanelEvents.Generated.cs b/Assets/UnityCodeGen.Generated/Code.Infrastructure.UI.Panels.MenuChoosePanelEvents.Generated.cs new file mode 100644 index 0000000..0cbbd8c --- /dev/null +++ b/Assets/UnityCodeGen.Generated/Code.Infrastructure.UI.Panels.MenuChoosePanelEvents.Generated.cs @@ -0,0 +1,37 @@ + + +// retard-generated + +using Code.Infrastructure.EventBus; +using Code.Infrastructure.StateMachine; + +namespace Code.Infrastructure.UI.Panels +{ + public partial class MenuChoosePanel + { + + public override void FireCreatedEvent() + { + _eventBus.RaiseEvent(h => h.MenuChoosePanelCreated(this)); + } + + public override void FireRemovedEvent() + { + _eventBus.RaiseEvent(h => h.MenuChoosePanelRemoved()); + } + + } + + + + public interface IMenuChoosePanelCreatedHandle : IGlobalSubscriber + { + void MenuChoosePanelCreated(UIPanel panel); + } + + public interface IMenuChoosePanelRemovedHandle : IGlobalSubscriber + { + void MenuChoosePanelRemoved(); + } + +} diff --git a/Assets/UnityCodeGen.Generated/Code.Infrastructure.UI.Panels.MenuChoosePanelEvents.Generated.cs.meta b/Assets/UnityCodeGen.Generated/Code.Infrastructure.UI.Panels.MenuChoosePanelEvents.Generated.cs.meta new file mode 100644 index 0000000..b484a27 --- /dev/null +++ b/Assets/UnityCodeGen.Generated/Code.Infrastructure.UI.Panels.MenuChoosePanelEvents.Generated.cs.meta @@ -0,0 +1,2 @@ +fileFormatVersion: 2 +guid: a8d4139d7ff2ab94e94b856369f4e30a \ No newline at end of file diff --git a/Assets/UnityCodeGen.Generated/ConfigLocator.Generated.cs b/Assets/UnityCodeGen.Generated/ConfigLocator.Generated.cs index 58ba814..f518479 100644 --- a/Assets/UnityCodeGen.Generated/ConfigLocator.Generated.cs +++ b/Assets/UnityCodeGen.Generated/ConfigLocator.Generated.cs @@ -1,18 +1,18 @@ #pragma warning disable CS0105 - using Code.Example.Race.Racer; -using Code.Infrastructure.Camera; -using Code.Infrastructure.Configs; -using Code.Infrastructure.Audio; -using Code.Infrastructure.Camera; -using Code.Infrastructure.UI; -using Code.Infrastructure.UI; + using Code.Infrastructure.Audio; 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 Code.Infrastructure.UI; +using Code.Example.Platformer.Entity; +using Code.Infrastructure.Configs; +using Code.Example.Race.Racer; +using Code.Infrastructure.Camera; +using Code.Infrastructure.Audio; +using Code.Infrastructure.Audio; +using Code.Infrastructure.UI; +using Code.Infrastructure.Camera; using UnityEngine; #pragma warning restore CS0105 @@ -26,32 +26,32 @@ using Code.Infrastructure.Input; { SystemConfigsReferences systemConfigsReferences = Resources.Load("SystemConfigsReferences"); - _multipleConfigReferences.Add(typeof(Code.Example.Race.Racer.RacerSettingsConfig), systemConfigsReferences.RacerSettings); - - _multipleConfigReferences.Add(typeof(Code.Infrastructure.Camera.CameraSettingsConfig), systemConfigsReferences.CameraSettings); - - _multipleConfigReferences.Add(typeof(Code.Infrastructure.Configs.LayerMasksConfigConfig), systemConfigsReferences.LayerMasksConfig); - - _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.Audio.AudioSourceSettingsConfig), systemConfigsReferences.AudioSourceSettings); _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); + _multipleConfigReferences.Add(typeof(Code.Infrastructure.UI.UIPanelSettingsConfig), systemConfigsReferences.UIPanelSettings); + + _multipleConfigReferences.Add(typeof(Code.Example.Platformer.Entity.PlatformerEntitySettingsConfig), systemConfigsReferences.PlatformerEnemySettings); + + _multipleConfigReferences.Add(typeof(Code.Infrastructure.Configs.LayerMasksConfigConfig), systemConfigsReferences.LayerMasksConfig); + + _multipleConfigReferences.Add(typeof(Code.Example.Race.Racer.RacerSettingsConfig), systemConfigsReferences.RacerSettings); + + _singleConfigReferences.Add(typeof(Code.Infrastructure.Camera.GameCameraConfig), systemConfigsReferences.GameCamera); + + _multipleConfigReferences.Add(typeof(Code.Infrastructure.Audio.AudioInfoConfig), systemConfigsReferences.AudioInfo); + + _singleConfigReferences.Add(typeof(Code.Infrastructure.Audio.AudioSourcePrefabConfig), systemConfigsReferences.AudioSourcePrefab); + + _singleConfigReferences.Add(typeof(Code.Infrastructure.UI.CanvasSettingsConfig), systemConfigsReferences.CanvasSettings); + + _multipleConfigReferences.Add(typeof(Code.Infrastructure.Camera.CameraSettingsConfig), systemConfigsReferences.CameraSettings); + //_singleConfigReferences.Add(typeof(ScenesAssetReferences), systemConfigsReferences.scenesAssetReferences); } } diff --git a/Assets/UnityCodeGen.Generated/PlatformerEnemySettingsConfig.Generated.cs b/Assets/UnityCodeGen.Generated/PlatformerEnemySettingsConfig.Generated.cs index 1b3e3d2..45be4a1 100644 --- a/Assets/UnityCodeGen.Generated/PlatformerEnemySettingsConfig.Generated.cs +++ b/Assets/UnityCodeGen.Generated/PlatformerEnemySettingsConfig.Generated.cs @@ -9,9 +9,9 @@ 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 class PlatformerEntitySettingsConfig : ScriptableObject { - public Code.Example.Platformer.Entity.PlatformerEnemyData racerData; + public Code.Example.Platformer.Entity.PlatformerEntityData racerData; public UnityEngine.AddressableAssets.AssetReference prefabReference; } diff --git a/Assets/UnityCodeGen.Generated/SystemConfigsReferences.Generated.cs b/Assets/UnityCodeGen.Generated/SystemConfigsReferences.Generated.cs index 6fc3b50..df31afb 100644 --- a/Assets/UnityCodeGen.Generated/SystemConfigsReferences.Generated.cs +++ b/Assets/UnityCodeGen.Generated/SystemConfigsReferences.Generated.cs @@ -1,18 +1,18 @@ #pragma warning disable CS0105 - using Code.Example.Race.Racer; -using Code.Infrastructure.Camera; -using Code.Infrastructure.Configs; -using Code.Infrastructure.Audio; -using Code.Infrastructure.Camera; -using Code.Infrastructure.UI; -using Code.Infrastructure.UI; + using Code.Infrastructure.Audio; 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 Code.Infrastructure.UI; +using Code.Example.Platformer.Entity; +using Code.Infrastructure.Configs; +using Code.Example.Race.Racer; +using Code.Infrastructure.Camera; +using Code.Infrastructure.Audio; +using Code.Infrastructure.Audio; +using Code.Infrastructure.UI; +using Code.Infrastructure.Camera; using UnityEngine.AddressableAssets; #pragma warning restore CS0105 @@ -20,19 +20,19 @@ using Code.Infrastructure.Input; namespace Code.Infrastructure.Configs{ public partial class SystemConfigsReferences { - public string RacerSettings; -public string CameraSettings; -public string LayerMasksConfig; -public AssetReference AudioSourcePrefab; -public AssetReference GameCamera; -public AssetReference CanvasSettings; -public string UIPanelSettings; + public string AudioSourceSettings; public string SceneInfo; -public string AudioInfo; public string VolumeSettings; -public string PlatformerEnemySettings; -public string AudioSourceSettings; public AssetReference InputService; +public string UIPanelSettings; +public string PlatformerEnemySettings; +public string LayerMasksConfig; +public string RacerSettings; +public AssetReference GameCamera; +public string AudioInfo; +public AssetReference AudioSourcePrefab; +public AssetReference CanvasSettings; +public string CameraSettings; } } diff --git a/Assets/UnityCodeGen.Generated/UIPanelSettingsConfig.Generated.cs b/Assets/UnityCodeGen.Generated/UIPanelSettingsConfig.Generated.cs index ad47edd..aa6641c 100644 --- a/Assets/UnityCodeGen.Generated/UIPanelSettingsConfig.Generated.cs +++ b/Assets/UnityCodeGen.Generated/UIPanelSettingsConfig.Generated.cs @@ -2,6 +2,7 @@ #pragma warning disable CS0105 using UnityEngine.AddressableAssets; using Code.Infrastructure.UI; +using System; using UnityEngine; using UnityEngine.AddressableAssets; @@ -13,6 +14,7 @@ public class UIPanelSettingsConfig : ScriptableObject { public UnityEngine.AddressableAssets.AssetReference Prefab; public Code.Infrastructure.UI.UIPanelType UIPanelType; +public System.Boolean Multiple; } }