From e25d118287cb2e935ae2fdfd4fbe5d8fdcdc3261 Mon Sep 17 00:00:00 2001 From: Ader Alisma 01 Date: Sat, 11 Oct 2025 12:14:27 -0400 Subject: [PATCH 1/6] Start monster core --- Assets/Scripts/LevelConfig/WaveConfig.cs | 2 ++ Assets/Scripts/LevelConfig/WaveObserver.cs | 7 +++++++ 2 files changed, 9 insertions(+) diff --git a/Assets/Scripts/LevelConfig/WaveConfig.cs b/Assets/Scripts/LevelConfig/WaveConfig.cs index 41b9b6a..35ca7fa 100644 --- a/Assets/Scripts/LevelConfig/WaveConfig.cs +++ b/Assets/Scripts/LevelConfig/WaveConfig.cs @@ -5,6 +5,7 @@ public class GroupList { public List groupSpawn; public float triggerTime; + public bool dropsMonsterCore; } [CreateAssetMenu(menuName = "Gather And Defend/Levels/WaveConfig")] public class WaveConfig : ScriptableObject @@ -45,6 +46,7 @@ public class WaveConfig : ScriptableObject } } public float GameDuration { get { return _gameDuration; } } + /** * Returns the updated game interval after adjusting to enemies spawned at the start */ diff --git a/Assets/Scripts/LevelConfig/WaveObserver.cs b/Assets/Scripts/LevelConfig/WaveObserver.cs index 6434f7f..6f73972 100644 --- a/Assets/Scripts/LevelConfig/WaveObserver.cs +++ b/Assets/Scripts/LevelConfig/WaveObserver.cs @@ -13,6 +13,7 @@ public class WaveObserver : Singleton private List _copyConstantSpawn; private List _intervalTiming = new List(); private List> _copyGroupSpawn; //Contains count of enemies per group + private List _monsterCoreGroups; private WaveConfig _levelConfig; private int _spawnerTiming = 0; private int _currentGroupIndex = 0; @@ -51,6 +52,7 @@ public class WaveObserver : Singleton _copyGroupSpawn[index].Add(_levelConfig.NestedGroupSpawn[index].groupSpawn[nestedIndex].Count); } _groupSpawnTimers.Add(_levelConfig.NestedGroupSpawn[index].triggerTime); + _monsterCoreGroups.Add(_levelConfig.NestedGroupSpawn[index].dropsMonsterCore); } // Start game timer, at the end, player wins. @@ -262,4 +264,9 @@ public class WaveObserver : Singleton } } } + + private void ChooseMonsterCore(List currentGroup) + { + // Fetch the group's mosnter core bool attribute + } } -- 2.34.1 From 11ca7ecdcb8233a846840150d855b70249e383b8 Mon Sep 17 00:00:00 2001 From: Ader Alisma 01 Date: Sun, 12 Oct 2025 10:33:58 -0400 Subject: [PATCH 2/6] Core heritage --- Assets/Scripts/LevelConfig/WaveObserver.cs | 5 ----- Assets/Scripts/Opponent/MonsterCoreDrop.cs | 13 +++++++++++++ Assets/Scripts/Opponent/MonsterCoreDrop.cs.meta | 11 +++++++++++ 3 files changed, 24 insertions(+), 5 deletions(-) create mode 100644 Assets/Scripts/Opponent/MonsterCoreDrop.cs create mode 100644 Assets/Scripts/Opponent/MonsterCoreDrop.cs.meta diff --git a/Assets/Scripts/LevelConfig/WaveObserver.cs b/Assets/Scripts/LevelConfig/WaveObserver.cs index 6f73972..ac1ec98 100644 --- a/Assets/Scripts/LevelConfig/WaveObserver.cs +++ b/Assets/Scripts/LevelConfig/WaveObserver.cs @@ -264,9 +264,4 @@ public class WaveObserver : Singleton } } } - - private void ChooseMonsterCore(List currentGroup) - { - // Fetch the group's mosnter core bool attribute - } } diff --git a/Assets/Scripts/Opponent/MonsterCoreDrop.cs b/Assets/Scripts/Opponent/MonsterCoreDrop.cs new file mode 100644 index 0000000..c0409ab --- /dev/null +++ b/Assets/Scripts/Opponent/MonsterCoreDrop.cs @@ -0,0 +1,13 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; + +public class MonsterCoreDrop : Opponent +{ + private GameObject mosnterCorePrefab; + public override void Death() + { + Instantiate(mosnterCorePrefab, transform.position, Quaternion.identity); + base.Death(); + } +} diff --git a/Assets/Scripts/Opponent/MonsterCoreDrop.cs.meta b/Assets/Scripts/Opponent/MonsterCoreDrop.cs.meta new file mode 100644 index 0000000..9443e99 --- /dev/null +++ b/Assets/Scripts/Opponent/MonsterCoreDrop.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: f431d5fa196e5ea4da69343642d10d2f +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: -- 2.34.1 From cfbc84e56758fb499d27339dc9d5294f0c8b864c Mon Sep 17 00:00:00 2001 From: Ader Alisma 01 Date: Sun, 23 Nov 2025 09:54:31 -0500 Subject: [PATCH 3/6] Rework groupConfig for MonsterCoreDrop --- Assets/Design/Levels/WaveConfig_1_1.asset | 4 ++ Assets/Scripts/LevelConfig/WaveObserver.cs | 46 +++++++++++++++++++++- Assets/Scripts/Opponent/MonsterCoreDrop.cs | 28 ++++++++++++- Assets/Scripts/Tiles/SpawnerTile.cs | 4 +- 4 files changed, 77 insertions(+), 5 deletions(-) diff --git a/Assets/Design/Levels/WaveConfig_1_1.asset b/Assets/Design/Levels/WaveConfig_1_1.asset index 26c4095..c24e72b 100644 --- a/Assets/Design/Levels/WaveConfig_1_1.asset +++ b/Assets/Design/Levels/WaveConfig_1_1.asset @@ -20,16 +20,20 @@ MonoBehaviour: - _enemy: {fileID: 80204295746100150, guid: 2419a879bd4e47d4fa8b30de0fcdde42, type: 3} _count: 2 triggerTime: 0.25 + dropsMonsterCore: 1 - groupSpawn: - _enemy: {fileID: 80204295746100150, guid: 2419a879bd4e47d4fa8b30de0fcdde42, type: 3} _count: 9 triggerTime: 1.5 + dropsMonsterCore: 1 - groupSpawn: - _enemy: {fileID: 80204295746100150, guid: 1be769d6ef642314b8846bed35e7297c, type: 3} _count: 7 triggerTime: 2 + dropsMonsterCore: 0 - groupSpawn: - _enemy: {fileID: 80204295746100150, guid: 1be769d6ef642314b8846bed35e7297c, type: 3} _count: 14 triggerTime: 3 + dropsMonsterCore: 0 _gameDuration: 3 diff --git a/Assets/Scripts/LevelConfig/WaveObserver.cs b/Assets/Scripts/LevelConfig/WaveObserver.cs index ac1ec98..bccfed8 100644 --- a/Assets/Scripts/LevelConfig/WaveObserver.cs +++ b/Assets/Scripts/LevelConfig/WaveObserver.cs @@ -249,15 +249,59 @@ public class WaveObserver : Singleton private void CycleRows(List usedRows, List currentGroup, int groupIndex) { System.Random rand = new System.Random(); + bool dropsCore = _monsterCoreGroups != null && _monsterCoreGroups.Count > _currentGroupIndex && _monsterCoreGroups[_currentGroupIndex]; + int totalToSpawn = _copyGroupSpawn[_currentGroupIndex][groupIndex]; + int monsterCoreTarget = -1; + if (dropsCore && totalToSpawn > 0) + { + monsterCoreTarget = rand.Next(0, totalToSpawn); + } + int spawnCount = 0; while (usedRows.Count < _subjects.Count) { int currentRow = rand.Next(_subjects.Count); if (!usedRows.Contains(currentRow)) //If picked row has laready been used { - _subjects[currentRow].TriggerSpawn(currentGroup[groupIndex].GetEnemyObject()); + GameObject spawnedInstance = _subjects[currentRow].TriggerSpawn(currentGroup[groupIndex].GetEnemyObject()); + + // Si ce spawn doit être le porteur du MonsterCore, on remplace/ajoute le comportement + if (monsterCoreTarget >= 0 && spawnCount == monsterCoreTarget) + { + if (spawnedInstance != null) + { + // tentative de remplacer le composant Opponent par MonsterCoreDrop + var existingOpponent = spawnedInstance.GetComponent(); + if (existingOpponent != null) + { + // we remove the existing Opponent-derived behaviour to avoid duplicate logic + Object.Destroy(existingOpponent); + } + + // add MonsterCoreDrop component and configure son prefab (si disponible dans la Database) + MonsterCoreDrop mc = spawnedInstance.AddComponent(); + mc.Init(); + + // essaye de récupérer le prefab "MonsterCore" dans la database (adapter le nom si nécessaire) + //GameObject corePrefab = null; + //try + //{ + // corePrefab = Database.Instance.Prefabs["MonsterCore"]; + //} + //catch { corePrefab = null; } + + //if (corePrefab != null) + //{ + // mc.SetCorePrefab(corePrefab); + //} + } + } + _copyGroupSpawn[_currentGroupIndex][groupIndex]--; usedRows.Add(currentRow); + spawnCount++; } + + if (_copyGroupSpawn[_currentGroupIndex][groupIndex] == 0) //If current ennemy has reached count of 0 { break; diff --git a/Assets/Scripts/Opponent/MonsterCoreDrop.cs b/Assets/Scripts/Opponent/MonsterCoreDrop.cs index c0409ab..c622d07 100644 --- a/Assets/Scripts/Opponent/MonsterCoreDrop.cs +++ b/Assets/Scripts/Opponent/MonsterCoreDrop.cs @@ -4,10 +4,34 @@ using UnityEngine; public class MonsterCoreDrop : Opponent { - private GameObject mosnterCorePrefab; + private GameObject _monsterCorePrefab; + + public void Init() + { + base.Start(); + + // Si le prefab n'est pas fixé via l'inspector, tenter de le charger depuis Resources/"Food" + if (_monsterCorePrefab == null) + { + _monsterCorePrefab = Resources.Load("yieldFood"); + if (_monsterCorePrefab == null) + { + Debug.LogWarning("MonsterCoreDrop: prefab 'yieldFood' introuvable dans le dossier Resources. Assignez-le dans l'inspector ou placez-le dans Resources/yieldFood."); + } + } + } + + public void SetCorePrefab(GameObject prefab) + { + _monsterCorePrefab = prefab; + } + public override void Death() { - Instantiate(mosnterCorePrefab, transform.position, Quaternion.identity); + if (_monsterCorePrefab != null) + { + Instantiate(_monsterCorePrefab, transform.position, Quaternion.identity); + } base.Death(); } } diff --git a/Assets/Scripts/Tiles/SpawnerTile.cs b/Assets/Scripts/Tiles/SpawnerTile.cs index e668a4b..20affb4 100644 --- a/Assets/Scripts/Tiles/SpawnerTile.cs +++ b/Assets/Scripts/Tiles/SpawnerTile.cs @@ -138,9 +138,9 @@ public class SpawnerTile : LevelTile * Instantly spawns an enemy. * Used for GroupSpawn */ - public void TriggerSpawn(GameObject enemy) + public GameObject TriggerSpawn(GameObject enemy) { - enemy.Create(Position, parent: LevelManager.Instance.LevelTransform); + return enemy.Create(Position, parent: LevelManager.Instance.LevelTransform); } #if UNITY_EDITOR -- 2.34.1 From 0ebcfd240ddf3b049d1e5cd6c71e27d3d40bffa2 Mon Sep 17 00:00:00 2001 From: Ader Alisma 01 Date: Sun, 23 Nov 2025 15:04:56 -0500 Subject: [PATCH 4/6] Fonctionnel Reste Prefab + Nbr fixe de drops --- Assets/Scripts/LevelConfig/WaveObserver.cs | 30 +++------------ Assets/Scripts/Opponent/MonsterCoreDrop.cs | 45 ++++++++++++---------- 2 files changed, 29 insertions(+), 46 deletions(-) diff --git a/Assets/Scripts/LevelConfig/WaveObserver.cs b/Assets/Scripts/LevelConfig/WaveObserver.cs index bccfed8..bc32068 100644 --- a/Assets/Scripts/LevelConfig/WaveObserver.cs +++ b/Assets/Scripts/LevelConfig/WaveObserver.cs @@ -29,6 +29,7 @@ public class WaveObserver : Singleton _copyConstantSpawn = new List(); _copyGroupSpawn = new List>(); _groupSpawnTimers = new List(); + _monsterCoreGroups = new List(); _spawnerTiming = 0; _currentGroupIndex = 0; @@ -252,6 +253,8 @@ public class WaveObserver : Singleton bool dropsCore = _monsterCoreGroups != null && _monsterCoreGroups.Count > _currentGroupIndex && _monsterCoreGroups[_currentGroupIndex]; int totalToSpawn = _copyGroupSpawn[_currentGroupIndex][groupIndex]; int monsterCoreTarget = -1; + // TODO : Afficher input box quand bool "DropsMonsterCore" est checked + // TODO : Si spécifié, nbr fixe de core à drop if (dropsCore && totalToSpawn > 0) { monsterCoreTarget = rand.Next(0, totalToSpawn); @@ -264,35 +267,12 @@ public class WaveObserver : Singleton { GameObject spawnedInstance = _subjects[currentRow].TriggerSpawn(currentGroup[groupIndex].GetEnemyObject()); - // Si ce spawn doit être le porteur du MonsterCore, on remplace/ajoute le comportement + // WHen Monster core time if (monsterCoreTarget >= 0 && spawnCount == monsterCoreTarget) { if (spawnedInstance != null) { - // tentative de remplacer le composant Opponent par MonsterCoreDrop - var existingOpponent = spawnedInstance.GetComponent(); - if (existingOpponent != null) - { - // we remove the existing Opponent-derived behaviour to avoid duplicate logic - Object.Destroy(existingOpponent); - } - - // add MonsterCoreDrop component and configure son prefab (si disponible dans la Database) - MonsterCoreDrop mc = spawnedInstance.AddComponent(); - mc.Init(); - - // essaye de récupérer le prefab "MonsterCore" dans la database (adapter le nom si nécessaire) - //GameObject corePrefab = null; - //try - //{ - // corePrefab = Database.Instance.Prefabs["MonsterCore"]; - //} - //catch { corePrefab = null; } - - //if (corePrefab != null) - //{ - // mc.SetCorePrefab(corePrefab); - //} + spawnedInstance.AddComponent(); } } diff --git a/Assets/Scripts/Opponent/MonsterCoreDrop.cs b/Assets/Scripts/Opponent/MonsterCoreDrop.cs index c622d07..4f1e2d2 100644 --- a/Assets/Scripts/Opponent/MonsterCoreDrop.cs +++ b/Assets/Scripts/Opponent/MonsterCoreDrop.cs @@ -2,36 +2,39 @@ using System.Collections; using System.Collections.Generic; using UnityEngine; -public class MonsterCoreDrop : Opponent +public class MonsterCoreDrop : MonoBehaviour { private GameObject _monsterCorePrefab; - - public void Init() + + public void Start() { - base.Start(); - + Debug.Log("MONSTER CORING SSO HARD"); // Si le prefab n'est pas fixé via l'inspector, tenter de le charger depuis Resources/"Food" - if (_monsterCorePrefab == null) - { - _monsterCorePrefab = Resources.Load("yieldFood"); - if (_monsterCorePrefab == null) - { - Debug.LogWarning("MonsterCoreDrop: prefab 'yieldFood' introuvable dans le dossier Resources. Assignez-le dans l'inspector ou placez-le dans Resources/yieldFood."); - } - } + //if (_monsterCorePrefab == null) + //{ + // _monsterCorePrefab = Resources.Load("yieldFood"); + // if (_monsterCorePrefab == null) + // { + // Debug.LogWarning("MonsterCoreDrop: prefab 'yieldFood' introuvable dans le dossier Resources. Assignez-le dans l'inspector ou placez-le dans Resources/yieldFood."); + // } + //} } - public void SetCorePrefab(GameObject prefab) + public void Death() { - _monsterCorePrefab = prefab; + //if (_monsterCorePrefab != null) + //{ + // Instantiate(_monsterCorePrefab, transform.position, Quaternion.identity); + //} + Debug.Log("MONSTER CORE DROPPEDD"); } - public override void Death() + private void OnDestroy() { - if (_monsterCorePrefab != null) - { - Instantiate(_monsterCorePrefab, transform.position, Quaternion.identity); - } - base.Death(); + //if (_monsterCorePrefab != null) + //{ + // Instantiate(_monsterCorePrefab, transform.position, Quaternion.identity); + //} + Debug.Log("MONSTER CORE DROPPEDD"); } } -- 2.34.1 From a2fc9c29803186fd4786e8b32ec94308672361a5 Mon Sep 17 00:00:00 2001 From: Ader Alisma 01 Date: Sat, 29 Nov 2025 17:32:42 -0500 Subject: [PATCH 5/6] Ajout assets de ressources Manque instancier prefab on monster death --- .../UI/HUD/hud_monsterCore_background.png | Bin 0 -> 198 bytes .../HUD/hud_monsterCore_background.png.meta | 123 +++ Assets/Prefabs/Yield/TestMonsterCore.asset | 15 + .../Prefabs/Yield/TestMonsterCore.asset.meta | 8 + Assets/Prefabs/Yield/yieldMonsterCore.prefab | 221 ++++++ .../Yield/yieldMonsterCore.prefab.meta | 7 + Assets/Scenes/Game.unity | 733 +++++++++++++++--- Assets/Scripts/Enum.cs | 3 +- Assets/Scripts/LevelConfig/WaveObserver.cs | 10 +- Assets/Scripts/LevelEditor/Level.cs | 3 + Assets/Scripts/Opponent/MonsterCoreDrop.cs | 38 +- Assets/Scripts/Opponent/Opponent.cs | 10 + Assets/Scripts/Resource/ResourceMaker.cs | 6 + Assets/Scripts/Resource/ResourceManager.cs | 27 +- Assets/Scripts/Resource/ResourceRemover.cs | 7 +- Assets/Scripts/Resource/ResourceText.cs | 3 + ProjectSettings/TagManager.asset | 1 + 17 files changed, 1087 insertions(+), 128 deletions(-) create mode 100644 Assets/Art/Sprites/UI/HUD/hud_monsterCore_background.png create mode 100644 Assets/Art/Sprites/UI/HUD/hud_monsterCore_background.png.meta create mode 100644 Assets/Prefabs/Yield/TestMonsterCore.asset create mode 100644 Assets/Prefabs/Yield/TestMonsterCore.asset.meta create mode 100644 Assets/Prefabs/Yield/yieldMonsterCore.prefab create mode 100644 Assets/Prefabs/Yield/yieldMonsterCore.prefab.meta diff --git a/Assets/Art/Sprites/UI/HUD/hud_monsterCore_background.png b/Assets/Art/Sprites/UI/HUD/hud_monsterCore_background.png new file mode 100644 index 0000000000000000000000000000000000000000..f3764fa34c9784a345cc7c35bb43681894f24822 GIT binary patch literal 198 zcmeAS@N?(olHy`uVBq!ia0vp^tAIF}i5We`ps?4=(=mI&sz`s2SDQ(JYD@<);T3K0RZl?Kz9HD literal 0 HcmV?d00001 diff --git a/Assets/Art/Sprites/UI/HUD/hud_monsterCore_background.png.meta b/Assets/Art/Sprites/UI/HUD/hud_monsterCore_background.png.meta new file mode 100644 index 0000000..6177d1f --- /dev/null +++ b/Assets/Art/Sprites/UI/HUD/hud_monsterCore_background.png.meta @@ -0,0 +1,123 @@ +fileFormatVersion: 2 +guid: 6ac775d3d669c124fbbb2032dde07b62 +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 12 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + vTOnly: 0 + ignoreMasterTextureLimit: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 0 + aniso: 1 + mipBias: 0 + wrapU: 1 + wrapV: 1 + wrapW: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 8 + textureShape: 1 + singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + ignorePngGamma: 0 + applyGammaDecoding: 0 + cookieLightType: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Standalone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Server + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: 5e97eb03825dee720800000000000000 + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + nameFileIdTable: {} + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Prefabs/Yield/TestMonsterCore.asset b/Assets/Prefabs/Yield/TestMonsterCore.asset new file mode 100644 index 0000000..604c293 --- /dev/null +++ b/Assets/Prefabs/Yield/TestMonsterCore.asset @@ -0,0 +1,15 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &11400000 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: f431d5fa196e5ea4da69343642d10d2f, type: 3} + m_Name: TestMonsterCore + m_EditorClassIdentifier: + _monsterCorePrefab: {fileID: 6962989255644195630, guid: 1130702cca945b542bec6c5cd7ff859b, type: 3} diff --git a/Assets/Prefabs/Yield/TestMonsterCore.asset.meta b/Assets/Prefabs/Yield/TestMonsterCore.asset.meta new file mode 100644 index 0000000..aad51e2 --- /dev/null +++ b/Assets/Prefabs/Yield/TestMonsterCore.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 0d11424e05059b143b2bb6eb98ed1262 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Prefabs/Yield/yieldMonsterCore.prefab b/Assets/Prefabs/Yield/yieldMonsterCore.prefab new file mode 100644 index 0000000..d716441 --- /dev/null +++ b/Assets/Prefabs/Yield/yieldMonsterCore.prefab @@ -0,0 +1,221 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1 &6962989255644195630 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 6962989255644195631} + - component: {fileID: 6072713849781841816} + - component: {fileID: -1491803373025033585} + - component: {fileID: 2238237770060079311} + - component: {fileID: 3600016298306940116} + m_Layer: 0 + m_Name: yieldMonsterCore + m_TagString: Resource + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &6962989255644195631 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6962989255644195630} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: -6.61, y: -0.638, z: 1.8112363} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 6962989256011107500} + m_Father: {fileID: 0} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1839735485 &6072713849781841816 +Tilemap: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6962989255644195630} + m_Enabled: 0 + m_Tiles: {} + m_AnimatedTiles: {} + m_TileAssetArray: [] + m_TileSpriteArray: [] + m_TileMatrixArray: [] + m_TileColorArray: [] + m_TileObjectToInstantiateArray: [] + m_AnimationFrameRate: 1 + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_Origin: {x: 0, y: 0, z: 0} + m_Size: {x: 0, y: 0, z: 1} + m_TileAnchor: {x: 0.5, y: 0.5, z: 0} + m_TileOrientation: 0 + m_TileOrientationMatrix: + e00: 1 + e01: 0 + e02: 0 + e03: 0 + e10: 0 + e11: 1 + e12: 0 + e13: 0 + e20: 0 + e21: 0 + e22: 1 + e23: 0 + e30: 0 + e31: 0 + e32: 0 + e33: 1 +--- !u!50 &-1491803373025033585 +Rigidbody2D: + serializedVersion: 4 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6962989255644195630} + m_BodyType: 0 + m_Simulated: 1 + m_UseFullKinematicContacts: 0 + m_UseAutoMass: 0 + m_Mass: 1 + m_LinearDrag: 0 + m_AngularDrag: 0.05 + m_GravityScale: 0 + m_Material: {fileID: 0} + m_Interpolate: 0 + m_SleepingMode: 1 + m_CollisionDetection: 0 + m_Constraints: 4 +--- !u!61 &2238237770060079311 +BoxCollider2D: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6962989255644195630} + m_Enabled: 1 + m_Density: 1 + m_Material: {fileID: 0} + m_IsTrigger: 1 + m_UsedByEffector: 0 + m_UsedByComposite: 0 + m_Offset: {x: 0.05, y: 0} + m_SpriteTilingProperty: + border: {x: 0, y: 0, z: 0, w: 0} + pivot: {x: 0, y: 0} + oldSize: {x: 0, y: 0} + newSize: {x: 0, y: 0} + adaptiveTilingThreshold: 0 + drawMode: 0 + adaptiveTiling: 0 + m_AutoTiling: 0 + serializedVersion: 2 + m_Size: {x: 0.29, y: 0.25} + m_EdgeRadius: 0 +--- !u!114 &3600016298306940116 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6962989255644195630} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 9dd6bad38b516d64e8e23a5822ca37bb, type: 3} + m_Name: + m_EditorClassIdentifier: + _resourceChoice: 3 + _animate: 1 +--- !u!1 &6962989256011107503 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 6962989256011107500} + - component: {fileID: 6962989256011107501} + m_Layer: 0 + m_Name: sprite + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &6962989256011107500 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6962989256011107503} + m_LocalRotation: {x: 0, y: -0, z: 0, w: -1} + m_LocalPosition: {x: 0.0259, y: 0.01, z: 0} + m_LocalScale: {x: 0.5394133, y: 0.56488746, z: 0.9686} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 6962989255644195631} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 360} +--- !u!212 &6962989256011107501 +SpriteRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6962989256011107503} + 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_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: a97c105638bdf8b4a8650670310a4cd3, 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_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 4 + m_Sprite: {fileID: 21300000, guid: 8354a544f4ca3514e87d40d2de9afaee, type: 3} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_FlipX: 0 + m_FlipY: 0 + m_DrawMode: 0 + m_Size: {x: 1.06, y: 1.69} + m_AdaptiveModeThreshold: 0.5 + m_SpriteTileMode: 0 + m_WasSpriteAssigned: 1 + m_MaskInteraction: 0 + m_SpriteSortPoint: 0 diff --git a/Assets/Prefabs/Yield/yieldMonsterCore.prefab.meta b/Assets/Prefabs/Yield/yieldMonsterCore.prefab.meta new file mode 100644 index 0000000..9717208 --- /dev/null +++ b/Assets/Prefabs/Yield/yieldMonsterCore.prefab.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 1130702cca945b542bec6c5cd7ff859b +PrefabImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scenes/Game.unity b/Assets/Scenes/Game.unity index d8b37b2..bf5bb13 100644 --- a/Assets/Scenes/Game.unity +++ b/Assets/Scenes/Game.unity @@ -409,6 +409,10 @@ PrefabInstance: propertyPath: _populationText value: objectReference: {fileID: 180485348} + - target: {fileID: 809914571062164690, guid: 5497dc5adfbe67341980c9d946816424, type: 3} + propertyPath: _monsterCoreText + value: + objectReference: {fileID: 2103124033} - target: {fileID: 809914571062164690, guid: 5497dc5adfbe67341980c9d946816424, type: 3} propertyPath: _populationCriticalIndicator value: @@ -1343,7 +1347,7 @@ RectTransform: m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 1, y: 1} m_AnchorMax: {x: 1, y: 1} - m_AnchoredPosition: {x: -686, y: -68} + m_AnchoredPosition: {x: -486, y: -68} m_SizeDelta: {x: 485.4307, y: 100} m_Pivot: {x: 0.5, y: 0.5} --- !u!1 &590036741 stripped @@ -1711,6 +1715,37 @@ Transform: m_Father: {fileID: 0} m_RootOrder: 8 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &786990835 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 786990836} + m_Layer: 0 + m_Name: MonsterCoreDestination + m_TagString: MonsterCore + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &786990836 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 786990835} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: -1.65, y: 3.31, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 1505683023} + m_RootOrder: 3 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1 &804974776 GameObject: m_ObjectHideFlags: 0 @@ -1926,7 +1961,7 @@ PrefabInstance: objectReference: {fileID: 0} - target: {fileID: 3028288566889208749, guid: 02daecb0115395844b4932445d039051, type: 3} propertyPath: _prefabs.Array.size - value: 44 + value: 61 objectReference: {fileID: 0} - target: {fileID: 3028288566889208749, guid: 02daecb0115395844b4932445d039051, type: 3} propertyPath: _folders.Array.data[2] @@ -1947,15 +1982,15 @@ PrefabInstance: - target: {fileID: 3028288566889208749, guid: 02daecb0115395844b4932445d039051, type: 3} propertyPath: _prefabs.Array.data[2] value: - objectReference: {fileID: 6962989255644195630, guid: 869a03bba705e8d4485aa73daad773dc, type: 3} + objectReference: {fileID: 8131035023550608747, guid: 19b269ca2b00e9b4dbff3fa28761992a, type: 3} - target: {fileID: 3028288566889208749, guid: 02daecb0115395844b4932445d039051, type: 3} propertyPath: _prefabs.Array.data[3] value: - objectReference: {fileID: 8131035023550608747, guid: 19b269ca2b00e9b4dbff3fa28761992a, type: 3} + objectReference: {fileID: 3028288566889208744, guid: 02daecb0115395844b4932445d039051, type: 3} - target: {fileID: 3028288566889208749, guid: 02daecb0115395844b4932445d039051, type: 3} propertyPath: _prefabs.Array.data[4] value: - objectReference: {fileID: 3028288566889208744, guid: 02daecb0115395844b4932445d039051, type: 3} + objectReference: {fileID: 1038659306882990064, guid: 4ef1b4ccbb03853448add8f179bc162c, type: 3} - target: {fileID: 3028288566889208749, guid: 02daecb0115395844b4932445d039051, type: 3} propertyPath: _prefabs.Array.data[5] value: @@ -1971,150 +2006,218 @@ PrefabInstance: - target: {fileID: 3028288566889208749, guid: 02daecb0115395844b4932445d039051, type: 3} propertyPath: _prefabs.Array.data[8] value: - objectReference: {fileID: 80204295746100150, guid: 1be769d6ef642314b8846bed35e7297c, type: 3} + objectReference: {fileID: 1038659306882990064, guid: 8ee70a61861be204498bccfde177442a, type: 3} - target: {fileID: 3028288566889208749, guid: 02daecb0115395844b4932445d039051, type: 3} propertyPath: _prefabs.Array.data[9] value: - objectReference: {fileID: 80204295746100150, guid: 5bbf0d85fa5bb3f4599da79f0a84e3a9, type: 3} + objectReference: {fileID: 80204295746100150, guid: 1be769d6ef642314b8846bed35e7297c, type: 3} - target: {fileID: 3028288566889208749, guid: 02daecb0115395844b4932445d039051, type: 3} propertyPath: _prefabs.Array.data[10] value: - objectReference: {fileID: 80204295746100150, guid: 2419a879bd4e47d4fa8b30de0fcdde42, type: 3} + objectReference: {fileID: 80204295746100150, guid: 5bbf0d85fa5bb3f4599da79f0a84e3a9, type: 3} - target: {fileID: 3028288566889208749, guid: 02daecb0115395844b4932445d039051, type: 3} propertyPath: _prefabs.Array.data[11] value: - objectReference: {fileID: 5531237550998824024, guid: 6cd87b398e7a0e94580f4fcbe2fd310a, type: 3} + objectReference: {fileID: 80204295746100150, guid: 2def22091e1ff0d43abe2797c18a2fda, type: 3} - target: {fileID: 3028288566889208749, guid: 02daecb0115395844b4932445d039051, type: 3} propertyPath: _prefabs.Array.data[12] value: - objectReference: {fileID: 6962989255644195630, guid: 9b40c232eddfd1b469bea688e3c970c0, type: 3} + objectReference: {fileID: 80204295746100150, guid: 1a7e833dc61611e438aadae2a0b1907f, type: 3} - target: {fileID: 3028288566889208749, guid: 02daecb0115395844b4932445d039051, type: 3} propertyPath: _prefabs.Array.data[13] value: - objectReference: {fileID: 6962989255644195630, guid: e4a4754288971e949a74f90737193702, type: 3} + objectReference: {fileID: 80204295746100150, guid: 2cab60ebae1481a48982995c19f3b76c, type: 3} - target: {fileID: 3028288566889208749, guid: 02daecb0115395844b4932445d039051, type: 3} propertyPath: _prefabs.Array.data[14] value: - objectReference: {fileID: 2230360378425099702, guid: ece16a59d4dca2246817fbb1b23f17ba, type: 3} + objectReference: {fileID: 73262998545604314, guid: d72a1a133f548b64ab31d4b0fe743dec, type: 3} - target: {fileID: 3028288566889208749, guid: 02daecb0115395844b4932445d039051, type: 3} propertyPath: _prefabs.Array.data[15] value: - objectReference: {fileID: 7468362030574254173, guid: 2e419aab9ce81a04480281be6715fe28, type: 3} + objectReference: {fileID: 1553670687307187218, guid: 09b235e4222a11c4596012dc860b6101, type: 3} - target: {fileID: 3028288566889208749, guid: 02daecb0115395844b4932445d039051, type: 3} propertyPath: _prefabs.Array.data[16] value: - objectReference: {fileID: 6772151991927387957, guid: 6d3cc056c6832804fa9dbe27c4025f32, type: 3} + objectReference: {fileID: 80204295746100150, guid: 2419a879bd4e47d4fa8b30de0fcdde42, type: 3} - target: {fileID: 3028288566889208749, guid: 02daecb0115395844b4932445d039051, type: 3} propertyPath: _prefabs.Array.data[17] value: - objectReference: {fileID: 6962989255644195630, guid: 02eb2d787f58e9943a0cb46d0b13e6b8, type: 3} + objectReference: {fileID: 73262998545604314, guid: 45b33728f1566c146afdeaeca131097e, type: 3} - target: {fileID: 3028288566889208749, guid: 02daecb0115395844b4932445d039051, type: 3} propertyPath: _prefabs.Array.data[18] value: - objectReference: {fileID: 7670155643566295935, guid: 717a063ebb684a748b9f40cac33fab52, type: 3} + objectReference: {fileID: 6962989255644195630, guid: 869a03bba705e8d4485aa73daad773dc, type: 3} - target: {fileID: 3028288566889208749, guid: 02daecb0115395844b4932445d039051, type: 3} propertyPath: _prefabs.Array.data[19] value: - objectReference: {fileID: 5157279992115123224, guid: 85534a2d6c2add54d864073914646192, type: 3} + objectReference: {fileID: 6962989255644195630, guid: 3df5eaab2a4c1d64bba590ed4e1ac0f7, type: 3} - target: {fileID: 3028288566889208749, guid: 02daecb0115395844b4932445d039051, type: 3} propertyPath: _prefabs.Array.data[20] value: - objectReference: {fileID: 6962989255644195630, guid: 8b50d9afb3bbd204d8dfea3d64f13fa2, type: 3} + objectReference: {fileID: 6962989255644195630, guid: 8c97d676f9e78de408a30be69193ca5e, type: 3} - target: {fileID: 3028288566889208749, guid: 02daecb0115395844b4932445d039051, type: 3} propertyPath: _prefabs.Array.data[21] value: - objectReference: {fileID: 6189482434664848410, guid: 9e44ea23a3b9be642b3db391ffaaef34, type: 3} + objectReference: {fileID: 6962989255644195630, guid: 61e75a685be726940abc2cf555836e96, type: 3} - target: {fileID: 3028288566889208749, guid: 02daecb0115395844b4932445d039051, type: 3} propertyPath: _prefabs.Array.data[22] value: - objectReference: {fileID: 304251527383925968, guid: 208bb01775a0c4b4c8c1dbfbf6b4eefd, type: 3} + objectReference: {fileID: 6962989255644195630, guid: 741f07ee7e2029048bb834b64160b257, type: 3} - target: {fileID: 3028288566889208749, guid: 02daecb0115395844b4932445d039051, type: 3} propertyPath: _prefabs.Array.data[23] value: - objectReference: {fileID: 4504030131911750787, guid: e1e8c5d6f8d96ba42946fc4cd76c8825, type: 3} + objectReference: {fileID: 5531237550998824024, guid: 6cd87b398e7a0e94580f4fcbe2fd310a, type: 3} - target: {fileID: 3028288566889208749, guid: 02daecb0115395844b4932445d039051, type: 3} propertyPath: _prefabs.Array.data[24] value: - objectReference: {fileID: 809914571062164693, guid: 5497dc5adfbe67341980c9d946816424, type: 3} + objectReference: {fileID: 6962989255644195630, guid: 9b40c232eddfd1b469bea688e3c970c0, type: 3} - target: {fileID: 3028288566889208749, guid: 02daecb0115395844b4932445d039051, type: 3} propertyPath: _prefabs.Array.data[25] value: - objectReference: {fileID: 4897909026855453892, guid: 3918c7d48763f184a92c7d61380ca258, type: 3} + objectReference: {fileID: 7468362030574254173, guid: 76046c25a4f63d447a869d7994a20864, type: 3} - target: {fileID: 3028288566889208749, guid: 02daecb0115395844b4932445d039051, type: 3} propertyPath: _prefabs.Array.data[26] value: - objectReference: {fileID: 8433619855353240514, guid: bc81e2a1e8b64884692701c2892f62a4, type: 3} + objectReference: {fileID: 6962989255644195630, guid: e4a4754288971e949a74f90737193702, type: 3} - target: {fileID: 3028288566889208749, guid: 02daecb0115395844b4932445d039051, type: 3} propertyPath: _prefabs.Array.data[27] value: - objectReference: {fileID: 4052934186652138539, guid: 8560e1f66d452b543a705c8a0f3e22fa, type: 3} + objectReference: {fileID: 2230360378425099702, guid: a857e93871a186749879c021675f5a13, type: 3} - target: {fileID: 3028288566889208749, guid: 02daecb0115395844b4932445d039051, type: 3} propertyPath: _prefabs.Array.data[28] value: - objectReference: {fileID: 3814095509541806390, guid: 9527f3a1482b90a48bb6c62acc70f986, type: 3} + objectReference: {fileID: 2230360378425099702, guid: ece16a59d4dca2246817fbb1b23f17ba, type: 3} - target: {fileID: 3028288566889208749, guid: 02daecb0115395844b4932445d039051, type: 3} propertyPath: _prefabs.Array.data[29] value: - objectReference: {fileID: 907652127959947826, guid: e20680474d73eee49836ff9cbc6d0b28, type: 3} + objectReference: {fileID: 7860064201944659286, guid: 9180c585b18b0d84d94abff6eccd4b0d, type: 3} - target: {fileID: 3028288566889208749, guid: 02daecb0115395844b4932445d039051, type: 3} propertyPath: _prefabs.Array.data[30] value: - objectReference: {fileID: 907652127959947826, guid: afc444040d3adcf45a882e4882521f5e, type: 3} + objectReference: {fileID: 7468362030574254173, guid: 2e419aab9ce81a04480281be6715fe28, type: 3} - target: {fileID: 3028288566889208749, guid: 02daecb0115395844b4932445d039051, type: 3} propertyPath: _prefabs.Array.data[31] value: - objectReference: {fileID: 4817988606444742093, guid: 306211cf6348ac747a78d89bd72fca3e, type: 3} + objectReference: {fileID: 6772151991927387957, guid: 6d3cc056c6832804fa9dbe27c4025f32, type: 3} - target: {fileID: 3028288566889208749, guid: 02daecb0115395844b4932445d039051, type: 3} propertyPath: _prefabs.Array.data[32] value: - objectReference: {fileID: 4817988606444742093, guid: 1d481c7093a8d2443a04261fd7c72be2, type: 3} + objectReference: {fileID: 6962989255644195630, guid: 02eb2d787f58e9943a0cb46d0b13e6b8, type: 3} - target: {fileID: 3028288566889208749, guid: 02daecb0115395844b4932445d039051, type: 3} propertyPath: _prefabs.Array.data[33] value: - objectReference: {fileID: 907652127959947826, guid: 7a4156822defb3f4bb8a2ed6de7cacdb, type: 3} + objectReference: {fileID: 7670155643566295935, guid: 717a063ebb684a748b9f40cac33fab52, type: 3} - target: {fileID: 3028288566889208749, guid: 02daecb0115395844b4932445d039051, type: 3} propertyPath: _prefabs.Array.data[34] value: - objectReference: {fileID: 2118220733331082121, guid: 3dea9da5643f37b43ac6145f65859558, type: 3} + objectReference: {fileID: 5157279992115123224, guid: 85534a2d6c2add54d864073914646192, type: 3} - target: {fileID: 3028288566889208749, guid: 02daecb0115395844b4932445d039051, type: 3} propertyPath: _prefabs.Array.data[35] value: - objectReference: {fileID: 3013207446659063113, guid: 4789f524a7e1b7b40be6fefda32f600e, type: 3} + objectReference: {fileID: 6962989255644195630, guid: 8b50d9afb3bbd204d8dfea3d64f13fa2, type: 3} - target: {fileID: 3028288566889208749, guid: 02daecb0115395844b4932445d039051, type: 3} propertyPath: _prefabs.Array.data[36] value: - objectReference: {fileID: 1893888152770301340, guid: eb25bde5e3c72d34fbc9095e2c83cdb4, type: 3} + objectReference: {fileID: 6189482434664848410, guid: 9e44ea23a3b9be642b3db391ffaaef34, type: 3} - target: {fileID: 3028288566889208749, guid: 02daecb0115395844b4932445d039051, type: 3} propertyPath: _prefabs.Array.data[37] value: - objectReference: {fileID: 3409838768749337993, guid: 096f5f6b487dccb41a48faf69f87fae9, type: 3} + objectReference: {fileID: 304251527383925968, guid: 208bb01775a0c4b4c8c1dbfbf6b4eefd, type: 3} - target: {fileID: 3028288566889208749, guid: 02daecb0115395844b4932445d039051, type: 3} propertyPath: _prefabs.Array.data[38] value: - objectReference: {fileID: 1388419617042242061, guid: 4a2f48781c26ad247b697aa368358f88, type: 3} + objectReference: {fileID: 4504030131911750787, guid: e1e8c5d6f8d96ba42946fc4cd76c8825, type: 3} - target: {fileID: 3028288566889208749, guid: 02daecb0115395844b4932445d039051, type: 3} propertyPath: _prefabs.Array.data[39] value: - objectReference: {fileID: 3405186844740662670, guid: 074c072b696214a4ba44ff66e9a7d9a6, type: 3} + objectReference: {fileID: 809914571062164693, guid: 5497dc5adfbe67341980c9d946816424, type: 3} - target: {fileID: 3028288566889208749, guid: 02daecb0115395844b4932445d039051, type: 3} propertyPath: _prefabs.Array.data[40] value: - objectReference: {fileID: 6962989255644195630, guid: f74ea22a786d3c34cbb77e7522a360f8, type: 3} + objectReference: {fileID: 4897909026855453892, guid: 3918c7d48763f184a92c7d61380ca258, type: 3} - target: {fileID: 3028288566889208749, guid: 02daecb0115395844b4932445d039051, type: 3} propertyPath: _prefabs.Array.data[41] value: - objectReference: {fileID: 6962989255644195630, guid: a2dc5d9672c10074fa9c35c12f6339c1, type: 3} + objectReference: {fileID: 8433619855353240514, guid: bc81e2a1e8b64884692701c2892f62a4, type: 3} - target: {fileID: 3028288566889208749, guid: 02daecb0115395844b4932445d039051, type: 3} propertyPath: _prefabs.Array.data[42] value: - objectReference: {fileID: 6962989255644195630, guid: 484f0eca1c74ae34694692de56a36739, type: 3} + objectReference: {fileID: 4052934186652138539, guid: 8560e1f66d452b543a705c8a0f3e22fa, type: 3} - target: {fileID: 3028288566889208749, guid: 02daecb0115395844b4932445d039051, type: 3} propertyPath: _prefabs.Array.data[43] value: + objectReference: {fileID: 3814095509541806390, guid: 9527f3a1482b90a48bb6c62acc70f986, type: 3} + - target: {fileID: 3028288566889208749, guid: 02daecb0115395844b4932445d039051, type: 3} + propertyPath: _prefabs.Array.data[44] + value: + objectReference: {fileID: 907652127959947826, guid: e20680474d73eee49836ff9cbc6d0b28, type: 3} + - target: {fileID: 3028288566889208749, guid: 02daecb0115395844b4932445d039051, type: 3} + propertyPath: _prefabs.Array.data[45] + value: + objectReference: {fileID: 907652127959947826, guid: afc444040d3adcf45a882e4882521f5e, type: 3} + - target: {fileID: 3028288566889208749, guid: 02daecb0115395844b4932445d039051, type: 3} + propertyPath: _prefabs.Array.data[46] + value: + objectReference: {fileID: 4817988606444742093, guid: 306211cf6348ac747a78d89bd72fca3e, type: 3} + - target: {fileID: 3028288566889208749, guid: 02daecb0115395844b4932445d039051, type: 3} + propertyPath: _prefabs.Array.data[47] + value: + objectReference: {fileID: 4817988606444742093, guid: 1d481c7093a8d2443a04261fd7c72be2, type: 3} + - target: {fileID: 3028288566889208749, guid: 02daecb0115395844b4932445d039051, type: 3} + propertyPath: _prefabs.Array.data[48] + value: + objectReference: {fileID: 907652127959947826, guid: 7a4156822defb3f4bb8a2ed6de7cacdb, type: 3} + - target: {fileID: 3028288566889208749, guid: 02daecb0115395844b4932445d039051, type: 3} + propertyPath: _prefabs.Array.data[49] + value: + objectReference: {fileID: 2118220733331082121, guid: 3dea9da5643f37b43ac6145f65859558, type: 3} + - target: {fileID: 3028288566889208749, guid: 02daecb0115395844b4932445d039051, type: 3} + propertyPath: _prefabs.Array.data[50] + value: + objectReference: {fileID: 3013207446659063113, guid: 4789f524a7e1b7b40be6fefda32f600e, type: 3} + - target: {fileID: 3028288566889208749, guid: 02daecb0115395844b4932445d039051, type: 3} + propertyPath: _prefabs.Array.data[51] + value: + objectReference: {fileID: 1893888152770301340, guid: eb25bde5e3c72d34fbc9095e2c83cdb4, type: 3} + - target: {fileID: 3028288566889208749, guid: 02daecb0115395844b4932445d039051, type: 3} + propertyPath: _prefabs.Array.data[52] + value: + objectReference: {fileID: 3409838768749337993, guid: 096f5f6b487dccb41a48faf69f87fae9, type: 3} + - target: {fileID: 3028288566889208749, guid: 02daecb0115395844b4932445d039051, type: 3} + propertyPath: _prefabs.Array.data[53] + value: + objectReference: {fileID: 1388419617042242061, guid: 4a2f48781c26ad247b697aa368358f88, type: 3} + - target: {fileID: 3028288566889208749, guid: 02daecb0115395844b4932445d039051, type: 3} + propertyPath: _prefabs.Array.data[54] + value: + objectReference: {fileID: 3405186844740662670, guid: 074c072b696214a4ba44ff66e9a7d9a6, type: 3} + - target: {fileID: 3028288566889208749, guid: 02daecb0115395844b4932445d039051, type: 3} + propertyPath: _prefabs.Array.data[55] + value: + objectReference: {fileID: 6962989255644195630, guid: f74ea22a786d3c34cbb77e7522a360f8, type: 3} + - target: {fileID: 3028288566889208749, guid: 02daecb0115395844b4932445d039051, type: 3} + propertyPath: _prefabs.Array.data[56] + value: + objectReference: {fileID: 6962989255644195630, guid: a2dc5d9672c10074fa9c35c12f6339c1, type: 3} + - target: {fileID: 3028288566889208749, guid: 02daecb0115395844b4932445d039051, type: 3} + propertyPath: _prefabs.Array.data[57] + value: + objectReference: {fileID: 6962989255644195630, guid: 1130702cca945b542bec6c5cd7ff859b, type: 3} + - target: {fileID: 3028288566889208749, guid: 02daecb0115395844b4932445d039051, type: 3} + propertyPath: _prefabs.Array.data[58] + value: + objectReference: {fileID: 6962989255644195630, guid: 484f0eca1c74ae34694692de56a36739, type: 3} + - target: {fileID: 3028288566889208749, guid: 02daecb0115395844b4932445d039051, type: 3} + propertyPath: _prefabs.Array.data[59] + value: objectReference: {fileID: 6962989255644195630, guid: f20569b5452c2b341a95d656b7534b7e, type: 3} + - target: {fileID: 3028288566889208749, guid: 02daecb0115395844b4932445d039051, type: 3} + propertyPath: _prefabs.Array.data[60] + value: + objectReference: {fileID: -2253911629886400664, guid: 7339506cf80058543b88c545d0979ebd, type: 3} - target: {fileID: 3028288566889208749, guid: 02daecb0115395844b4932445d039051, type: 3} propertyPath: _scriptableObjects.Array.size - value: 58 + value: 70 objectReference: {fileID: 0} - target: {fileID: 3028288566889208749, guid: 02daecb0115395844b4932445d039051, type: 3} propertyPath: _scriptableObjects.Array.data[0] @@ -2163,191 +2266,239 @@ PrefabInstance: - target: {fileID: 3028288566889208749, guid: 02daecb0115395844b4932445d039051, type: 3} propertyPath: _scriptableObjects.Array.data[11] value: - objectReference: {fileID: 11400000, guid: a387250a316b97e43be83b85980101e1, type: 2} + objectReference: {fileID: 11400000, guid: 0d11424e05059b143b2bb6eb98ed1262, type: 2} - target: {fileID: 3028288566889208749, guid: 02daecb0115395844b4932445d039051, type: 3} propertyPath: _scriptableObjects.Array.data[12] value: - objectReference: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2} + objectReference: {fileID: 11400000, guid: a387250a316b97e43be83b85980101e1, type: 2} - target: {fileID: 3028288566889208749, guid: 02daecb0115395844b4932445d039051, type: 3} propertyPath: _scriptableObjects.Array.data[13] value: - objectReference: {fileID: 11400000, guid: 5f47d74ebc4a8fe439ac6a4fe9ec436f, type: 2} + objectReference: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2} - target: {fileID: 3028288566889208749, guid: 02daecb0115395844b4932445d039051, type: 3} propertyPath: _scriptableObjects.Array.data[14] value: - objectReference: {fileID: 11400000, guid: 760092a3b8a4148488386ce5208108f4, type: 2} + objectReference: {fileID: 11400000, guid: 5f47d74ebc4a8fe439ac6a4fe9ec436f, type: 2} - target: {fileID: 3028288566889208749, guid: 02daecb0115395844b4932445d039051, type: 3} propertyPath: _scriptableObjects.Array.data[15] value: - objectReference: {fileID: 11400000, guid: 4abc113f1a69a564b863f76e96756a75, type: 2} + objectReference: {fileID: 11400000, guid: 760092a3b8a4148488386ce5208108f4, type: 2} - target: {fileID: 3028288566889208749, guid: 02daecb0115395844b4932445d039051, type: 3} propertyPath: _scriptableObjects.Array.data[16] value: - objectReference: {fileID: 11400000, guid: a6e34739c9325da4cac4fbaea30d052c, type: 2} + objectReference: {fileID: 11400000, guid: 4abc113f1a69a564b863f76e96756a75, type: 2} - target: {fileID: 3028288566889208749, guid: 02daecb0115395844b4932445d039051, type: 3} propertyPath: _scriptableObjects.Array.data[17] value: - objectReference: {fileID: 11400000, guid: a432e0009e329054fb5f63ffc8aa5da1, type: 2} + objectReference: {fileID: 11400000, guid: a6e34739c9325da4cac4fbaea30d052c, type: 2} - target: {fileID: 3028288566889208749, guid: 02daecb0115395844b4932445d039051, type: 3} propertyPath: _scriptableObjects.Array.data[18] value: - objectReference: {fileID: 11400000, guid: 04c2cffdf7facd847b42eba02033c969, type: 2} + objectReference: {fileID: 11400000, guid: a432e0009e329054fb5f63ffc8aa5da1, type: 2} - target: {fileID: 3028288566889208749, guid: 02daecb0115395844b4932445d039051, type: 3} propertyPath: _scriptableObjects.Array.data[19] value: - objectReference: {fileID: 11400000, guid: f1253a96234fecb4b82e83d1cec40677, type: 2} + objectReference: {fileID: 11400000, guid: 04c2cffdf7facd847b42eba02033c969, type: 2} - target: {fileID: 3028288566889208749, guid: 02daecb0115395844b4932445d039051, type: 3} propertyPath: _scriptableObjects.Array.data[20] value: - objectReference: {fileID: 11400000, guid: 91f94bcdfb059454481917b575559c48, type: 2} + objectReference: {fileID: 11400000, guid: f1253a96234fecb4b82e83d1cec40677, type: 2} - target: {fileID: 3028288566889208749, guid: 02daecb0115395844b4932445d039051, type: 3} propertyPath: _scriptableObjects.Array.data[21] value: - objectReference: {fileID: 11400000, guid: d37561e153d6a6448a03839488fdec5e, type: 2} + objectReference: {fileID: 11400000, guid: 91f94bcdfb059454481917b575559c48, type: 2} - target: {fileID: 3028288566889208749, guid: 02daecb0115395844b4932445d039051, type: 3} propertyPath: _scriptableObjects.Array.data[22] value: - objectReference: {fileID: 11400000, guid: 7a1313e5c16e74c4ba11a8114b9fd786, type: 2} + objectReference: {fileID: 11400000, guid: d37561e153d6a6448a03839488fdec5e, type: 2} - target: {fileID: 3028288566889208749, guid: 02daecb0115395844b4932445d039051, type: 3} propertyPath: _scriptableObjects.Array.data[23] value: - objectReference: {fileID: 11400000, guid: b501f7eea1fdfb843853bcba5b30533a, type: 2} + objectReference: {fileID: 11400000, guid: 7a1313e5c16e74c4ba11a8114b9fd786, type: 2} - target: {fileID: 3028288566889208749, guid: 02daecb0115395844b4932445d039051, type: 3} propertyPath: _scriptableObjects.Array.data[24] value: - objectReference: {fileID: 11400000, guid: 0a9c94eb38c575948992453fc29bcede, type: 2} + objectReference: {fileID: 11400000, guid: b501f7eea1fdfb843853bcba5b30533a, type: 2} - target: {fileID: 3028288566889208749, guid: 02daecb0115395844b4932445d039051, type: 3} propertyPath: _scriptableObjects.Array.data[25] value: - objectReference: {fileID: 11400000, guid: ec229632b369eb746a30dbfafe3de373, type: 2} + objectReference: {fileID: 11400000, guid: 0a9c94eb38c575948992453fc29bcede, type: 2} - target: {fileID: 3028288566889208749, guid: 02daecb0115395844b4932445d039051, type: 3} propertyPath: _scriptableObjects.Array.data[26] value: - objectReference: {fileID: 11400000, guid: 7b9178a588ec3c5479d7ea8989cc0b35, type: 2} + objectReference: {fileID: 11400000, guid: ec229632b369eb746a30dbfafe3de373, type: 2} - target: {fileID: 3028288566889208749, guid: 02daecb0115395844b4932445d039051, type: 3} propertyPath: _scriptableObjects.Array.data[27] value: - objectReference: {fileID: 11400000, guid: 042265144e4e260438b10752dc404d71, type: 2} + objectReference: {fileID: 11400000, guid: 7b9178a588ec3c5479d7ea8989cc0b35, type: 2} - target: {fileID: 3028288566889208749, guid: 02daecb0115395844b4932445d039051, type: 3} propertyPath: _scriptableObjects.Array.data[28] value: - objectReference: {fileID: 11400000, guid: 363fc227e0d4c98488d7dccb6c8acae0, type: 2} + objectReference: {fileID: 11400000, guid: 042265144e4e260438b10752dc404d71, type: 2} - target: {fileID: 3028288566889208749, guid: 02daecb0115395844b4932445d039051, type: 3} propertyPath: _scriptableObjects.Array.data[29] value: - objectReference: {fileID: 11400000, guid: d8140ae36f1b7fd4fb1a57ab3dc69de4, type: 2} + objectReference: {fileID: 11400000, guid: 363fc227e0d4c98488d7dccb6c8acae0, type: 2} - target: {fileID: 3028288566889208749, guid: 02daecb0115395844b4932445d039051, type: 3} propertyPath: _scriptableObjects.Array.data[30] value: - objectReference: {fileID: 11400000, guid: 2a601d614d4075f4fbe54dcab4016d2d, type: 2} + objectReference: {fileID: 11400000, guid: d8140ae36f1b7fd4fb1a57ab3dc69de4, type: 2} - target: {fileID: 3028288566889208749, guid: 02daecb0115395844b4932445d039051, type: 3} propertyPath: _scriptableObjects.Array.data[31] value: - objectReference: {fileID: 11400000, guid: f6660e22eb6be1d4589c27cb3bec6eb2, type: 2} + objectReference: {fileID: 11400000, guid: 2a601d614d4075f4fbe54dcab4016d2d, type: 2} - target: {fileID: 3028288566889208749, guid: 02daecb0115395844b4932445d039051, type: 3} propertyPath: _scriptableObjects.Array.data[32] value: - objectReference: {fileID: 11400000, guid: e9e134bb6a24e4647a27955d3d276bd2, type: 2} + objectReference: {fileID: 11400000, guid: f6660e22eb6be1d4589c27cb3bec6eb2, type: 2} - target: {fileID: 3028288566889208749, guid: 02daecb0115395844b4932445d039051, type: 3} propertyPath: _scriptableObjects.Array.data[33] value: - objectReference: {fileID: 11400000, guid: c22ff5f49b21f9844a4d9693dc06777c, type: 2} + objectReference: {fileID: 11400000, guid: e9e134bb6a24e4647a27955d3d276bd2, type: 2} - target: {fileID: 3028288566889208749, guid: 02daecb0115395844b4932445d039051, type: 3} propertyPath: _scriptableObjects.Array.data[34] value: - objectReference: {fileID: 11400000, guid: 5ccff833a19a71f4499a3b3d786f4d11, type: 2} + objectReference: {fileID: 11400000, guid: c22ff5f49b21f9844a4d9693dc06777c, type: 2} - target: {fileID: 3028288566889208749, guid: 02daecb0115395844b4932445d039051, type: 3} propertyPath: _scriptableObjects.Array.data[35] value: - objectReference: {fileID: 11400000, guid: 2462ecbf554cf1d4883dea95b2504a9f, type: 2} + objectReference: {fileID: 11400000, guid: 5ccff833a19a71f4499a3b3d786f4d11, type: 2} - target: {fileID: 3028288566889208749, guid: 02daecb0115395844b4932445d039051, type: 3} propertyPath: _scriptableObjects.Array.data[36] value: - objectReference: {fileID: 11400000, guid: eee8fc46b43d8144ca603169dc9f26d6, type: 2} + objectReference: {fileID: 11400000, guid: 2462ecbf554cf1d4883dea95b2504a9f, type: 2} - target: {fileID: 3028288566889208749, guid: 02daecb0115395844b4932445d039051, type: 3} propertyPath: _scriptableObjects.Array.data[37] value: - objectReference: {fileID: 11400000, guid: 82472d65388277c449f87a0815b70093, type: 2} + objectReference: {fileID: 11400000, guid: eee8fc46b43d8144ca603169dc9f26d6, type: 2} - target: {fileID: 3028288566889208749, guid: 02daecb0115395844b4932445d039051, type: 3} propertyPath: _scriptableObjects.Array.data[38] value: - objectReference: {fileID: 11400000, guid: 28dbf66982750964aac6760b543389b9, type: 2} + objectReference: {fileID: 11400000, guid: 82472d65388277c449f87a0815b70093, type: 2} - target: {fileID: 3028288566889208749, guid: 02daecb0115395844b4932445d039051, type: 3} propertyPath: _scriptableObjects.Array.data[39] value: - objectReference: {fileID: 11400000, guid: 480af6886a535ee4aa8ea20ff8420405, type: 2} + objectReference: {fileID: 11400000, guid: 28dbf66982750964aac6760b543389b9, type: 2} - target: {fileID: 3028288566889208749, guid: 02daecb0115395844b4932445d039051, type: 3} propertyPath: _scriptableObjects.Array.data[40] value: - objectReference: {fileID: 11400000, guid: 97e48df72a61cce49a948324f6eb38ed, type: 2} + objectReference: {fileID: 11400000, guid: 480af6886a535ee4aa8ea20ff8420405, type: 2} - target: {fileID: 3028288566889208749, guid: 02daecb0115395844b4932445d039051, type: 3} propertyPath: _scriptableObjects.Array.data[41] value: - objectReference: {fileID: 11400000, guid: 1fb1df19432ef1d4e8084017d733b0b7, type: 2} + objectReference: {fileID: 11400000, guid: 97e48df72a61cce49a948324f6eb38ed, type: 2} - target: {fileID: 3028288566889208749, guid: 02daecb0115395844b4932445d039051, type: 3} propertyPath: _scriptableObjects.Array.data[42] value: - objectReference: {fileID: 11400000, guid: 4c72177270b51eb46872d1665e3a097e, type: 2} + objectReference: {fileID: 11400000, guid: 1fb1df19432ef1d4e8084017d733b0b7, type: 2} - target: {fileID: 3028288566889208749, guid: 02daecb0115395844b4932445d039051, type: 3} propertyPath: _scriptableObjects.Array.data[43] value: - objectReference: {fileID: 11400000, guid: 61b21509b3e4be0438ea87b4e7a73e17, type: 2} + objectReference: {fileID: 11400000, guid: 4c72177270b51eb46872d1665e3a097e, type: 2} - target: {fileID: 3028288566889208749, guid: 02daecb0115395844b4932445d039051, type: 3} propertyPath: _scriptableObjects.Array.data[44] value: - objectReference: {fileID: 11400000, guid: 9ff4b606166b07d4bb3afb15e5a23f41, type: 2} + objectReference: {fileID: 11400000, guid: 61b21509b3e4be0438ea87b4e7a73e17, type: 2} - target: {fileID: 3028288566889208749, guid: 02daecb0115395844b4932445d039051, type: 3} propertyPath: _scriptableObjects.Array.data[45] value: - objectReference: {fileID: 11400000, guid: 4728bef0a18b70945bedf5b1190c491e, type: 2} + objectReference: {fileID: 11400000, guid: 9ff4b606166b07d4bb3afb15e5a23f41, type: 2} - target: {fileID: 3028288566889208749, guid: 02daecb0115395844b4932445d039051, type: 3} propertyPath: _scriptableObjects.Array.data[46] value: - objectReference: {fileID: 11400000, guid: f4dcf11b827a5ca49a70b5db1e72e16e, type: 2} + objectReference: {fileID: 11400000, guid: 865ba64414c55f245b62d64b83e0ec9d, type: 2} - target: {fileID: 3028288566889208749, guid: 02daecb0115395844b4932445d039051, type: 3} propertyPath: _scriptableObjects.Array.data[47] value: - objectReference: {fileID: 11400000, guid: ee85fc25d3460c745806649e7f9d166a, type: 2} + objectReference: {fileID: 11400000, guid: 85994a48470bfb741972adb2e34dca4b, type: 2} - target: {fileID: 3028288566889208749, guid: 02daecb0115395844b4932445d039051, type: 3} propertyPath: _scriptableObjects.Array.data[48] value: - objectReference: {fileID: 11400000, guid: f433c214b267f2a40b7427ae18ac80ac, type: 2} + objectReference: {fileID: 11400000, guid: 4728bef0a18b70945bedf5b1190c491e, type: 2} - target: {fileID: 3028288566889208749, guid: 02daecb0115395844b4932445d039051, type: 3} propertyPath: _scriptableObjects.Array.data[49] value: - objectReference: {fileID: 11400000, guid: 4fda8972f6f46684891773953155782e, type: 2} + objectReference: {fileID: 11400000, guid: f4dcf11b827a5ca49a70b5db1e72e16e, type: 2} - target: {fileID: 3028288566889208749, guid: 02daecb0115395844b4932445d039051, type: 3} propertyPath: _scriptableObjects.Array.data[50] value: - objectReference: {fileID: 11400000, guid: 0334115ab72f6d5449497db1bb50377e, type: 2} + objectReference: {fileID: 11400000, guid: ee85fc25d3460c745806649e7f9d166a, type: 2} - target: {fileID: 3028288566889208749, guid: 02daecb0115395844b4932445d039051, type: 3} propertyPath: _scriptableObjects.Array.data[51] value: - objectReference: {fileID: 11400000, guid: b326df01bdba895448b1df3f2918fa9b, type: 2} + objectReference: {fileID: 11400000, guid: f433c214b267f2a40b7427ae18ac80ac, type: 2} - target: {fileID: 3028288566889208749, guid: 02daecb0115395844b4932445d039051, type: 3} propertyPath: _scriptableObjects.Array.data[52] value: - objectReference: {fileID: 11400000, guid: e7ff62830456cdc438af6fd07bcbf5d3, type: 2} + objectReference: {fileID: 11400000, guid: 4fda8972f6f46684891773953155782e, type: 2} - target: {fileID: 3028288566889208749, guid: 02daecb0115395844b4932445d039051, type: 3} propertyPath: _scriptableObjects.Array.data[53] value: - objectReference: {fileID: 11400000, guid: ee631efcc559c264c8c267a0f242f20c, type: 2} + objectReference: {fileID: 11400000, guid: 0334115ab72f6d5449497db1bb50377e, type: 2} - target: {fileID: 3028288566889208749, guid: 02daecb0115395844b4932445d039051, type: 3} propertyPath: _scriptableObjects.Array.data[54] value: - objectReference: {fileID: 11400000, guid: 0409f399020f9ba44a4d563dde4325dc, type: 2} + objectReference: {fileID: 11400000, guid: 4855deb66869b934bb7a63c02d4442fe, type: 2} - target: {fileID: 3028288566889208749, guid: 02daecb0115395844b4932445d039051, type: 3} propertyPath: _scriptableObjects.Array.data[55] value: - objectReference: {fileID: 11400000, guid: 1639cd6a5b9ac1f4c96319ebfcac741a, type: 2} + objectReference: {fileID: 11400000, guid: b326df01bdba895448b1df3f2918fa9b, type: 2} - target: {fileID: 3028288566889208749, guid: 02daecb0115395844b4932445d039051, type: 3} propertyPath: _scriptableObjects.Array.data[56] value: - objectReference: {fileID: 11400000, guid: 0c3268393deaed84d87f041b2a4f970c, type: 2} + objectReference: {fileID: 11400000, guid: 625b62b58ac7f0449a40dd93b073f75d, type: 2} - target: {fileID: 3028288566889208749, guid: 02daecb0115395844b4932445d039051, type: 3} propertyPath: _scriptableObjects.Array.data[57] value: + objectReference: {fileID: 11400000, guid: e7ff62830456cdc438af6fd07bcbf5d3, type: 2} + - target: {fileID: 3028288566889208749, guid: 02daecb0115395844b4932445d039051, type: 3} + propertyPath: _scriptableObjects.Array.data[58] + value: + objectReference: {fileID: 11400000, guid: ee631efcc559c264c8c267a0f242f20c, type: 2} + - target: {fileID: 3028288566889208749, guid: 02daecb0115395844b4932445d039051, type: 3} + propertyPath: _scriptableObjects.Array.data[59] + value: + objectReference: {fileID: 11400000, guid: b39a6491f6ec8cd409c7309c588fcd71, type: 2} + - target: {fileID: 3028288566889208749, guid: 02daecb0115395844b4932445d039051, type: 3} + propertyPath: _scriptableObjects.Array.data[60] + value: + objectReference: {fileID: 11400000, guid: 0409f399020f9ba44a4d563dde4325dc, type: 2} + - target: {fileID: 3028288566889208749, guid: 02daecb0115395844b4932445d039051, type: 3} + propertyPath: _scriptableObjects.Array.data[61] + value: + objectReference: {fileID: 11400000, guid: e30df5cb33c63d0449075a565d8cbf62, type: 2} + - target: {fileID: 3028288566889208749, guid: 02daecb0115395844b4932445d039051, type: 3} + propertyPath: _scriptableObjects.Array.data[62] + value: + objectReference: {fileID: 11400000, guid: 1639cd6a5b9ac1f4c96319ebfcac741a, type: 2} + - target: {fileID: 3028288566889208749, guid: 02daecb0115395844b4932445d039051, type: 3} + propertyPath: _scriptableObjects.Array.data[63] + value: + objectReference: {fileID: 11400000, guid: 9c0d637186327a544bad3f9cbccebd42, type: 2} + - target: {fileID: 3028288566889208749, guid: 02daecb0115395844b4932445d039051, type: 3} + propertyPath: _scriptableObjects.Array.data[64] + value: + objectReference: {fileID: 11400000, guid: 9ec7cc6ffd0ee3546aa48a421746dc06, type: 2} + - target: {fileID: 3028288566889208749, guid: 02daecb0115395844b4932445d039051, type: 3} + propertyPath: _scriptableObjects.Array.data[65] + value: + objectReference: {fileID: 11400000, guid: 0c3268393deaed84d87f041b2a4f970c, type: 2} + - target: {fileID: 3028288566889208749, guid: 02daecb0115395844b4932445d039051, type: 3} + propertyPath: _scriptableObjects.Array.data[66] + value: + objectReference: {fileID: 11400000, guid: 13f86b851462cf04884a0e0d6840e48b, type: 2} + - target: {fileID: 3028288566889208749, guid: 02daecb0115395844b4932445d039051, type: 3} + propertyPath: _scriptableObjects.Array.data[67] + value: + objectReference: {fileID: 11400000, guid: 20ad512fe083b804d85da6dafa69ecaf, type: 2} + - target: {fileID: 3028288566889208749, guid: 02daecb0115395844b4932445d039051, type: 3} + propertyPath: _scriptableObjects.Array.data[68] + value: objectReference: {fileID: 11400000, guid: bb9859dfbbeec1d4583f967ab91c2248, type: 2} + - target: {fileID: 3028288566889208749, guid: 02daecb0115395844b4932445d039051, type: 3} + propertyPath: _scriptableObjects.Array.data[69] + value: + objectReference: {fileID: 11400000, guid: 4a2a06e07aa635c4b9c78c94e0c34f80, type: 2} - target: {fileID: 3028288566889208750, guid: 02daecb0115395844b4932445d039051, type: 3} propertyPath: _gameScene value: Game @@ -2840,6 +2991,82 @@ MonoBehaviour: m_ChildScaleWidth: 0 m_ChildScaleHeight: 0 m_ReverseArrangement: 0 +--- !u!1 &1057693715 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1057693716} + - component: {fileID: 1057693718} + - component: {fileID: 1057693717} + m_Layer: 5 + m_Name: img_hudBackground + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1057693716 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1057693715} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 1862336573} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 170, y: 99} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &1057693717 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1057693715} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 21300000, guid: 6ac775d3d669c124fbbb2032dde07b62, type: 3} + m_Type: 0 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 +--- !u!222 &1057693718 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1057693715} + m_CullTransparentMesh: 1 --- !u!1 &1092900228 GameObject: m_ObjectHideFlags: 0 @@ -3913,6 +4140,7 @@ Transform: - {fileID: 1486138002} - {fileID: 1279975343} - {fileID: 224477685} + - {fileID: 786990836} m_Father: {fileID: 0} m_RootOrder: 11 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} @@ -4593,6 +4821,154 @@ CanvasRenderer: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1709530843} m_CullTransparentMesh: 1 +--- !u!1 &1741170719 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1741170720} + - component: {fileID: 1741170724} + - component: {fileID: 1741170723} + - component: {fileID: 1741170722} + - component: {fileID: 1741170721} + m_Layer: 5 + m_Name: icon_resource + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1741170720 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1741170719} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 1862336573} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0.5, y: 0.5} + m_AnchorMax: {x: 0.5, y: 0.5} + m_AnchoredPosition: {x: -139.5, y: 44.2} + m_SizeDelta: {x: 100, y: 100} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &1741170721 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1741170719} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 3 + m_WrapAround: 0 + m_SelectOnUp: {fileID: 0} + m_SelectOnDown: {fileID: 0} + m_SelectOnLeft: {fileID: 0} + m_SelectOnRight: {fileID: 0} + m_Transition: 1 + m_Colors: + m_NormalColor: {r: 1, g: 1, b: 1, a: 1} + m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} + m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1} + m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} + m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608} + m_ColorMultiplier: 1 + m_FadeDuration: 0.1 + m_SpriteState: + m_HighlightedSprite: {fileID: 0} + m_PressedSprite: {fileID: 0} + m_SelectedSprite: {fileID: 0} + m_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_SelectedTrigger: Selected + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 1741170723} + m_OnClick: + m_PersistentCalls: + m_Calls: + - m_Target: {fileID: 1741170722} + m_TargetAssemblyTypeName: ResourceMaker, GameAssembly + m_MethodName: AddResourceToInventory + m_Mode: 3 + m_Arguments: + m_ObjectArgument: {fileID: 0} + m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine + m_IntArgument: 10 + m_FloatArgument: 0 + m_StringArgument: + m_BoolArgument: 0 + m_CallState: 2 +--- !u!114 &1741170722 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1741170719} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 9dd6bad38b516d64e8e23a5822ca37bb, type: 3} + m_Name: + m_EditorClassIdentifier: + _resourceChoice: 3 + _animate: 0 +--- !u!114 &1741170723 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1741170719} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 21300000, guid: 8354a544f4ca3514e87d40d2de9afaee, type: 3} + m_Type: 0 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 +--- !u!222 &1741170724 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1741170719} + m_CullTransparentMesh: 1 --- !u!1 &1750497989 GameObject: m_ObjectHideFlags: 0 @@ -4966,6 +5342,54 @@ CanvasRenderer: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1811362474} m_CullTransparentMesh: 1 +--- !u!1 &1862336572 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1862336573} + - component: {fileID: 1862336574} + m_Layer: 5 + m_Name: MonsterCore + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1862336573 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1862336572} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 1057693716} + - {fileID: 1741170720} + - {fileID: 2103124032} + m_Father: {fileID: 115274809} + m_RootOrder: 4 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0, y: 0} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 170, y: 99} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!222 &1862336574 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1862336572} + m_CullTransparentMesh: 1 --- !u!1 &1968535034 GameObject: m_ObjectHideFlags: 0 @@ -5427,6 +5851,141 @@ MonoBehaviour: _loadingScreenScene: LoadingScreen _sceneToLoad: LevelSelect _levelToLoad: -1 +--- !u!1 &2103124031 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 2103124032} + - component: {fileID: 2103124034} + - component: {fileID: 2103124033} + m_Layer: 5 + m_Name: txt_amount + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &2103124032 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2103124031} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 1862336573} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0.5, y: 0.5} + m_AnchorMax: {x: 0.5, y: 0.5} + m_AnchoredPosition: {x: -51.5, y: 45.3} + m_SizeDelta: {x: 100, y: 27.8896} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &2103124033 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2103124031} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_text: 0 + m_isRightToLeft: 0 + m_fontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2} + m_sharedMaterial: {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2} + m_fontSharedMaterials: [] + m_fontMaterial: {fileID: 0} + m_fontMaterials: [] + m_fontColor32: + serializedVersion: 2 + rgba: 4294967295 + m_fontColor: {r: 1, g: 1, b: 1, a: 1} + m_enableVertexGradient: 0 + m_colorMode: 3 + m_fontColorGradient: + topLeft: {r: 1, g: 1, b: 1, a: 1} + topRight: {r: 1, g: 1, b: 1, a: 1} + bottomLeft: {r: 1, g: 1, b: 1, a: 1} + bottomRight: {r: 1, g: 1, b: 1, a: 1} + m_fontColorGradientPreset: {fileID: 0} + m_spriteAsset: {fileID: 0} + m_tintAllSprites: 0 + m_StyleSheet: {fileID: 0} + m_TextStyleHashCode: -1183493901 + m_overrideHtmlColors: 0 + m_faceColor: + serializedVersion: 2 + rgba: 4294967295 + m_fontSize: 34 + m_fontSizeBase: 34 + m_fontWeight: 400 + m_enableAutoSizing: 0 + m_fontSizeMin: 18 + m_fontSizeMax: 72 + m_fontStyle: 1 + m_HorizontalAlignment: 2 + m_VerticalAlignment: 512 + m_textAlignment: 65535 + m_characterSpacing: 0 + m_wordSpacing: 0 + m_lineSpacing: 0 + m_lineSpacingMax: 0 + m_paragraphSpacing: 0 + m_charWidthMaxAdj: 0 + m_enableWordWrapping: 1 + m_wordWrappingRatios: 0.4 + m_overflowMode: 0 + m_linkedTextComponent: {fileID: 0} + parentLinkedComponent: {fileID: 0} + m_enableKerning: 1 + m_enableExtraPadding: 0 + checkPaddingRequired: 0 + m_isRichText: 1 + m_parseCtrlCharacters: 1 + m_isOrthographic: 1 + m_isCullingEnabled: 0 + m_horizontalMapping: 0 + m_verticalMapping: 0 + m_uvLineOffset: 0 + m_geometrySortingOrder: 0 + m_IsTextObjectScaleStatic: 0 + m_VertexBufferAutoSizeReduction: 0 + m_useMaxVisibleDescender: 1 + m_pageToDisplay: 1 + m_margin: {x: 0.21078491, y: 5, z: -0.123336785, w: 5} + m_isUsingLegacyAnimationComponent: 0 + m_isVolumetricText: 0 + m_hasFontAssetChanged: 0 + m_baseMaterial: {fileID: 0} + m_maskOffset: {x: 0, y: 0, z: 0, w: 0} +--- !u!222 &2103124034 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2103124031} + m_CullTransparentMesh: 1 --- !u!1 &2127190523 GameObject: m_ObjectHideFlags: 0 diff --git a/Assets/Scripts/Enum.cs b/Assets/Scripts/Enum.cs index e4cd7ed..62e4785 100644 --- a/Assets/Scripts/Enum.cs +++ b/Assets/Scripts/Enum.cs @@ -4,7 +4,8 @@ public class Enum { Rock = 0, Wood = 1, - Food = 2 + Food = 2, + MonsterCore = 3 }; public enum ResourceNodeType { diff --git a/Assets/Scripts/LevelConfig/WaveObserver.cs b/Assets/Scripts/LevelConfig/WaveObserver.cs index bc32068..f8262be 100644 --- a/Assets/Scripts/LevelConfig/WaveObserver.cs +++ b/Assets/Scripts/LevelConfig/WaveObserver.cs @@ -253,7 +253,6 @@ public class WaveObserver : Singleton bool dropsCore = _monsterCoreGroups != null && _monsterCoreGroups.Count > _currentGroupIndex && _monsterCoreGroups[_currentGroupIndex]; int totalToSpawn = _copyGroupSpawn[_currentGroupIndex][groupIndex]; int monsterCoreTarget = -1; - // TODO : Afficher input box quand bool "DropsMonsterCore" est checked // TODO : Si spécifié, nbr fixe de core à drop if (dropsCore && totalToSpawn > 0) { @@ -265,15 +264,12 @@ public class WaveObserver : Singleton int currentRow = rand.Next(_subjects.Count); if (!usedRows.Contains(currentRow)) //If picked row has laready been used { - GameObject spawnedInstance = _subjects[currentRow].TriggerSpawn(currentGroup[groupIndex].GetEnemyObject()); + Opponent spawnedInstance = _subjects[currentRow].TriggerSpawn(currentGroup[groupIndex].GetEnemyObject()).GetComponent(); - // WHen Monster core time + // When Monster core time if (monsterCoreTarget >= 0 && spawnCount == monsterCoreTarget) { - if (spawnedInstance != null) - { - spawnedInstance.AddComponent(); - } + spawnedInstance.ActivateMonsterCore(); } _copyGroupSpawn[_currentGroupIndex][groupIndex]--; diff --git a/Assets/Scripts/LevelEditor/Level.cs b/Assets/Scripts/LevelEditor/Level.cs index 339a6b0..6ad3448 100644 --- a/Assets/Scripts/LevelEditor/Level.cs +++ b/Assets/Scripts/LevelEditor/Level.cs @@ -23,12 +23,15 @@ namespace GatherAndDefend.LevelEditor [SerializeField] private int _startPopulation = 10; [SerializeField] + private int _startMonsterCore = 0; + [SerializeField] private int _startFood = 50; [SerializeField] private int _startWood = 0; [SerializeField] private int _startRock = 0; public int StartPopulation => _startPopulation; + public int StartMonsterCore => _startMonsterCore; public int StartFood => _startFood; public int StartWood => _startWood; public int StartRock => _startRock; diff --git a/Assets/Scripts/Opponent/MonsterCoreDrop.cs b/Assets/Scripts/Opponent/MonsterCoreDrop.cs index 4f1e2d2..b539ff7 100644 --- a/Assets/Scripts/Opponent/MonsterCoreDrop.cs +++ b/Assets/Scripts/Opponent/MonsterCoreDrop.cs @@ -1,40 +1,26 @@ -using System.Collections; -using System.Collections.Generic; using UnityEngine; -public class MonsterCoreDrop : MonoBehaviour +[CreateAssetMenu(menuName = "Gather And Defend/" + nameof(MonsterCoreDrop))] +public class MonsterCoreDrop : ScriptableObject { + [SerializeField] private GameObject _monsterCorePrefab; public void Start() { Debug.Log("MONSTER CORING SSO HARD"); - // Si le prefab n'est pas fixé via l'inspector, tenter de le charger depuis Resources/"Food" - //if (_monsterCorePrefab == null) - //{ - // _monsterCorePrefab = Resources.Load("yieldFood"); - // if (_monsterCorePrefab == null) - // { - // Debug.LogWarning("MonsterCoreDrop: prefab 'yieldFood' introuvable dans le dossier Resources. Assignez-le dans l'inspector ou placez-le dans Resources/yieldFood."); - // } - //} + if (_monsterCorePrefab == null) + { + Debug.LogWarning("Prefab MonsterCore non defini"); + } } - public void Death() + public void Death(Vector3 position) { - //if (_monsterCorePrefab != null) - //{ - // Instantiate(_monsterCorePrefab, transform.position, Quaternion.identity); - //} - Debug.Log("MONSTER CORE DROPPEDD"); - } - - private void OnDestroy() - { - //if (_monsterCorePrefab != null) - //{ - // Instantiate(_monsterCorePrefab, transform.position, Quaternion.identity); - //} + if (_monsterCorePrefab != null) + { + Instantiate(_monsterCorePrefab, position, Quaternion.identity); + } Debug.Log("MONSTER CORE DROPPEDD"); } } diff --git a/Assets/Scripts/Opponent/Opponent.cs b/Assets/Scripts/Opponent/Opponent.cs index 6d845f8..10e5380 100644 --- a/Assets/Scripts/Opponent/Opponent.cs +++ b/Assets/Scripts/Opponent/Opponent.cs @@ -15,6 +15,7 @@ public class Opponent : Entity private WaveObserver _observer; private int _observerIndex; private float _toughness; + private bool _dropsMonsterCore = false; public override void Start() { @@ -59,8 +60,17 @@ public class Opponent : Entity public override void Death() { + if (_dropsMonsterCore) + { + // TODO: Fetch scriptable object from Dict + } _observer.NotifyDies(_observerIndex, _toughness, gameObject); base.Death(); } + public void ActivateMonsterCore() + { + _dropsMonsterCore = true; + } + } diff --git a/Assets/Scripts/Resource/ResourceMaker.cs b/Assets/Scripts/Resource/ResourceMaker.cs index 679b906..d44912c 100644 --- a/Assets/Scripts/Resource/ResourceMaker.cs +++ b/Assets/Scripts/Resource/ResourceMaker.cs @@ -40,6 +40,9 @@ public class ResourceMaker : MonoBehaviour case Enum.ResourceChoice.Food: _destination = GameObject.FindWithTag("Food"); break; + case Enum.ResourceChoice.MonsterCore: + _destination = GameObject.FindWithTag("MonsterCore"); + break; default: _destination = GameObject.FindWithTag("Food"); break; @@ -100,6 +103,9 @@ public class ResourceMaker : MonoBehaviour case Enum.ResourceChoice.Food: _resourceManagerInstance.FoodAmount += amount; break; + case Enum.ResourceChoice.MonsterCore: + _resourceManagerInstance.MonsterCoreAmount += amount; + break; } } diff --git a/Assets/Scripts/Resource/ResourceManager.cs b/Assets/Scripts/Resource/ResourceManager.cs index 61d76fc..6004efa 100644 --- a/Assets/Scripts/Resource/ResourceManager.cs +++ b/Assets/Scripts/Resource/ResourceManager.cs @@ -11,6 +11,7 @@ public class ResourceManager : Singleton private int _rockAmount = 0; private int _woodAmount = 0; private int _foodAmount = 0; + private int _monsterCoreAmount = 0; private float _currentPopulation; private float _maximumPopulation; @@ -29,6 +30,7 @@ public class ResourceManager : Singleton _rockAmount = 0; _woodAmount = 0; _foodAmount = 0; + _monsterCoreAmount = 0; _currentPopulation = 0; _maximumPopulation = 0; } @@ -37,6 +39,7 @@ public class ResourceManager : Singleton RockAmount = level.StartRock; WoodAmount = level.StartWood; FoodAmount = level.StartFood; + MonsterCoreAmount = level.StartMonsterCore; CurrentPopulation = 0; MaximumPopulation = level.StartPopulation; } @@ -77,6 +80,18 @@ public class ResourceManager : Singleton } get { return _foodAmount; } } + public int MonsterCoreAmount + { + set + { + if (value != _monsterCoreAmount) + { + _monsterCoreAmount = value; + EventAggregator.Instance.GetEvent().Invoke(); + } + } + get { return _monsterCoreAmount; } + } public float CurrentPopulation { @@ -112,24 +127,26 @@ public class ResourceManager : Singleton } } - public void Remove(int rock, int wood, int food) + public void Remove(int rock, int wood, int food, int monsterCore = 0) { - int oldRock = _rockAmount, oldWood = _woodAmount, oldFood = _foodAmount; + int oldRock = _rockAmount, oldWood = _woodAmount, oldFood = _foodAmount, oldMonsterCore = _monsterCoreAmount; _rockAmount = (_rockAmount - rock) < MIN ? MIN : _rockAmount - rock; _woodAmount = (_woodAmount - wood) < MIN ? MIN : _woodAmount - wood; _foodAmount = (_foodAmount - food) < MIN ? MIN : _foodAmount - food; + _monsterCoreAmount = (_monsterCoreAmount - monsterCore) < MIN ? MIN : _monsterCoreAmount - monsterCore; - if (oldRock != _rockAmount || oldFood != _foodAmount || oldWood != _woodAmount) + if (oldRock != _rockAmount || oldFood != _foodAmount || oldWood != _woodAmount || oldMonsterCore != _monsterCoreAmount) { EventAggregator.Instance.GetEvent().Invoke(); } } - public bool EnoughFor(int rock, int wood, int food = 0) + public bool EnoughFor(int rock, int wood, int food = 0, int monsterCore = 0) { return _rockAmount >= rock && _woodAmount >= wood - && _foodAmount >= food; + && _foodAmount >= food + && _monsterCoreAmount >= monsterCore; } public bool EnoughPopulationFor(int population = 1) { diff --git a/Assets/Scripts/Resource/ResourceRemover.cs b/Assets/Scripts/Resource/ResourceRemover.cs index f02ee53..ac01811 100644 --- a/Assets/Scripts/Resource/ResourceRemover.cs +++ b/Assets/Scripts/Resource/ResourceRemover.cs @@ -20,6 +20,9 @@ public class ResourceRemover : MonoBehaviour [SerializeField] private int _food; + [SerializeField] + private int _monsterCore; + [SerializeField] private TextMeshProUGUI _text; @@ -40,7 +43,7 @@ public class ResourceRemover : MonoBehaviour private void ChangeAvailability() { //checks if player has enough resources then changes the state of button's availability - if (_resourceManager.EnoughFor(_rock, _wood, _food)) + if (_resourceManager.EnoughFor(_rock, _wood, _food, _monsterCore)) { if (_text.color != Color.green) { @@ -60,7 +63,7 @@ public class ResourceRemover : MonoBehaviour if (_text.color == Color.green) { Debug.Log("Removed items..."); - _resourceManager.Remove(_rock, _wood, _food); + _resourceManager.Remove(_rock, _wood, _food, _monsterCore); } } diff --git a/Assets/Scripts/Resource/ResourceText.cs b/Assets/Scripts/Resource/ResourceText.cs index b8411d0..f7c3fb0 100644 --- a/Assets/Scripts/Resource/ResourceText.cs +++ b/Assets/Scripts/Resource/ResourceText.cs @@ -21,6 +21,8 @@ public class ResourceText : MonoBehaviour [SerializeField] private TextMeshProUGUI _foodText; [SerializeField] + private TextMeshProUGUI _monsterCoreText; + [SerializeField] private TextMeshProUGUI _populationText; [SerializeField] private Image _populationCriticalIndicator; @@ -43,6 +45,7 @@ public class ResourceText : MonoBehaviour _rockText.text = _resourceManager.RockAmount.ToString(); _woodText.text = _resourceManager.WoodAmount.ToString(); _foodText.text = _resourceManager.FoodAmount.ToString(); + _monsterCoreText.text = _resourceManager.MonsterCoreAmount.ToString(); } void RefreshPopulation() { diff --git a/ProjectSettings/TagManager.asset b/ProjectSettings/TagManager.asset index 73d5eb4..1216a35 100644 --- a/ProjectSettings/TagManager.asset +++ b/ProjectSettings/TagManager.asset @@ -11,6 +11,7 @@ TagManager: - Wood - Rock - Upgrade + - MonsterCore layers: - Default - TransparentFX -- 2.34.1 From bcec41db6b062c3118728f34482166884392e97a Mon Sep 17 00:00:00 2001 From: Ader Alisma 01 Date: Sun, 30 Nov 2025 19:47:40 -0500 Subject: [PATCH 6/6] Fin MonsterCore --- Assets/Scenes/Game.unity | 118 +++++++++--------- Assets/Scripts/LevelConfig/WaveConfig.cs | 2 +- Assets/Scripts/LevelConfig/WaveObserver.cs | 20 ++- Assets/Scripts/Opponent/MonsterCoreDrop.cs | 26 ---- .../Scripts/Opponent/MonsterCoreDrop.cs.meta | 11 -- Assets/Scripts/Opponent/Opponent.cs | 48 ++++--- 6 files changed, 101 insertions(+), 124 deletions(-) delete mode 100644 Assets/Scripts/Opponent/MonsterCoreDrop.cs delete mode 100644 Assets/Scripts/Opponent/MonsterCoreDrop.cs.meta diff --git a/Assets/Scenes/Game.unity b/Assets/Scenes/Game.unity index bf5bb13..d9dfc3b 100644 --- a/Assets/Scenes/Game.unity +++ b/Assets/Scenes/Game.unity @@ -2217,7 +2217,7 @@ PrefabInstance: objectReference: {fileID: -2253911629886400664, guid: 7339506cf80058543b88c545d0979ebd, type: 3} - target: {fileID: 3028288566889208749, guid: 02daecb0115395844b4932445d039051, type: 3} propertyPath: _scriptableObjects.Array.size - value: 70 + value: 69 objectReference: {fileID: 0} - target: {fileID: 3028288566889208749, guid: 02daecb0115395844b4932445d039051, type: 3} propertyPath: _scriptableObjects.Array.data[0] @@ -2266,235 +2266,235 @@ PrefabInstance: - target: {fileID: 3028288566889208749, guid: 02daecb0115395844b4932445d039051, type: 3} propertyPath: _scriptableObjects.Array.data[11] value: - objectReference: {fileID: 11400000, guid: 0d11424e05059b143b2bb6eb98ed1262, type: 2} + objectReference: {fileID: 11400000, guid: a387250a316b97e43be83b85980101e1, type: 2} - target: {fileID: 3028288566889208749, guid: 02daecb0115395844b4932445d039051, type: 3} propertyPath: _scriptableObjects.Array.data[12] value: - objectReference: {fileID: 11400000, guid: a387250a316b97e43be83b85980101e1, type: 2} + objectReference: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2} - target: {fileID: 3028288566889208749, guid: 02daecb0115395844b4932445d039051, type: 3} propertyPath: _scriptableObjects.Array.data[13] value: - objectReference: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2} + objectReference: {fileID: 11400000, guid: 5f47d74ebc4a8fe439ac6a4fe9ec436f, type: 2} - target: {fileID: 3028288566889208749, guid: 02daecb0115395844b4932445d039051, type: 3} propertyPath: _scriptableObjects.Array.data[14] value: - objectReference: {fileID: 11400000, guid: 5f47d74ebc4a8fe439ac6a4fe9ec436f, type: 2} + objectReference: {fileID: 11400000, guid: 760092a3b8a4148488386ce5208108f4, type: 2} - target: {fileID: 3028288566889208749, guid: 02daecb0115395844b4932445d039051, type: 3} propertyPath: _scriptableObjects.Array.data[15] value: - objectReference: {fileID: 11400000, guid: 760092a3b8a4148488386ce5208108f4, type: 2} + objectReference: {fileID: 11400000, guid: 4abc113f1a69a564b863f76e96756a75, type: 2} - target: {fileID: 3028288566889208749, guid: 02daecb0115395844b4932445d039051, type: 3} propertyPath: _scriptableObjects.Array.data[16] value: - objectReference: {fileID: 11400000, guid: 4abc113f1a69a564b863f76e96756a75, type: 2} + objectReference: {fileID: 11400000, guid: a6e34739c9325da4cac4fbaea30d052c, type: 2} - target: {fileID: 3028288566889208749, guid: 02daecb0115395844b4932445d039051, type: 3} propertyPath: _scriptableObjects.Array.data[17] value: - objectReference: {fileID: 11400000, guid: a6e34739c9325da4cac4fbaea30d052c, type: 2} + objectReference: {fileID: 11400000, guid: a432e0009e329054fb5f63ffc8aa5da1, type: 2} - target: {fileID: 3028288566889208749, guid: 02daecb0115395844b4932445d039051, type: 3} propertyPath: _scriptableObjects.Array.data[18] value: - objectReference: {fileID: 11400000, guid: a432e0009e329054fb5f63ffc8aa5da1, type: 2} + objectReference: {fileID: 11400000, guid: 04c2cffdf7facd847b42eba02033c969, type: 2} - target: {fileID: 3028288566889208749, guid: 02daecb0115395844b4932445d039051, type: 3} propertyPath: _scriptableObjects.Array.data[19] value: - objectReference: {fileID: 11400000, guid: 04c2cffdf7facd847b42eba02033c969, type: 2} + objectReference: {fileID: 11400000, guid: f1253a96234fecb4b82e83d1cec40677, type: 2} - target: {fileID: 3028288566889208749, guid: 02daecb0115395844b4932445d039051, type: 3} propertyPath: _scriptableObjects.Array.data[20] value: - objectReference: {fileID: 11400000, guid: f1253a96234fecb4b82e83d1cec40677, type: 2} + objectReference: {fileID: 11400000, guid: 91f94bcdfb059454481917b575559c48, type: 2} - target: {fileID: 3028288566889208749, guid: 02daecb0115395844b4932445d039051, type: 3} propertyPath: _scriptableObjects.Array.data[21] value: - objectReference: {fileID: 11400000, guid: 91f94bcdfb059454481917b575559c48, type: 2} + objectReference: {fileID: 11400000, guid: d37561e153d6a6448a03839488fdec5e, type: 2} - target: {fileID: 3028288566889208749, guid: 02daecb0115395844b4932445d039051, type: 3} propertyPath: _scriptableObjects.Array.data[22] value: - objectReference: {fileID: 11400000, guid: d37561e153d6a6448a03839488fdec5e, type: 2} + objectReference: {fileID: 11400000, guid: 7a1313e5c16e74c4ba11a8114b9fd786, type: 2} - target: {fileID: 3028288566889208749, guid: 02daecb0115395844b4932445d039051, type: 3} propertyPath: _scriptableObjects.Array.data[23] value: - objectReference: {fileID: 11400000, guid: 7a1313e5c16e74c4ba11a8114b9fd786, type: 2} + objectReference: {fileID: 11400000, guid: b501f7eea1fdfb843853bcba5b30533a, type: 2} - target: {fileID: 3028288566889208749, guid: 02daecb0115395844b4932445d039051, type: 3} propertyPath: _scriptableObjects.Array.data[24] value: - objectReference: {fileID: 11400000, guid: b501f7eea1fdfb843853bcba5b30533a, type: 2} + objectReference: {fileID: 11400000, guid: 0a9c94eb38c575948992453fc29bcede, type: 2} - target: {fileID: 3028288566889208749, guid: 02daecb0115395844b4932445d039051, type: 3} propertyPath: _scriptableObjects.Array.data[25] value: - objectReference: {fileID: 11400000, guid: 0a9c94eb38c575948992453fc29bcede, type: 2} + objectReference: {fileID: 11400000, guid: ec229632b369eb746a30dbfafe3de373, type: 2} - target: {fileID: 3028288566889208749, guid: 02daecb0115395844b4932445d039051, type: 3} propertyPath: _scriptableObjects.Array.data[26] value: - objectReference: {fileID: 11400000, guid: ec229632b369eb746a30dbfafe3de373, type: 2} + objectReference: {fileID: 11400000, guid: 7b9178a588ec3c5479d7ea8989cc0b35, type: 2} - target: {fileID: 3028288566889208749, guid: 02daecb0115395844b4932445d039051, type: 3} propertyPath: _scriptableObjects.Array.data[27] value: - objectReference: {fileID: 11400000, guid: 7b9178a588ec3c5479d7ea8989cc0b35, type: 2} + objectReference: {fileID: 11400000, guid: 042265144e4e260438b10752dc404d71, type: 2} - target: {fileID: 3028288566889208749, guid: 02daecb0115395844b4932445d039051, type: 3} propertyPath: _scriptableObjects.Array.data[28] value: - objectReference: {fileID: 11400000, guid: 042265144e4e260438b10752dc404d71, type: 2} + objectReference: {fileID: 11400000, guid: 363fc227e0d4c98488d7dccb6c8acae0, type: 2} - target: {fileID: 3028288566889208749, guid: 02daecb0115395844b4932445d039051, type: 3} propertyPath: _scriptableObjects.Array.data[29] value: - objectReference: {fileID: 11400000, guid: 363fc227e0d4c98488d7dccb6c8acae0, type: 2} + objectReference: {fileID: 11400000, guid: d8140ae36f1b7fd4fb1a57ab3dc69de4, type: 2} - target: {fileID: 3028288566889208749, guid: 02daecb0115395844b4932445d039051, type: 3} propertyPath: _scriptableObjects.Array.data[30] value: - objectReference: {fileID: 11400000, guid: d8140ae36f1b7fd4fb1a57ab3dc69de4, type: 2} + objectReference: {fileID: 11400000, guid: 2a601d614d4075f4fbe54dcab4016d2d, type: 2} - target: {fileID: 3028288566889208749, guid: 02daecb0115395844b4932445d039051, type: 3} propertyPath: _scriptableObjects.Array.data[31] value: - objectReference: {fileID: 11400000, guid: 2a601d614d4075f4fbe54dcab4016d2d, type: 2} + objectReference: {fileID: 11400000, guid: f6660e22eb6be1d4589c27cb3bec6eb2, type: 2} - target: {fileID: 3028288566889208749, guid: 02daecb0115395844b4932445d039051, type: 3} propertyPath: _scriptableObjects.Array.data[32] value: - objectReference: {fileID: 11400000, guid: f6660e22eb6be1d4589c27cb3bec6eb2, type: 2} + objectReference: {fileID: 11400000, guid: e9e134bb6a24e4647a27955d3d276bd2, type: 2} - target: {fileID: 3028288566889208749, guid: 02daecb0115395844b4932445d039051, type: 3} propertyPath: _scriptableObjects.Array.data[33] value: - objectReference: {fileID: 11400000, guid: e9e134bb6a24e4647a27955d3d276bd2, type: 2} + objectReference: {fileID: 11400000, guid: c22ff5f49b21f9844a4d9693dc06777c, type: 2} - target: {fileID: 3028288566889208749, guid: 02daecb0115395844b4932445d039051, type: 3} propertyPath: _scriptableObjects.Array.data[34] value: - objectReference: {fileID: 11400000, guid: c22ff5f49b21f9844a4d9693dc06777c, type: 2} + objectReference: {fileID: 11400000, guid: 5ccff833a19a71f4499a3b3d786f4d11, type: 2} - target: {fileID: 3028288566889208749, guid: 02daecb0115395844b4932445d039051, type: 3} propertyPath: _scriptableObjects.Array.data[35] value: - objectReference: {fileID: 11400000, guid: 5ccff833a19a71f4499a3b3d786f4d11, type: 2} + objectReference: {fileID: 11400000, guid: 2462ecbf554cf1d4883dea95b2504a9f, type: 2} - target: {fileID: 3028288566889208749, guid: 02daecb0115395844b4932445d039051, type: 3} propertyPath: _scriptableObjects.Array.data[36] value: - objectReference: {fileID: 11400000, guid: 2462ecbf554cf1d4883dea95b2504a9f, type: 2} + objectReference: {fileID: 11400000, guid: eee8fc46b43d8144ca603169dc9f26d6, type: 2} - target: {fileID: 3028288566889208749, guid: 02daecb0115395844b4932445d039051, type: 3} propertyPath: _scriptableObjects.Array.data[37] value: - objectReference: {fileID: 11400000, guid: eee8fc46b43d8144ca603169dc9f26d6, type: 2} + objectReference: {fileID: 11400000, guid: 82472d65388277c449f87a0815b70093, type: 2} - target: {fileID: 3028288566889208749, guid: 02daecb0115395844b4932445d039051, type: 3} propertyPath: _scriptableObjects.Array.data[38] value: - objectReference: {fileID: 11400000, guid: 82472d65388277c449f87a0815b70093, type: 2} + objectReference: {fileID: 11400000, guid: 28dbf66982750964aac6760b543389b9, type: 2} - target: {fileID: 3028288566889208749, guid: 02daecb0115395844b4932445d039051, type: 3} propertyPath: _scriptableObjects.Array.data[39] value: - objectReference: {fileID: 11400000, guid: 28dbf66982750964aac6760b543389b9, type: 2} + objectReference: {fileID: 11400000, guid: 480af6886a535ee4aa8ea20ff8420405, type: 2} - target: {fileID: 3028288566889208749, guid: 02daecb0115395844b4932445d039051, type: 3} propertyPath: _scriptableObjects.Array.data[40] value: - objectReference: {fileID: 11400000, guid: 480af6886a535ee4aa8ea20ff8420405, type: 2} + objectReference: {fileID: 11400000, guid: 97e48df72a61cce49a948324f6eb38ed, type: 2} - target: {fileID: 3028288566889208749, guid: 02daecb0115395844b4932445d039051, type: 3} propertyPath: _scriptableObjects.Array.data[41] value: - objectReference: {fileID: 11400000, guid: 97e48df72a61cce49a948324f6eb38ed, type: 2} + objectReference: {fileID: 11400000, guid: 1fb1df19432ef1d4e8084017d733b0b7, type: 2} - target: {fileID: 3028288566889208749, guid: 02daecb0115395844b4932445d039051, type: 3} propertyPath: _scriptableObjects.Array.data[42] value: - objectReference: {fileID: 11400000, guid: 1fb1df19432ef1d4e8084017d733b0b7, type: 2} + objectReference: {fileID: 11400000, guid: 4c72177270b51eb46872d1665e3a097e, type: 2} - target: {fileID: 3028288566889208749, guid: 02daecb0115395844b4932445d039051, type: 3} propertyPath: _scriptableObjects.Array.data[43] value: - objectReference: {fileID: 11400000, guid: 4c72177270b51eb46872d1665e3a097e, type: 2} + objectReference: {fileID: 11400000, guid: 61b21509b3e4be0438ea87b4e7a73e17, type: 2} - target: {fileID: 3028288566889208749, guid: 02daecb0115395844b4932445d039051, type: 3} propertyPath: _scriptableObjects.Array.data[44] value: - objectReference: {fileID: 11400000, guid: 61b21509b3e4be0438ea87b4e7a73e17, type: 2} + objectReference: {fileID: 11400000, guid: 9ff4b606166b07d4bb3afb15e5a23f41, type: 2} - target: {fileID: 3028288566889208749, guid: 02daecb0115395844b4932445d039051, type: 3} propertyPath: _scriptableObjects.Array.data[45] value: - objectReference: {fileID: 11400000, guid: 9ff4b606166b07d4bb3afb15e5a23f41, type: 2} + objectReference: {fileID: 11400000, guid: 865ba64414c55f245b62d64b83e0ec9d, type: 2} - target: {fileID: 3028288566889208749, guid: 02daecb0115395844b4932445d039051, type: 3} propertyPath: _scriptableObjects.Array.data[46] value: - objectReference: {fileID: 11400000, guid: 865ba64414c55f245b62d64b83e0ec9d, type: 2} + objectReference: {fileID: 11400000, guid: 85994a48470bfb741972adb2e34dca4b, type: 2} - target: {fileID: 3028288566889208749, guid: 02daecb0115395844b4932445d039051, type: 3} propertyPath: _scriptableObjects.Array.data[47] value: - objectReference: {fileID: 11400000, guid: 85994a48470bfb741972adb2e34dca4b, type: 2} + objectReference: {fileID: 11400000, guid: 4728bef0a18b70945bedf5b1190c491e, type: 2} - target: {fileID: 3028288566889208749, guid: 02daecb0115395844b4932445d039051, type: 3} propertyPath: _scriptableObjects.Array.data[48] value: - objectReference: {fileID: 11400000, guid: 4728bef0a18b70945bedf5b1190c491e, type: 2} + objectReference: {fileID: 11400000, guid: f4dcf11b827a5ca49a70b5db1e72e16e, type: 2} - target: {fileID: 3028288566889208749, guid: 02daecb0115395844b4932445d039051, type: 3} propertyPath: _scriptableObjects.Array.data[49] value: - objectReference: {fileID: 11400000, guid: f4dcf11b827a5ca49a70b5db1e72e16e, type: 2} + objectReference: {fileID: 11400000, guid: ee85fc25d3460c745806649e7f9d166a, type: 2} - target: {fileID: 3028288566889208749, guid: 02daecb0115395844b4932445d039051, type: 3} propertyPath: _scriptableObjects.Array.data[50] value: - objectReference: {fileID: 11400000, guid: ee85fc25d3460c745806649e7f9d166a, type: 2} + objectReference: {fileID: 11400000, guid: f433c214b267f2a40b7427ae18ac80ac, type: 2} - target: {fileID: 3028288566889208749, guid: 02daecb0115395844b4932445d039051, type: 3} propertyPath: _scriptableObjects.Array.data[51] value: - objectReference: {fileID: 11400000, guid: f433c214b267f2a40b7427ae18ac80ac, type: 2} + objectReference: {fileID: 11400000, guid: 4fda8972f6f46684891773953155782e, type: 2} - target: {fileID: 3028288566889208749, guid: 02daecb0115395844b4932445d039051, type: 3} propertyPath: _scriptableObjects.Array.data[52] value: - objectReference: {fileID: 11400000, guid: 4fda8972f6f46684891773953155782e, type: 2} + objectReference: {fileID: 11400000, guid: 0334115ab72f6d5449497db1bb50377e, type: 2} - target: {fileID: 3028288566889208749, guid: 02daecb0115395844b4932445d039051, type: 3} propertyPath: _scriptableObjects.Array.data[53] value: - objectReference: {fileID: 11400000, guid: 0334115ab72f6d5449497db1bb50377e, type: 2} + objectReference: {fileID: 11400000, guid: 4855deb66869b934bb7a63c02d4442fe, type: 2} - target: {fileID: 3028288566889208749, guid: 02daecb0115395844b4932445d039051, type: 3} propertyPath: _scriptableObjects.Array.data[54] value: - objectReference: {fileID: 11400000, guid: 4855deb66869b934bb7a63c02d4442fe, type: 2} + objectReference: {fileID: 11400000, guid: b326df01bdba895448b1df3f2918fa9b, type: 2} - target: {fileID: 3028288566889208749, guid: 02daecb0115395844b4932445d039051, type: 3} propertyPath: _scriptableObjects.Array.data[55] value: - objectReference: {fileID: 11400000, guid: b326df01bdba895448b1df3f2918fa9b, type: 2} + objectReference: {fileID: 11400000, guid: 625b62b58ac7f0449a40dd93b073f75d, type: 2} - target: {fileID: 3028288566889208749, guid: 02daecb0115395844b4932445d039051, type: 3} propertyPath: _scriptableObjects.Array.data[56] value: - objectReference: {fileID: 11400000, guid: 625b62b58ac7f0449a40dd93b073f75d, type: 2} + objectReference: {fileID: 11400000, guid: e7ff62830456cdc438af6fd07bcbf5d3, type: 2} - target: {fileID: 3028288566889208749, guid: 02daecb0115395844b4932445d039051, type: 3} propertyPath: _scriptableObjects.Array.data[57] value: - objectReference: {fileID: 11400000, guid: e7ff62830456cdc438af6fd07bcbf5d3, type: 2} + objectReference: {fileID: 11400000, guid: ee631efcc559c264c8c267a0f242f20c, type: 2} - target: {fileID: 3028288566889208749, guid: 02daecb0115395844b4932445d039051, type: 3} propertyPath: _scriptableObjects.Array.data[58] value: - objectReference: {fileID: 11400000, guid: ee631efcc559c264c8c267a0f242f20c, type: 2} + objectReference: {fileID: 11400000, guid: b39a6491f6ec8cd409c7309c588fcd71, type: 2} - target: {fileID: 3028288566889208749, guid: 02daecb0115395844b4932445d039051, type: 3} propertyPath: _scriptableObjects.Array.data[59] value: - objectReference: {fileID: 11400000, guid: b39a6491f6ec8cd409c7309c588fcd71, type: 2} + objectReference: {fileID: 11400000, guid: 0409f399020f9ba44a4d563dde4325dc, type: 2} - target: {fileID: 3028288566889208749, guid: 02daecb0115395844b4932445d039051, type: 3} propertyPath: _scriptableObjects.Array.data[60] value: - objectReference: {fileID: 11400000, guid: 0409f399020f9ba44a4d563dde4325dc, type: 2} + objectReference: {fileID: 11400000, guid: e30df5cb33c63d0449075a565d8cbf62, type: 2} - target: {fileID: 3028288566889208749, guid: 02daecb0115395844b4932445d039051, type: 3} propertyPath: _scriptableObjects.Array.data[61] value: - objectReference: {fileID: 11400000, guid: e30df5cb33c63d0449075a565d8cbf62, type: 2} + objectReference: {fileID: 11400000, guid: 1639cd6a5b9ac1f4c96319ebfcac741a, type: 2} - target: {fileID: 3028288566889208749, guid: 02daecb0115395844b4932445d039051, type: 3} propertyPath: _scriptableObjects.Array.data[62] value: - objectReference: {fileID: 11400000, guid: 1639cd6a5b9ac1f4c96319ebfcac741a, type: 2} + objectReference: {fileID: 11400000, guid: 9c0d637186327a544bad3f9cbccebd42, type: 2} - target: {fileID: 3028288566889208749, guid: 02daecb0115395844b4932445d039051, type: 3} propertyPath: _scriptableObjects.Array.data[63] value: - objectReference: {fileID: 11400000, guid: 9c0d637186327a544bad3f9cbccebd42, type: 2} + objectReference: {fileID: 11400000, guid: 9ec7cc6ffd0ee3546aa48a421746dc06, type: 2} - target: {fileID: 3028288566889208749, guid: 02daecb0115395844b4932445d039051, type: 3} propertyPath: _scriptableObjects.Array.data[64] value: - objectReference: {fileID: 11400000, guid: 9ec7cc6ffd0ee3546aa48a421746dc06, type: 2} + objectReference: {fileID: 11400000, guid: 0c3268393deaed84d87f041b2a4f970c, type: 2} - target: {fileID: 3028288566889208749, guid: 02daecb0115395844b4932445d039051, type: 3} propertyPath: _scriptableObjects.Array.data[65] value: - objectReference: {fileID: 11400000, guid: 0c3268393deaed84d87f041b2a4f970c, type: 2} + objectReference: {fileID: 11400000, guid: 13f86b851462cf04884a0e0d6840e48b, type: 2} - target: {fileID: 3028288566889208749, guid: 02daecb0115395844b4932445d039051, type: 3} propertyPath: _scriptableObjects.Array.data[66] value: - objectReference: {fileID: 11400000, guid: 13f86b851462cf04884a0e0d6840e48b, type: 2} + objectReference: {fileID: 11400000, guid: 20ad512fe083b804d85da6dafa69ecaf, type: 2} - target: {fileID: 3028288566889208749, guid: 02daecb0115395844b4932445d039051, type: 3} propertyPath: _scriptableObjects.Array.data[67] value: - objectReference: {fileID: 11400000, guid: 20ad512fe083b804d85da6dafa69ecaf, type: 2} + objectReference: {fileID: 11400000, guid: bb9859dfbbeec1d4583f967ab91c2248, type: 2} - target: {fileID: 3028288566889208749, guid: 02daecb0115395844b4932445d039051, type: 3} propertyPath: _scriptableObjects.Array.data[68] value: - objectReference: {fileID: 11400000, guid: bb9859dfbbeec1d4583f967ab91c2248, type: 2} + objectReference: {fileID: 11400000, guid: 4a2a06e07aa635c4b9c78c94e0c34f80, type: 2} - target: {fileID: 3028288566889208749, guid: 02daecb0115395844b4932445d039051, type: 3} propertyPath: _scriptableObjects.Array.data[69] value: diff --git a/Assets/Scripts/LevelConfig/WaveConfig.cs b/Assets/Scripts/LevelConfig/WaveConfig.cs index 35ca7fa..bd69d40 100644 --- a/Assets/Scripts/LevelConfig/WaveConfig.cs +++ b/Assets/Scripts/LevelConfig/WaveConfig.cs @@ -5,7 +5,7 @@ public class GroupList { public List groupSpawn; public float triggerTime; - public bool dropsMonsterCore; + public int monsterCoreAmount; } [CreateAssetMenu(menuName = "Gather And Defend/Levels/WaveConfig")] public class WaveConfig : ScriptableObject diff --git a/Assets/Scripts/LevelConfig/WaveObserver.cs b/Assets/Scripts/LevelConfig/WaveObserver.cs index f8262be..4111ad8 100644 --- a/Assets/Scripts/LevelConfig/WaveObserver.cs +++ b/Assets/Scripts/LevelConfig/WaveObserver.cs @@ -13,7 +13,7 @@ public class WaveObserver : Singleton private List _copyConstantSpawn; private List _intervalTiming = new List(); private List> _copyGroupSpawn; //Contains count of enemies per group - private List _monsterCoreGroups; + private List _monsterCoreGroupAmount; private WaveConfig _levelConfig; private int _spawnerTiming = 0; private int _currentGroupIndex = 0; @@ -29,7 +29,7 @@ public class WaveObserver : Singleton _copyConstantSpawn = new List(); _copyGroupSpawn = new List>(); _groupSpawnTimers = new List(); - _monsterCoreGroups = new List(); + _monsterCoreGroupAmount = new List(); _spawnerTiming = 0; _currentGroupIndex = 0; @@ -53,7 +53,7 @@ public class WaveObserver : Singleton _copyGroupSpawn[index].Add(_levelConfig.NestedGroupSpawn[index].groupSpawn[nestedIndex].Count); } _groupSpawnTimers.Add(_levelConfig.NestedGroupSpawn[index].triggerTime); - _monsterCoreGroups.Add(_levelConfig.NestedGroupSpawn[index].dropsMonsterCore); + _monsterCoreGroupAmount.Add(_levelConfig.NestedGroupSpawn[index].monsterCoreAmount); } // Start game timer, at the end, player wins. @@ -148,6 +148,7 @@ public class WaveObserver : Singleton */ public void NotifyDies(int position, float toughness, GameObject paramPrefab) { + Debug.Log("Enemy died : " + paramPrefab.name); _aliveEnemyCount[position] -= toughness; if (_aliveEnemyCount[position] < MAXTOUGHNESS) { @@ -250,14 +251,8 @@ public class WaveObserver : Singleton private void CycleRows(List usedRows, List currentGroup, int groupIndex) { System.Random rand = new System.Random(); - bool dropsCore = _monsterCoreGroups != null && _monsterCoreGroups.Count > _currentGroupIndex && _monsterCoreGroups[_currentGroupIndex]; + int totalMonsterCores = _monsterCoreGroupAmount[_currentGroupIndex]; int totalToSpawn = _copyGroupSpawn[_currentGroupIndex][groupIndex]; - int monsterCoreTarget = -1; - // TODO : Si spécifié, nbr fixe de core à drop - if (dropsCore && totalToSpawn > 0) - { - monsterCoreTarget = rand.Next(0, totalToSpawn); - } int spawnCount = 0; while (usedRows.Count < _subjects.Count) { @@ -266,10 +261,11 @@ public class WaveObserver : Singleton { Opponent spawnedInstance = _subjects[currentRow].TriggerSpawn(currentGroup[groupIndex].GetEnemyObject()).GetComponent(); - // When Monster core time - if (monsterCoreTarget >= 0 && spawnCount == monsterCoreTarget) + // When Monster core time : Random or remaining spawns >= remaining monster cores + if ((rand.Next() % 2 == 0 || totalMonsterCores <= totalToSpawn) && totalMonsterCores > 0) { spawnedInstance.ActivateMonsterCore(); + totalMonsterCores--; } _copyGroupSpawn[_currentGroupIndex][groupIndex]--; diff --git a/Assets/Scripts/Opponent/MonsterCoreDrop.cs b/Assets/Scripts/Opponent/MonsterCoreDrop.cs deleted file mode 100644 index b539ff7..0000000 --- a/Assets/Scripts/Opponent/MonsterCoreDrop.cs +++ /dev/null @@ -1,26 +0,0 @@ -using UnityEngine; - -[CreateAssetMenu(menuName = "Gather And Defend/" + nameof(MonsterCoreDrop))] -public class MonsterCoreDrop : ScriptableObject -{ - [SerializeField] - private GameObject _monsterCorePrefab; - - public void Start() - { - Debug.Log("MONSTER CORING SSO HARD"); - if (_monsterCorePrefab == null) - { - Debug.LogWarning("Prefab MonsterCore non defini"); - } - } - - public void Death(Vector3 position) - { - if (_monsterCorePrefab != null) - { - Instantiate(_monsterCorePrefab, position, Quaternion.identity); - } - Debug.Log("MONSTER CORE DROPPEDD"); - } -} diff --git a/Assets/Scripts/Opponent/MonsterCoreDrop.cs.meta b/Assets/Scripts/Opponent/MonsterCoreDrop.cs.meta deleted file mode 100644 index 9443e99..0000000 --- a/Assets/Scripts/Opponent/MonsterCoreDrop.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: f431d5fa196e5ea4da69343642d10d2f -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Opponent/Opponent.cs b/Assets/Scripts/Opponent/Opponent.cs index 10e5380..b29ff5f 100644 --- a/Assets/Scripts/Opponent/Opponent.cs +++ b/Assets/Scripts/Opponent/Opponent.cs @@ -1,6 +1,7 @@ using System.Collections; using System.Collections.Generic; using UnityEngine; +using UnityEngine.UIElements; public class Opponent : Entity { @@ -15,7 +16,9 @@ public class Opponent : Entity private WaveObserver _observer; private int _observerIndex; private float _toughness; - private bool _dropsMonsterCore = false; + private bool _hasMonsterCore = false; + private bool _isDying = false; + public override void Start() { @@ -28,14 +31,14 @@ public class Opponent : Entity _observerIndex = _observer.NotifyEnemy(transform.position.y, _toughness); } - public override void Update() + public override void Update() { base.Update(); - if(IsEnemyDetected) + if (IsEnemyDetected) { AttackEnemy(); } - else + else { _movementVector.x = -Time.deltaTime * Speed; @@ -45,32 +48,47 @@ public class Opponent : Entity } } - void AttackEnemy() + void AttackEnemy() { //Attack Cooldown - if(AttackInterval < AttackSpeedWait) + if (AttackInterval < AttackSpeedWait) { - Animation.PlayAttackAnim(); + Animation.PlayAttackAnim(); - AttackSpeedWait = 0f; - } + AttackSpeedWait = 0f; + } - AttackSpeedWait += Time.deltaTime; + AttackSpeedWait += Time.deltaTime; } public override void Death() { - if (_dropsMonsterCore) + if (!_isDying) { - // TODO: Fetch scriptable object from Dict + if (_hasMonsterCore) + { + DropMonsterCore(); + } + _isDying = true; + _observer.NotifyDies(_observerIndex, _toughness, gameObject); + base.Death(); + } + } + + private void DropMonsterCore() + { + GameObject _monsterCorePrefab = Database.Instance.Prefabs["yieldMonsterCore"]; + + if (_monsterCorePrefab != null) + { + Instantiate(_monsterCorePrefab, transform.position, Quaternion.identity); + _hasMonsterCore = false; } - _observer.NotifyDies(_observerIndex, _toughness, gameObject); - base.Death(); } public void ActivateMonsterCore() { - _dropsMonsterCore = true; + _hasMonsterCore = true; } } -- 2.34.1