From 4ae8f0dcfac6a4d87276d088475603f4ea1d7e0e Mon Sep 17 00:00:00 2001 From: Ader Alisma 01 Date: Sat, 4 Nov 2023 10:01:40 -0400 Subject: [PATCH 01/13] Start delay with for loop and breakTag --- Assets/Design/Levels/WaveConfig01.asset | 6 +-- Assets/Scripts/LevelConfig/WaveObserver.cs | 57 +++++++++++++++++++--- Assets/Scripts/Tiles/SpawnerTile.cs | 13 ++++- 3 files changed, 64 insertions(+), 12 deletions(-) diff --git a/Assets/Design/Levels/WaveConfig01.asset b/Assets/Design/Levels/WaveConfig01.asset index 76aa0cf..db67372 100644 --- a/Assets/Design/Levels/WaveConfig01.asset +++ b/Assets/Design/Levels/WaveConfig01.asset @@ -18,10 +18,10 @@ MonoBehaviour: _nestedGroupSpawn: - groupSpawn: - _enemy: {fileID: 313037212318601125, guid: 5bbf0d85fa5bb3f4599da79f0a84e3a9, type: 3} - _count: 11 + _count: 0 - _enemy: {fileID: 313037212318601125, guid: 5bbf0d85fa5bb3f4599da79f0a84e3a9, type: 3} - _count: 4 - triggerTime: 0.5 + _count: 2 + triggerTime: 0.1 - groupSpawn: - _enemy: {fileID: 313037212318601125, guid: 5bbf0d85fa5bb3f4599da79f0a84e3a9, type: 3} _count: 1 diff --git a/Assets/Scripts/LevelConfig/WaveObserver.cs b/Assets/Scripts/LevelConfig/WaveObserver.cs index 3229353..9b12dd7 100644 --- a/Assets/Scripts/LevelConfig/WaveObserver.cs +++ b/Assets/Scripts/LevelConfig/WaveObserver.cs @@ -6,7 +6,7 @@ public class WaveObserver : Singleton private List _subjects = new List(); private List _aliveEnemyCount = new List(); private List _copyConstantSpawn; - private List _copyGroupSpawn; + private List> _copyGroupSpawn; private List _groupSpawnTimers; private WaveConfig _levelConfig; private const int MAXTOUGHNESS = 10; @@ -19,7 +19,7 @@ public class WaveObserver : Singleton { _levelConfig = config; _copyConstantSpawn = new List(); - _copyGroupSpawn = new List(); + _copyGroupSpawn = new List>(); _groupSpawnTimers = new List(); foreach (EnemyType enemy in _levelConfig.ConstantSpawn) { @@ -27,7 +27,11 @@ public class WaveObserver : Singleton } for (int index = 0; index < _levelConfig.NestedGroupSpawn.Count; index++) { - _copyGroupSpawn.Add(_levelConfig.NestedGroupSpawn[index]); + _copyGroupSpawn.Add(new List()); + for (int nestedIndex = 0; nestedIndex < _levelConfig.NestedGroupSpawn[index].groupSpawn.Count; nestedIndex++) + { + _copyGroupSpawn[index].Add(_levelConfig.NestedGroupSpawn[index].groupSpawn[nestedIndex].Count); + } _groupSpawnTimers.Add(_levelConfig.NestedGroupSpawn[index].triggerTime); } } @@ -158,16 +162,55 @@ public class WaveObserver : Singleton * Called when it is time to spawn a group * Assigns a random element of the group to a random spawner */ - public void NotifyGroupSpawn() + public bool NotifyGroupSpawn() { System.Random rand = new System.Random(); - foreach (EnemyType groupEnemy in _copyGroupSpawn[_currentGroupIndex].groupSpawn) + List usedRows = new List(); + List currentGroup = _levelConfig.NestedGroupSpawn[_currentGroupIndex].groupSpawn; + for (int groupIndex = 0; groupIndex < currentGroup.Count; groupIndex++) //Loops through enemy groups { - for (int i = 0; i < groupEnemy.Count; i++) + if (_copyGroupSpawn[_currentGroupIndex][groupIndex] == 0) + if (usedRows.Count < _subjects.Count) //TODO: decreases actual count + goes into negatives { - _subjects[rand.Next(_subjects.Count)].TriggerSpawn(groupEnemy.GetEnemyObject()); + for (int i = 0; i < _subjects.Count; i++) //Loops through spawners + { + bool breakTag = false; + do + { + int currentRow = rand.Next(_subjects.Count); + if (!usedRows.Contains(currentRow)) + { + _subjects[rand.Next(_subjects.Count)].TriggerSpawn(currentGroup[groupIndex].GetEnemyObject()); + _copyGroupSpawn[_currentGroupIndex][groupIndex]--; + Debug.Log(_copyGroupSpawn[_currentGroupIndex][groupIndex]); + usedRows.Add(currentRow); + } + if(_copyGroupSpawn[_currentGroupIndex][groupIndex] == 0) //If current ennemy has reached count of 0 + { + breakTag = true; + break; + } + }while(usedRows.Count==i); + Debug.Log("Row: " + usedRows.Count); + if (breakTag) + { + break; + } + } + if (_copyGroupSpawn[_currentGroupIndex][groupIndex] > 0) //If after doing evry row, there are still some left + { + return false; + } + else + { + break; + } + } else + { + return false; } } _currentGroupIndex++; + return true; } } diff --git a/Assets/Scripts/Tiles/SpawnerTile.cs b/Assets/Scripts/Tiles/SpawnerTile.cs index b37aa4f..56376aa 100644 --- a/Assets/Scripts/Tiles/SpawnerTile.cs +++ b/Assets/Scripts/Tiles/SpawnerTile.cs @@ -16,6 +16,7 @@ public class SpawnerTile : LevelTile private WaveObserver _observer; private bool _stopped = false; private bool _cooldownEnded = false; + private bool _EnemiesCleared = true; private List _groupSpawnTimers = new List(); public void SetGroupSpawnTimers(List groupSpawnTimers) @@ -49,8 +50,16 @@ public class SpawnerTile : LevelTile { if (_lifetime / 60 > _groupSpawnTimers[0]) { - _groupSpawnTimers.RemoveAt(0); - _observer.NotifyGroupSpawn(); + _EnemiesCleared = _observer.NotifyGroupSpawn(); + if (_EnemiesCleared) + { + _groupSpawnTimers.RemoveAt(0); + Debug.Log("Next..."); + } else + { + _groupSpawnTimers[0] += 0.05f; + Debug.Log("Timer: " + _groupSpawnTimers[0]); + } } } if (_spawnCounter < _spawnSpeed) return; From bff2df154a6caee63a883e4de1796901a1aa4043 Mon Sep 17 00:00:00 2001 From: Felix Boucher Date: Sun, 5 Nov 2023 11:52:48 -0500 Subject: [PATCH 02/13] fix detection range MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit besoin : - quand une unité meurt, la prochaine unité n'est pas targetted solution : - deactivate and reactivate collider to re-trigger collision --- Assets/Scripts/Detection.cs | 2 ++ Assets/Scripts/PlayerAction/ClickBehavior.cs | 17 ++++++++++++++++- Assets/Scripts/Tiles/SpawnerTile.cs | 10 ++++++++++ Assets/Tiles/EnemySpawner.asset | 1 + Assets/Tiles/EnemySpawnerStart.asset | 1 + 5 files changed, 30 insertions(+), 1 deletion(-) diff --git a/Assets/Scripts/Detection.cs b/Assets/Scripts/Detection.cs index 8b55fd6..c3acfcf 100644 --- a/Assets/Scripts/Detection.cs +++ b/Assets/Scripts/Detection.cs @@ -103,6 +103,8 @@ public class Detection : MonoBehaviour if(_projectileDamage == 0) { if ((other.gameObject.tag == "Opponent" && _entityLinked is Ally) || (other.gameObject.tag == "Ally" && _entityLinked is Opponent)) { _entityLinked.IsEnemyDetected = false; + enabled = false; + enabled = true; } } } diff --git a/Assets/Scripts/PlayerAction/ClickBehavior.cs b/Assets/Scripts/PlayerAction/ClickBehavior.cs index d5ffb42..c5e15fc 100644 --- a/Assets/Scripts/PlayerAction/ClickBehavior.cs +++ b/Assets/Scripts/PlayerAction/ClickBehavior.cs @@ -11,9 +11,10 @@ public class ClickBehavior : MonoBehaviour private void Update() { + Vector2 clickPoint = Camera.main.ScreenToWorldPoint(Input.mousePosition); + if (Input.GetMouseButton(0)) { - Vector2 clickPoint = Camera.main.ScreenToWorldPoint(Input.mousePosition); List listColliders = new(Physics2D.OverlapCircleAll(clickPoint, 0.05f)); List resourceColliders = listColliders.FindAll(obj => obj.CompareTag("Resource")); if (resourceColliders.Count > 0) @@ -25,6 +26,20 @@ public class ClickBehavior : MonoBehaviour } } +#if UNITY_EDITOR + if (Input.GetMouseButtonUp(0)) + { + const float clickRangeForSpawn = 0.7f; + var spawners = LevelManager.Instance.GetAll(); + var closest = spawners.Minimum(spawn => Vector2.Distance(spawn.Position, transform.position)); + var distance = Vector2.Distance(clickPoint, closest.Position); + + if (distance < clickRangeForSpawn) + { + closest.TriggerSpawnDebug(); + } + } +#endif } public void ChangeGameSpeed() diff --git a/Assets/Scripts/Tiles/SpawnerTile.cs b/Assets/Scripts/Tiles/SpawnerTile.cs index b37aa4f..db097ca 100644 --- a/Assets/Scripts/Tiles/SpawnerTile.cs +++ b/Assets/Scripts/Tiles/SpawnerTile.cs @@ -136,4 +136,14 @@ public class SpawnerTile : LevelTile { enemy.Create(Position, parent: LevelManager.Instance.LevelTransform); } + +#if UNITY_EDITOR + [Header("DEBUG")] + [SerializeField] + private GameObject _debugPrefab; + public void TriggerSpawnDebug() + { + _debugPrefab.Create(Position, parent: LevelManager.Instance.LevelTransform); + } +#endif } \ No newline at end of file diff --git a/Assets/Tiles/EnemySpawner.asset b/Assets/Tiles/EnemySpawner.asset index d63a169..3364c50 100644 --- a/Assets/Tiles/EnemySpawner.asset +++ b/Assets/Tiles/EnemySpawner.asset @@ -18,3 +18,4 @@ MonoBehaviour: _spawnOnStart: 0 _spawnSpeed: 0.02 _spawnCounter: 0 + _debugPrefab: {fileID: 80204295746100150, guid: 2419a879bd4e47d4fa8b30de0fcdde42, type: 3} diff --git a/Assets/Tiles/EnemySpawnerStart.asset b/Assets/Tiles/EnemySpawnerStart.asset index 6564483..9d9c1c2 100644 --- a/Assets/Tiles/EnemySpawnerStart.asset +++ b/Assets/Tiles/EnemySpawnerStart.asset @@ -18,3 +18,4 @@ MonoBehaviour: _spawnOnStart: 1 _spawnSpeed: 0 _spawnCounter: 0 + _debugPrefab: {fileID: 80204295746100150, guid: 2419a879bd4e47d4fa8b30de0fcdde42, type: 3} From cba536404538cf5e3342821d7edb3cd6cd57cfe1 Mon Sep 17 00:00:00 2001 From: MaximilienBlanchardBizien1 Date: Wed, 1 Nov 2023 16:29:44 -0400 Subject: [PATCH 03/13] =?UTF-8?q?Cr=C3=A9ation=20et=20impl=C3=A9mentation?= =?UTF-8?q?=20des=20baies.=20Couramment,=20donne=20de=20la=20nourriture,?= =?UTF-8?q?=20mais=20pourra=20probablement=20donner=20des=20baies=20plus?= =?UTF-8?q?=20tard.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Assets/BushTile.asset | 18 ++ Assets/BushTile.asset.meta | 8 + Assets/Prefabs/Yield/yieldBerry.prefab | 221 ++++++++++++++++++++ Assets/Prefabs/Yield/yieldBerry.prefab.meta | 7 + Assets/Prefabs/Yield/yieldFood.prefab | 1 - Assets/Scripts/Enum.cs | 3 +- Assets/Scripts/Resource/ResourceMaker.cs | 16 +- Assets/Tilemaps/LevelEditorPalette.prefab | 38 +++- 8 files changed, 302 insertions(+), 10 deletions(-) create mode 100644 Assets/BushTile.asset create mode 100644 Assets/BushTile.asset.meta create mode 100644 Assets/Prefabs/Yield/yieldBerry.prefab create mode 100644 Assets/Prefabs/Yield/yieldBerry.prefab.meta diff --git a/Assets/BushTile.asset b/Assets/BushTile.asset new file mode 100644 index 0000000..2ae49b8 --- /dev/null +++ b/Assets/BushTile.asset @@ -0,0 +1,18 @@ +%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: 84b05f2a26f63da46a1028488482d079, type: 3} + m_Name: BushTile + m_EditorClassIdentifier: + _sprite: {fileID: 21300000, guid: 22cdcbd5df3efd74fa4d119fc5836708, type: 3} + _isCollidable: 1 + _yieldPrefab: {fileID: 6962989255644195630, guid: a2dc5d9672c10074fa9c35c12f6339c1, type: 3} + _randomPositionConfig: 0.5 diff --git a/Assets/BushTile.asset.meta b/Assets/BushTile.asset.meta new file mode 100644 index 0000000..d82dc5e --- /dev/null +++ b/Assets/BushTile.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 3723ba09738ef6245947ae3ba7978b21 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Prefabs/Yield/yieldBerry.prefab b/Assets/Prefabs/Yield/yieldBerry.prefab new file mode 100644 index 0000000..c546b85 --- /dev/null +++ b/Assets/Prefabs/Yield/yieldBerry.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: yieldBerry + 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.02} + 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.3, y: 0.46} + 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 + _endPosition: {x: -2, y: 5} +--- !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: 22cdcbd5df3efd74fa4d119fc5836708, 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/yieldBerry.prefab.meta b/Assets/Prefabs/Yield/yieldBerry.prefab.meta new file mode 100644 index 0000000..b7c03b1 --- /dev/null +++ b/Assets/Prefabs/Yield/yieldBerry.prefab.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: f74ea22a786d3c34cbb77e7522a360f8 +PrefabImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Prefabs/Yield/yieldFood.prefab b/Assets/Prefabs/Yield/yieldFood.prefab index 24ed98e..555790a 100644 --- a/Assets/Prefabs/Yield/yieldFood.prefab +++ b/Assets/Prefabs/Yield/yieldFood.prefab @@ -133,7 +133,6 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 9dd6bad38b516d64e8e23a5822ca37bb, type: 3} m_Name: m_EditorClassIdentifier: - _resourceMakingAmount: 10 _resourceChoice: 2 _endPosition: {x: -2, y: 5} --- !u!1 &6962989256011107503 diff --git a/Assets/Scripts/Enum.cs b/Assets/Scripts/Enum.cs index 447fa9a..0ea191f 100644 --- a/Assets/Scripts/Enum.cs +++ b/Assets/Scripts/Enum.cs @@ -4,6 +4,7 @@ public class Enum { Rock, Wood, - Food + Food, + Berry }; } diff --git a/Assets/Scripts/Resource/ResourceMaker.cs b/Assets/Scripts/Resource/ResourceMaker.cs index 2c466ae..628f304 100644 --- a/Assets/Scripts/Resource/ResourceMaker.cs +++ b/Assets/Scripts/Resource/ResourceMaker.cs @@ -54,7 +54,21 @@ public class ResourceMaker : MonoBehaviour if(Vector2.Distance(transform.position,_endPosition) < 0.001f) { _isPlaying = false; - AddResourceToInventory(amount); + switch (_resourceChoice) + { + case Enum.ResourceChoice.Rock: + _resourceManagerInstance.RockAmount = amount; + break; + case Enum.ResourceChoice.Wood: + _resourceManagerInstance.WoodAmount = amount; + break; + case Enum.ResourceChoice.Food: + _resourceManagerInstance.FoodAmount = amount; + break; + case Enum.ResourceChoice.Berry: + _resourceManagerInstance.BerryAmount = amount; + break; + } Destroy(gameObject); } } diff --git a/Assets/Tilemaps/LevelEditorPalette.prefab b/Assets/Tilemaps/LevelEditorPalette.prefab index f55de67..8ec208b 100644 --- a/Assets/Tilemaps/LevelEditorPalette.prefab +++ b/Assets/Tilemaps/LevelEditorPalette.prefab @@ -41,7 +41,7 @@ Grid: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 86010431647272150} m_Enabled: 1 - m_CellSize: {x: 1, y: 1, z: 0} + m_CellSize: {x: 1.45, y: 1.45, z: 0} m_CellGap: {x: 0, y: 0, z: 0} m_CellLayout: 0 m_CellSwizzle: 0 @@ -87,6 +87,16 @@ Tilemap: m_GameObject: {fileID: 5890485537825364348} m_Enabled: 1 m_Tiles: + - first: {x: -1, y: -4, z: 0} + second: + serializedVersion: 2 + m_TileIndex: 8 + m_TileSpriteIndex: 8 + m_TileMatrixIndex: 0 + m_TileColorIndex: 0 + m_TileObjectToInstantiateIndex: 65535 + dummyAlignment: 0 + m_AllTileFlags: 0 - first: {x: -1, y: -3, z: 0} second: serializedVersion: 2 @@ -117,6 +127,16 @@ Tilemap: m_TileObjectToInstantiateIndex: 65535 dummyAlignment: 0 m_AllTileFlags: 0 + - first: {x: -1, y: -1, z: 0} + second: + serializedVersion: 2 + m_TileIndex: 8 + m_TileSpriteIndex: 8 + m_TileMatrixIndex: 0 + m_TileColorIndex: 0 + m_TileObjectToInstantiateIndex: 65535 + dummyAlignment: 0 + m_AllTileFlags: 0 - first: {x: -1, y: 0, z: 0} second: serializedVersion: 2 @@ -195,6 +215,8 @@ Tilemap: m_Data: {fileID: 11400000, guid: 7568f730b2ba3754297a7612452482e2, type: 2} - m_RefCount: 1 m_Data: {fileID: 11400000, guid: 15606c8c503e8164fb69178aa7016f58, type: 2} + - m_RefCount: 2 + m_Data: {fileID: 11400000, guid: 3723ba09738ef6245947ae3ba7978b21, type: 2} m_TileSpriteArray: - m_RefCount: 1 m_Data: {fileID: 21300000, guid: ccca3e050cb082b45af0a099790463f6, type: 3} @@ -212,8 +234,10 @@ Tilemap: m_Data: {fileID: 21300000, guid: 5cf7447a03096c04ead18f1855f01cd7, type: 3} - m_RefCount: 1 m_Data: {fileID: 21300000, guid: 8354a544f4ca3514e87d40d2de9afaee, type: 3} + - m_RefCount: 2 + m_Data: {fileID: 21300000, guid: 22cdcbd5df3efd74fa4d119fc5836708, type: 3} m_TileMatrixArray: - - m_RefCount: 9 + - m_RefCount: 11 m_Data: e00: 1 e01: 0 @@ -232,13 +256,13 @@ Tilemap: e32: 0 e33: 1 m_TileColorArray: - - m_RefCount: 9 + - m_RefCount: 11 m_Data: {r: 1, g: 1, b: 1, a: 1} m_TileObjectToInstantiateArray: [] m_AnimationFrameRate: 1 m_Color: {r: 1, g: 1, b: 1, a: 1} - m_Origin: {x: -1, y: -3, z: 0} - m_Size: {x: 3, y: 5, z: 1} + m_Origin: {x: -1, y: -4, z: 0} + m_Size: {x: 3, y: 6, z: 1} m_TileAnchor: {x: 0.5, y: 0.5, z: 0} m_TileOrientation: 0 m_TileOrientationMatrix: @@ -300,14 +324,14 @@ TilemapRenderer: m_SortingLayer: 0 m_SortingOrder: 0 m_ChunkSize: {x: 32, y: 32, z: 32} - m_ChunkCullingBounds: {x: 0, y: 0, z: 0} + m_ChunkCullingBounds: {x: 0.22500002, y: 0.22500002, z: 0} m_MaxChunkCount: 16 m_MaxFrameAge: 16 m_SortOrder: 0 m_Mode: 0 m_DetectChunkCullingBounds: 0 m_MaskInteraction: 0 ---- !u!114 &1109561936470111781 +--- !u!114 &3671438652071492342 MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} From 2a2f0a5a66fb5d31c36a123e6c9a1c3a30132c7f Mon Sep 17 00:00:00 2001 From: MaximilienBlanchardBizien1 Date: Sat, 4 Nov 2023 13:32:14 -0400 Subject: [PATCH 04/13] =?UTF-8?q?-=20D=C3=A9placement=20des=20donn=C3=A9es?= =?UTF-8?q?=20de=20la=20case=20des=20buissons=20de=20baies;=20-=20Correcti?= =?UTF-8?q?on=20de=20la=20case=20des=20buissons=20pour=20qu'on=20puisse=20?= =?UTF-8?q?mettre=20des=20unit=C3=A9s=20dessus.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Assets/Tilemaps/LevelEditorPalette.prefab | 2 +- Assets/{ => Tiles}/BushTile.asset | 2 +- Assets/{ => Tiles}/BushTile.asset.meta | 0 3 files changed, 2 insertions(+), 2 deletions(-) rename Assets/{ => Tiles}/BushTile.asset (96%) rename Assets/{ => Tiles}/BushTile.asset.meta (100%) diff --git a/Assets/Tilemaps/LevelEditorPalette.prefab b/Assets/Tilemaps/LevelEditorPalette.prefab index 8ec208b..1abd475 100644 --- a/Assets/Tilemaps/LevelEditorPalette.prefab +++ b/Assets/Tilemaps/LevelEditorPalette.prefab @@ -331,7 +331,7 @@ TilemapRenderer: m_Mode: 0 m_DetectChunkCullingBounds: 0 m_MaskInteraction: 0 ---- !u!114 &3671438652071492342 +--- !u!114 &8094062243660986082 MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} diff --git a/Assets/BushTile.asset b/Assets/Tiles/BushTile.asset similarity index 96% rename from Assets/BushTile.asset rename to Assets/Tiles/BushTile.asset index 2ae49b8..1b2dac9 100644 --- a/Assets/BushTile.asset +++ b/Assets/Tiles/BushTile.asset @@ -13,6 +13,6 @@ MonoBehaviour: m_Name: BushTile m_EditorClassIdentifier: _sprite: {fileID: 21300000, guid: 22cdcbd5df3efd74fa4d119fc5836708, type: 3} - _isCollidable: 1 + _isCollidable: 0 _yieldPrefab: {fileID: 6962989255644195630, guid: a2dc5d9672c10074fa9c35c12f6339c1, type: 3} _randomPositionConfig: 0.5 diff --git a/Assets/BushTile.asset.meta b/Assets/Tiles/BushTile.asset.meta similarity index 100% rename from Assets/BushTile.asset.meta rename to Assets/Tiles/BushTile.asset.meta From 7edbec43b35029ebcd5391e36f868065a7fadd4e Mon Sep 17 00:00:00 2001 From: Ader Alisma 01 Date: Sun, 12 Nov 2023 16:18:52 -0500 Subject: [PATCH 05/13] End groupSpawn delay MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Adds a ~3 seconds delay when a group has more ennemies than available rows·. Added groupSpawnDelay to GlobalConfigFile --- Assets/Scripts/General/GlobalConfigFile.cs | 3 + Assets/Scripts/LevelConfig/WaveObserver.cs | 66 +++++++++------------- Assets/Scripts/Tiles/SpawnerTile.cs | 12 ++-- 3 files changed, 36 insertions(+), 45 deletions(-) diff --git a/Assets/Scripts/General/GlobalConfigFile.cs b/Assets/Scripts/General/GlobalConfigFile.cs index 745bf97..2669970 100644 --- a/Assets/Scripts/General/GlobalConfigFile.cs +++ b/Assets/Scripts/General/GlobalConfigFile.cs @@ -16,6 +16,9 @@ public class GlobalConfigFile : ScriptableObject public Vector2 enemyRangeMultiplier = Vector2.one; public float enemyAttackSpeedMultiplier = 1; + [Header("Spawn")] + public float groupSpawnDelay = 0.05f; + [Header("Allies")] public float allyDamageMultiplier = 1; public float allyLifeMultiplier = 1; diff --git a/Assets/Scripts/LevelConfig/WaveObserver.cs b/Assets/Scripts/LevelConfig/WaveObserver.cs index 9b12dd7..67827bd 100644 --- a/Assets/Scripts/LevelConfig/WaveObserver.cs +++ b/Assets/Scripts/LevelConfig/WaveObserver.cs @@ -6,7 +6,7 @@ public class WaveObserver : Singleton private List _subjects = new List(); private List _aliveEnemyCount = new List(); private List _copyConstantSpawn; - private List> _copyGroupSpawn; + private List> _copyGroupSpawn; //Contains count of enemies per group private List _groupSpawnTimers; private WaveConfig _levelConfig; private const int MAXTOUGHNESS = 10; @@ -17,7 +17,7 @@ public class WaveObserver : Singleton public void SetLevelConfig(WaveConfig config) { - _levelConfig = config; + _levelConfig = Object.Instantiate(config); _copyConstantSpawn = new List(); _copyGroupSpawn = new List>(); _groupSpawnTimers = new List(); @@ -164,53 +164,43 @@ public class WaveObserver : Singleton */ public bool NotifyGroupSpawn() { - System.Random rand = new System.Random(); List usedRows = new List(); List currentGroup = _levelConfig.NestedGroupSpawn[_currentGroupIndex].groupSpawn; for (int groupIndex = 0; groupIndex < currentGroup.Count; groupIndex++) //Loops through enemy groups { - if (_copyGroupSpawn[_currentGroupIndex][groupIndex] == 0) - if (usedRows.Count < _subjects.Count) //TODO: decreases actual count + goes into negatives + if (_copyGroupSpawn[_currentGroupIndex][groupIndex] != 0) { - for (int i = 0; i < _subjects.Count; i++) //Loops through spawners - { - bool breakTag = false; - do - { - int currentRow = rand.Next(_subjects.Count); - if (!usedRows.Contains(currentRow)) - { - _subjects[rand.Next(_subjects.Count)].TriggerSpawn(currentGroup[groupIndex].GetEnemyObject()); - _copyGroupSpawn[_currentGroupIndex][groupIndex]--; - Debug.Log(_copyGroupSpawn[_currentGroupIndex][groupIndex]); - usedRows.Add(currentRow); - } - if(_copyGroupSpawn[_currentGroupIndex][groupIndex] == 0) //If current ennemy has reached count of 0 - { - breakTag = true; - break; - } - }while(usedRows.Count==i); - Debug.Log("Row: " + usedRows.Count); - if (breakTag) - { - break; - } - } - if (_copyGroupSpawn[_currentGroupIndex][groupIndex] > 0) //If after doing evry row, there are still some left + CycleRows(usedRows, currentGroup, groupIndex); + /*If group is done OR max rows reached while group is not done*/ + if (_copyGroupSpawn[_currentGroupIndex][groupIndex] > 0 || (usedRows.Count == _subjects.Count && _copyGroupSpawn[_currentGroupIndex][groupIndex] > 0)) { return false; } - else - { - break; - } - } else - { - return false; } } _currentGroupIndex++; return true; } + + /** + * Called to go through every row randomly without duplicate rows + */ + private void CycleRows(List usedRows, List currentGroup, int groupIndex) + { + System.Random rand = new System.Random(); + 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()); + _copyGroupSpawn[_currentGroupIndex][groupIndex]--; + usedRows.Add(currentRow); + } + if (_copyGroupSpawn[_currentGroupIndex][groupIndex] == 0) //If current ennemy has reached count of 0 + { + break; + } + } + } } diff --git a/Assets/Scripts/Tiles/SpawnerTile.cs b/Assets/Scripts/Tiles/SpawnerTile.cs index 56376aa..fdeac6c 100644 --- a/Assets/Scripts/Tiles/SpawnerTile.cs +++ b/Assets/Scripts/Tiles/SpawnerTile.cs @@ -21,7 +21,7 @@ public class SpawnerTile : LevelTile public void SetGroupSpawnTimers(List groupSpawnTimers) { - for (int i = 0; i < groupSpawnTimers.Count-1; i++) + for (int i = 0; i < groupSpawnTimers.Count; i++) { _groupSpawnTimers.Add(groupSpawnTimers[i]); } @@ -48,17 +48,15 @@ public class SpawnerTile : LevelTile } if (_groupSpawnTimers.Count > 0) { - if (_lifetime / 60 > _groupSpawnTimers[0]) + if (_lifetime / 60.0f > _groupSpawnTimers[0]) { _EnemiesCleared = _observer.NotifyGroupSpawn(); - if (_EnemiesCleared) + if (_EnemiesCleared) //Moves on to next group { _groupSpawnTimers.RemoveAt(0); - Debug.Log("Next..."); - } else + } else //Adds a delay to finish current group { - _groupSpawnTimers[0] += 0.05f; - Debug.Log("Timer: " + _groupSpawnTimers[0]); + _groupSpawnTimers[0] += GlobalConfig.Instance.Current.groupSpawnDelay; } } } From 7dba305d3072e104efe905710b98da499388afcb Mon Sep 17 00:00:00 2001 From: Felix Boucher Date: Sun, 12 Nov 2023 18:26:36 -0500 Subject: [PATCH 06/13] fixes to berry harvesting - berry harvester appears on bush tiles - change berry resource for food instead - some structural change to reduce bugs --- Assets/Design/Levels/Level1.asset | 4 + Assets/Design/Levels/Level2.asset | 4 + Assets/Design/Levels/Level3.asset | 4 + Assets/Design/Levels/Level4.asset | 4 + Assets/Design/Levels/Level5.asset | 6 + Assets/Design/Levels/Level6.asset | 8 + Assets/Editor/DatabaseEditor.cs | 2 + .../Sticks/Harversters/axemanStick.prefab | 4 +- .../Harversters/berriesGathererStick.prefab | 6 +- .../Sticks/Harversters/farmerStick.prefab | 6 +- .../Sticks/Harversters/minerStick.prefab | 2 + Assets/Prefabs/Yield/yieldBerry.prefab | 221 ------------------ Assets/Prefabs/Yield/yieldBerry.prefab.meta | 7 - Assets/Scenes/Game.unity | 152 ++++++++++++ Assets/Scenes/LevelEditorScene.unity | 160 +++++++++++++ Assets/Scripts/Ally/Harvester.cs | 15 +- Assets/Scripts/Ally/HarvesterResourcePair.cs | 4 +- Assets/Scripts/AnimationEntity.cs | 3 +- .../Scripts/Drag&Drop/DraggablePlaceholder.cs | 2 +- .../Drag&Drop/GameObjectPlacementButton.cs | 6 +- Assets/Scripts/Drag&Drop/ObjectPlaceholder.cs | 5 +- .../Scripts/Drag&Drop/TilePlacementButton.cs | 2 +- Assets/Scripts/Enum.cs | 14 +- Assets/Scripts/General/Database.cs | 2 +- Assets/Scripts/LevelConfig/WaveObserver.cs | 5 + Assets/Scripts/LoadingManager.cs | 5 - Assets/Scripts/Resource/ResourceMaker.cs | 21 +- Assets/Scripts/Resource/ResourceManager.cs | 9 +- Assets/Scripts/Tiles/ResourceTile.cs | 5 +- Assets/Scripts/WorldMap/WorldMapManager.cs | 1 - Assets/Tilemaps/LevelEditorPalette.prefab | 20 +- Assets/Tiles/BushTile.asset | 3 +- Assets/Tiles/Farm.asset | 2 +- Assets/Tiles/Forest.asset | 2 +- Assets/Tiles/Meat.asset | 19 -- Assets/Tiles/Meat.asset.meta | 8 - 36 files changed, 416 insertions(+), 327 deletions(-) delete mode 100644 Assets/Prefabs/Yield/yieldBerry.prefab delete mode 100644 Assets/Prefabs/Yield/yieldBerry.prefab.meta delete mode 100644 Assets/Tiles/Meat.asset delete mode 100644 Assets/Tiles/Meat.asset.meta diff --git a/Assets/Design/Levels/Level1.asset b/Assets/Design/Levels/Level1.asset index c94a3a2..3639283 100644 --- a/Assets/Design/Levels/Level1.asset +++ b/Assets/Design/Levels/Level1.asset @@ -245,3 +245,7 @@ MonoBehaviour: _position: {x: 0, y: 0} _scale: {x: 1, y: 1} _waveConfig: {fileID: 11400000, guid: 4c72177270b51eb46872d1665e3a097e, type: 2} + _startPopulation: 5 + _startFood: 50 + _startWood: 0 + _startRock: 0 diff --git a/Assets/Design/Levels/Level2.asset b/Assets/Design/Levels/Level2.asset index 8c1fa42..a5fa3ab 100644 --- a/Assets/Design/Levels/Level2.asset +++ b/Assets/Design/Levels/Level2.asset @@ -197,3 +197,7 @@ MonoBehaviour: _position: {x: 0, y: 0} _scale: {x: 1, y: 1} _waveConfig: {fileID: 11400000, guid: 4c72177270b51eb46872d1665e3a097e, type: 2} + _startPopulation: 5 + _startFood: 50 + _startWood: 0 + _startRock: 0 diff --git a/Assets/Design/Levels/Level3.asset b/Assets/Design/Levels/Level3.asset index 5239154..0ca94e4 100644 --- a/Assets/Design/Levels/Level3.asset +++ b/Assets/Design/Levels/Level3.asset @@ -195,3 +195,7 @@ MonoBehaviour: _position: {x: 0, y: 0} _scale: {x: 1, y: 1} _waveConfig: {fileID: 11400000, guid: 4c72177270b51eb46872d1665e3a097e, type: 2} + _startPopulation: 5 + _startFood: 50 + _startWood: 0 + _startRock: 0 diff --git a/Assets/Design/Levels/Level4.asset b/Assets/Design/Levels/Level4.asset index ba87cc9..396af7d 100644 --- a/Assets/Design/Levels/Level4.asset +++ b/Assets/Design/Levels/Level4.asset @@ -225,3 +225,7 @@ MonoBehaviour: _position: {x: 0, y: 0} _scale: {x: 1, y: 1} _waveConfig: {fileID: 11400000, guid: 4c72177270b51eb46872d1665e3a097e, type: 2} + _startPopulation: 5 + _startFood: 50 + _startWood: 0 + _startRock: 0 diff --git a/Assets/Design/Levels/Level5.asset b/Assets/Design/Levels/Level5.asset index a439c39..691e82b 100644 --- a/Assets/Design/Levels/Level5.asset +++ b/Assets/Design/Levels/Level5.asset @@ -181,6 +181,8 @@ MonoBehaviour: _scale: {x: 1, y: 1} - _key: Spawners _tiles: + - _tile: {fileID: 11400000, guid: 3723ba09738ef6245947ae3ba7978b21, type: 2} + _position: {x: -6, y: -1, z: 0} - _tile: {fileID: 11400000, guid: 4002377ed7e87b34699f126f2b10c703, type: 2} _position: {x: -1, y: -3, z: 0} - _tile: {fileID: 11400000, guid: 4002377ed7e87b34699f126f2b10c703, type: 2} @@ -201,3 +203,7 @@ MonoBehaviour: _position: {x: 0, y: 0} _scale: {x: 1, y: 1} _waveConfig: {fileID: 11400000, guid: 4c72177270b51eb46872d1665e3a097e, type: 2} + _startPopulation: 5 + _startFood: 50 + _startWood: 0 + _startRock: 0 diff --git a/Assets/Design/Levels/Level6.asset b/Assets/Design/Levels/Level6.asset index 1e1a21c..3bcebfa 100644 --- a/Assets/Design/Levels/Level6.asset +++ b/Assets/Design/Levels/Level6.asset @@ -164,6 +164,10 @@ MonoBehaviour: _position: {x: -7, y: 1, z: 0} - _tile: {fileID: 11400000, guid: e74655ccbd41a2b46b1ec9615aba0301, type: 2} _position: {x: -6, y: 1, z: 0} + - _tile: {fileID: 11400000, guid: 3723ba09738ef6245947ae3ba7978b21, type: 2} + _position: {x: -5, y: -3, z: 0} + - _tile: {fileID: 11400000, guid: 3723ba09738ef6245947ae3ba7978b21, type: 2} + _position: {x: -5, y: -1, z: 0} - _tile: {fileID: 11400000, guid: e74655ccbd41a2b46b1ec9615aba0301, type: 2} _position: {x: -5, y: 1, z: 0} - _tile: {fileID: 11400000, guid: e74655ccbd41a2b46b1ec9615aba0301, type: 2} @@ -203,3 +207,7 @@ MonoBehaviour: _position: {x: 0, y: 0} _scale: {x: 1, y: 1} _waveConfig: {fileID: 11400000, guid: 4c72177270b51eb46872d1665e3a097e, type: 2} + _startPopulation: 5 + _startFood: 50 + _startWood: 0 + _startRock: 0 diff --git a/Assets/Editor/DatabaseEditor.cs b/Assets/Editor/DatabaseEditor.cs index ad2e7b0..d4b59d0 100644 --- a/Assets/Editor/DatabaseEditor.cs +++ b/Assets/Editor/DatabaseEditor.cs @@ -17,6 +17,8 @@ public class DatabaseEditor : Editor { var targ = target as Database; + targ.ScriptableObjects.Clear(); + targ.Prefabs.Clear(); foreach (var folder in targ.Folders) { var path = AssetDatabase.GetAssetPath(folder); diff --git a/Assets/Prefabs/Sticks/Harversters/axemanStick.prefab b/Assets/Prefabs/Sticks/Harversters/axemanStick.prefab index 5620ed0..9e593e8 100644 --- a/Assets/Prefabs/Sticks/Harversters/axemanStick.prefab +++ b/Assets/Prefabs/Sticks/Harversters/axemanStick.prefab @@ -424,7 +424,9 @@ MonoBehaviour: _resource: 0 - _harvesterPrefab: {fileID: 6962989255644195630} _resource: 1 - _resourceChoice: 1 + - _harvesterPrefab: {fileID: 7670155643566295935, guid: 717a063ebb684a748b9f40cac33fab52, type: 3} + _resource: 3 + _resourceNodeType: 1 --- !u!114 &557712884815233717 MonoBehaviour: m_ObjectHideFlags: 0 diff --git a/Assets/Prefabs/Sticks/Harversters/berriesGathererStick.prefab b/Assets/Prefabs/Sticks/Harversters/berriesGathererStick.prefab index 9f08f1b..fb5fa2e 100644 --- a/Assets/Prefabs/Sticks/Harversters/berriesGathererStick.prefab +++ b/Assets/Prefabs/Sticks/Harversters/berriesGathererStick.prefab @@ -1025,9 +1025,11 @@ MonoBehaviour: _resource: 2 - _harvesterPrefab: {fileID: 6962989255644195630, guid: 8b50d9afb3bbd204d8dfea3d64f13fa2, type: 3} _resource: 0 - - _harvesterPrefab: {fileID: 7670155643566295935} + - _harvesterPrefab: {fileID: 6962989255644195630, guid: 02eb2d787f58e9943a0cb46d0b13e6b8, type: 3} _resource: 1 - _resourceChoice: 1 + - _harvesterPrefab: {fileID: 7670155643566295935} + _resource: 3 + _resourceNodeType: 3 --- !u!114 &967491981311779556 MonoBehaviour: m_ObjectHideFlags: 0 diff --git a/Assets/Prefabs/Sticks/Harversters/farmerStick.prefab b/Assets/Prefabs/Sticks/Harversters/farmerStick.prefab index 9e57ef0..620d1ea 100644 --- a/Assets/Prefabs/Sticks/Harversters/farmerStick.prefab +++ b/Assets/Prefabs/Sticks/Harversters/farmerStick.prefab @@ -407,7 +407,7 @@ MonoBehaviour: _hp: 0 _speed: 0 _attack_damage: 0 - _attack_interval: 2 + _attack_interval: 0 _harvesterResourcePairs: - _harvesterPrefab: {fileID: 5157279992115123224} _resource: 2 @@ -415,7 +415,9 @@ MonoBehaviour: _resource: 0 - _harvesterPrefab: {fileID: 6962989255644195630, guid: 02eb2d787f58e9943a0cb46d0b13e6b8, type: 3} _resource: 1 - _resourceChoice: 2 + - _harvesterPrefab: {fileID: 7670155643566295935, guid: 717a063ebb684a748b9f40cac33fab52, type: 3} + _resource: 3 + _resourceNodeType: 2 --- !u!114 &4198250345843206422 MonoBehaviour: m_ObjectHideFlags: 0 diff --git a/Assets/Prefabs/Sticks/Harversters/minerStick.prefab b/Assets/Prefabs/Sticks/Harversters/minerStick.prefab index 6d080f9..d89f69f 100644 --- a/Assets/Prefabs/Sticks/Harversters/minerStick.prefab +++ b/Assets/Prefabs/Sticks/Harversters/minerStick.prefab @@ -508,6 +508,8 @@ MonoBehaviour: _resource: 0 - _harvesterPrefab: {fileID: 6962989255644195630, guid: 02eb2d787f58e9943a0cb46d0b13e6b8, type: 3} _resource: 1 + - _harvesterPrefab: {fileID: 7670155643566295935, guid: 717a063ebb684a748b9f40cac33fab52, type: 3} + _resource: 3 _resourceChoice: 0 --- !u!114 &8773193872037819055 MonoBehaviour: diff --git a/Assets/Prefabs/Yield/yieldBerry.prefab b/Assets/Prefabs/Yield/yieldBerry.prefab deleted file mode 100644 index c546b85..0000000 --- a/Assets/Prefabs/Yield/yieldBerry.prefab +++ /dev/null @@ -1,221 +0,0 @@ -%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: yieldBerry - 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.02} - 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.3, y: 0.46} - 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 - _endPosition: {x: -2, y: 5} ---- !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: 22cdcbd5df3efd74fa4d119fc5836708, 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/yieldBerry.prefab.meta b/Assets/Prefabs/Yield/yieldBerry.prefab.meta deleted file mode 100644 index b7c03b1..0000000 --- a/Assets/Prefabs/Yield/yieldBerry.prefab.meta +++ /dev/null @@ -1,7 +0,0 @@ -fileFormatVersion: 2 -guid: f74ea22a786d3c34cbb77e7522a360f8 -PrefabImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scenes/Game.unity b/Assets/Scenes/Game.unity index 35e172d..32d128a 100644 --- a/Assets/Scenes/Game.unity +++ b/Assets/Scenes/Game.unity @@ -1687,6 +1687,158 @@ PrefabInstance: propertyPath: m_Name value: LevelManager objectReference: {fileID: 0} + - target: {fileID: 3028288566889208749, guid: 02daecb0115395844b4932445d039051, type: 3} + propertyPath: _folders.Array.size + value: 4 + objectReference: {fileID: 0} + - target: {fileID: 3028288566889208749, guid: 02daecb0115395844b4932445d039051, type: 3} + propertyPath: _prefabs.Array.size + value: 34 + objectReference: {fileID: 0} + - target: {fileID: 3028288566889208749, guid: 02daecb0115395844b4932445d039051, type: 3} + propertyPath: _folders.Array.data[2] + value: + objectReference: {fileID: 102900000, guid: 73ca1afa7b0f7dd4ea39f69cf74f8370, type: 3} + - target: {fileID: 3028288566889208749, guid: 02daecb0115395844b4932445d039051, type: 3} + propertyPath: _folders.Array.data[3] + value: + objectReference: {fileID: 102900000, guid: 53e5218fbb04cbd478369e415d099bdb, type: 3} + - target: {fileID: 3028288566889208749, guid: 02daecb0115395844b4932445d039051, type: 3} + propertyPath: _prefabs.Array.data[22] + value: + objectReference: {fileID: 3688217365857929929, guid: b116bc5489ed8524da52c4dbc835640e, type: 3} + - target: {fileID: 3028288566889208749, guid: 02daecb0115395844b4932445d039051, type: 3} + propertyPath: _prefabs.Array.data[23] + value: + objectReference: {fileID: 6208366596957312446, guid: 9b9c2b61b2a2928458af5f15c009b8c4, type: 3} + - target: {fileID: 3028288566889208749, guid: 02daecb0115395844b4932445d039051, type: 3} + propertyPath: _prefabs.Array.data[24] + value: + objectReference: {fileID: 3028288566889208744, guid: 02daecb0115395844b4932445d039051, type: 3} + - target: {fileID: 3028288566889208749, guid: 02daecb0115395844b4932445d039051, type: 3} + propertyPath: _prefabs.Array.data[25] + value: + objectReference: {fileID: 80204295746100150, guid: 1be769d6ef642314b8846bed35e7297c, type: 3} + - target: {fileID: 3028288566889208749, guid: 02daecb0115395844b4932445d039051, type: 3} + propertyPath: _prefabs.Array.data[26] + value: + objectReference: {fileID: 80204295746100150, guid: 2419a879bd4e47d4fa8b30de0fcdde42, type: 3} + - target: {fileID: 3028288566889208749, guid: 02daecb0115395844b4932445d039051, type: 3} + propertyPath: _prefabs.Array.data[27] + value: + objectReference: {fileID: 2230360378425099702, guid: ece16a59d4dca2246817fbb1b23f17ba, type: 3} + - target: {fileID: 3028288566889208749, guid: 02daecb0115395844b4932445d039051, type: 3} + propertyPath: _prefabs.Array.data[28] + value: + objectReference: {fileID: 7670155643566295935, guid: 717a063ebb684a748b9f40cac33fab52, type: 3} + - target: {fileID: 3028288566889208749, guid: 02daecb0115395844b4932445d039051, type: 3} + propertyPath: _prefabs.Array.data[29] + value: + objectReference: {fileID: 4897909026855453892, guid: 3918c7d48763f184a92c7d61380ca258, type: 3} + - target: {fileID: 3028288566889208749, guid: 02daecb0115395844b4932445d039051, type: 3} + propertyPath: _prefabs.Array.data[30] + value: + objectReference: {fileID: 8433619855353240514, guid: bc81e2a1e8b64884692701c2892f62a4, type: 3} + - target: {fileID: 3028288566889208749, guid: 02daecb0115395844b4932445d039051, type: 3} + propertyPath: _prefabs.Array.data[31] + value: + objectReference: {fileID: 3409838768749337993, guid: 096f5f6b487dccb41a48faf69f87fae9, type: 3} + - target: {fileID: 3028288566889208749, guid: 02daecb0115395844b4932445d039051, type: 3} + propertyPath: _prefabs.Array.data[32] + value: + objectReference: {fileID: 1388419617042242061, guid: 4a2f48781c26ad247b697aa368358f88, type: 3} + - target: {fileID: 3028288566889208749, guid: 02daecb0115395844b4932445d039051, type: 3} + propertyPath: _prefabs.Array.data[33] + value: + objectReference: {fileID: 6962989255644195630, guid: f74ea22a786d3c34cbb77e7522a360f8, type: 3} + - target: {fileID: 3028288566889208749, guid: 02daecb0115395844b4932445d039051, type: 3} + propertyPath: _scriptableObjects.Array.size + value: 21 + objectReference: {fileID: 0} + - target: {fileID: 3028288566889208749, guid: 02daecb0115395844b4932445d039051, type: 3} + propertyPath: _scriptableObjects.Array.data[3] + value: + objectReference: {fileID: 11400000, guid: e74655ccbd41a2b46b1ec9615aba0301, type: 2} + - target: {fileID: 3028288566889208749, guid: 02daecb0115395844b4932445d039051, type: 3} + propertyPath: _scriptableObjects.Array.data[4] + value: + objectReference: {fileID: 11400000, guid: e0d57b3c128ba1447920637cdb289530, type: 2} + - target: {fileID: 3028288566889208749, guid: 02daecb0115395844b4932445d039051, type: 3} + propertyPath: _scriptableObjects.Array.data[5] + value: + objectReference: {fileID: 11400000, guid: 4aaf448680c7f8a438a9a5861c622a55, type: 2} + - target: {fileID: 3028288566889208749, guid: 02daecb0115395844b4932445d039051, type: 3} + propertyPath: _scriptableObjects.Array.data[6] + value: + objectReference: {fileID: 11400000, guid: a6e34739c9325da4cac4fbaea30d052c, type: 2} + - target: {fileID: 3028288566889208749, guid: 02daecb0115395844b4932445d039051, type: 3} + propertyPath: _scriptableObjects.Array.data[7] + value: + objectReference: {fileID: 11400000, guid: d37561e153d6a6448a03839488fdec5e, type: 2} + - target: {fileID: 3028288566889208749, guid: 02daecb0115395844b4932445d039051, type: 3} + propertyPath: _scriptableObjects.Array.data[8] + value: + objectReference: {fileID: 11400000, guid: 7a1313e5c16e74c4ba11a8114b9fd786, type: 2} + - target: {fileID: 3028288566889208749, guid: 02daecb0115395844b4932445d039051, type: 3} + propertyPath: _scriptableObjects.Array.data[9] + value: + objectReference: {fileID: 11400000, guid: b501f7eea1fdfb843853bcba5b30533a, type: 2} + - target: {fileID: 3028288566889208749, guid: 02daecb0115395844b4932445d039051, type: 3} + propertyPath: _scriptableObjects.Array.data[10] + value: + objectReference: {fileID: 11400000, guid: 0a9c94eb38c575948992453fc29bcede, type: 2} + - target: {fileID: 3028288566889208749, guid: 02daecb0115395844b4932445d039051, type: 3} + propertyPath: _scriptableObjects.Array.data[11] + value: + objectReference: {fileID: 11400000, guid: 458348dd169e806459b7449b7e157d64, type: 2} + - target: {fileID: 3028288566889208749, guid: 02daecb0115395844b4932445d039051, type: 3} + propertyPath: _scriptableObjects.Array.data[12] + value: + objectReference: {fileID: 11400000, guid: f5a11cb6d0d324b47b493042c7615112, type: 2} + - target: {fileID: 3028288566889208749, guid: 02daecb0115395844b4932445d039051, type: 3} + propertyPath: _scriptableObjects.Array.data[13] + value: + objectReference: {fileID: 11400000, guid: a387250a316b97e43be83b85980101e1, type: 2} + - target: {fileID: 3028288566889208749, guid: 02daecb0115395844b4932445d039051, type: 3} + propertyPath: _scriptableObjects.Array.data[14] + value: + objectReference: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2} + - target: {fileID: 3028288566889208749, guid: 02daecb0115395844b4932445d039051, type: 3} + propertyPath: _scriptableObjects.Array.data[15] + value: + objectReference: {fileID: 11400000, guid: 5f47d74ebc4a8fe439ac6a4fe9ec436f, type: 2} + - target: {fileID: 3028288566889208749, guid: 02daecb0115395844b4932445d039051, type: 3} + propertyPath: _scriptableObjects.Array.data[16] + value: + objectReference: {fileID: 11400000, guid: 3723ba09738ef6245947ae3ba7978b21, type: 2} + - target: {fileID: 3028288566889208749, guid: 02daecb0115395844b4932445d039051, type: 3} + propertyPath: _scriptableObjects.Array.data[17] + value: + objectReference: {fileID: 11400000, guid: ec229632b369eb746a30dbfafe3de373, type: 2} + - target: {fileID: 3028288566889208749, guid: 02daecb0115395844b4932445d039051, type: 3} + propertyPath: _scriptableObjects.Array.data[18] + value: + objectReference: {fileID: 11400000, guid: 21b0f85f7c746974db1e72f2df646f5d, type: 2} + - target: {fileID: 3028288566889208749, guid: 02daecb0115395844b4932445d039051, type: 3} + propertyPath: _scriptableObjects.Array.data[19] + value: + objectReference: {fileID: 11400000, guid: 4c72177270b51eb46872d1665e3a097e, type: 2} + - target: {fileID: 3028288566889208749, guid: 02daecb0115395844b4932445d039051, type: 3} + propertyPath: _scriptableObjects.Array.data[20] + value: + objectReference: {fileID: 11400000, guid: d8140ae36f1b7fd4fb1a57ab3dc69de4, type: 2} + - target: {fileID: 3028288566889208749, guid: 02daecb0115395844b4932445d039051, type: 3} + propertyPath: _scriptableObjects.Array.data[21] + value: + objectReference: {fileID: 11400000, guid: d8140ae36f1b7fd4fb1a57ab3dc69de4, type: 2} + - target: {fileID: 3028288566889208749, guid: 02daecb0115395844b4932445d039051, type: 3} + propertyPath: _scriptableObjects.Array.data[22] + value: + objectReference: {fileID: 11400000, guid: d8140ae36f1b7fd4fb1a57ab3dc69de4, type: 2} + - target: {fileID: 3028288566889208749, guid: 02daecb0115395844b4932445d039051, type: 3} + propertyPath: _scriptableObjects.Array.data[23] + value: + objectReference: {fileID: 11400000, guid: d8140ae36f1b7fd4fb1a57ab3dc69de4, type: 2} - target: {fileID: 3028288566889208750, guid: 02daecb0115395844b4932445d039051, type: 3} propertyPath: _gameScene value: Game diff --git a/Assets/Scenes/LevelEditorScene.unity b/Assets/Scenes/LevelEditorScene.unity index e9e18ed..e5064eb 100644 --- a/Assets/Scenes/LevelEditorScene.unity +++ b/Assets/Scenes/LevelEditorScene.unity @@ -1204,6 +1204,166 @@ PrefabInstance: propertyPath: m_Name value: LevelManager objectReference: {fileID: 0} + - target: {fileID: 3028288566889208749, guid: 02daecb0115395844b4932445d039051, type: 3} + propertyPath: _prefabs.Array.size + value: 32 + objectReference: {fileID: 0} + - target: {fileID: 3028288566889208749, guid: 02daecb0115395844b4932445d039051, type: 3} + propertyPath: _folders.Array.data[2] + value: + objectReference: {fileID: 102900000, guid: 53e5218fbb04cbd478369e415d099bdb, type: 3} + - target: {fileID: 3028288566889208749, guid: 02daecb0115395844b4932445d039051, type: 3} + propertyPath: _prefabs.Array.data[0] + value: + objectReference: {fileID: 3688217365857929929, guid: b116bc5489ed8524da52c4dbc835640e, type: 3} + - target: {fileID: 3028288566889208749, guid: 02daecb0115395844b4932445d039051, type: 3} + propertyPath: _prefabs.Array.data[1] + value: + objectReference: {fileID: 6962989255644195630, guid: 377c7275c0001cc47a6b8926ac57d573, type: 3} + - target: {fileID: 3028288566889208749, guid: 02daecb0115395844b4932445d039051, type: 3} + propertyPath: _prefabs.Array.data[2] + value: + objectReference: {fileID: 6962989255644195630, guid: 869a03bba705e8d4485aa73daad773dc, type: 3} + - target: {fileID: 3028288566889208749, guid: 02daecb0115395844b4932445d039051, type: 3} + propertyPath: _prefabs.Array.data[3] + value: + objectReference: {fileID: 1436362432952518814, guid: 8d56b160dedb7f84d830d749372fe8e8, type: 3} + - target: {fileID: 3028288566889208749, guid: 02daecb0115395844b4932445d039051, type: 3} + propertyPath: _prefabs.Array.data[4] + value: + objectReference: {fileID: 6208366596957312446, guid: 9b9c2b61b2a2928458af5f15c009b8c4, type: 3} + - target: {fileID: 3028288566889208749, guid: 02daecb0115395844b4932445d039051, type: 3} + propertyPath: _prefabs.Array.data[5] + value: + objectReference: {fileID: 3028288566889208744, guid: 02daecb0115395844b4932445d039051, type: 3} + - target: {fileID: 3028288566889208749, guid: 02daecb0115395844b4932445d039051, type: 3} + propertyPath: _prefabs.Array.data[6] + value: + objectReference: {fileID: 80204295746100150, guid: 1be769d6ef642314b8846bed35e7297c, type: 3} + - target: {fileID: 3028288566889208749, guid: 02daecb0115395844b4932445d039051, type: 3} + propertyPath: _prefabs.Array.data[7] + value: + objectReference: {fileID: 80204295746100150, guid: 5bbf0d85fa5bb3f4599da79f0a84e3a9, type: 3} + - target: {fileID: 3028288566889208749, guid: 02daecb0115395844b4932445d039051, type: 3} + propertyPath: _prefabs.Array.data[8] + value: + objectReference: {fileID: 80204295746100150, guid: 2419a879bd4e47d4fa8b30de0fcdde42, type: 3} + - target: {fileID: 3028288566889208749, guid: 02daecb0115395844b4932445d039051, type: 3} + propertyPath: _prefabs.Array.data[9] + value: + objectReference: {fileID: 5531237550998824024, guid: 6cd87b398e7a0e94580f4fcbe2fd310a, type: 3} + - target: {fileID: 3028288566889208749, guid: 02daecb0115395844b4932445d039051, type: 3} + propertyPath: _prefabs.Array.data[10] + value: + objectReference: {fileID: 6962989255644195630, guid: 9b40c232eddfd1b469bea688e3c970c0, type: 3} + - target: {fileID: 3028288566889208749, guid: 02daecb0115395844b4932445d039051, type: 3} + propertyPath: _prefabs.Array.data[11] + value: + objectReference: {fileID: 6962989255644195630, guid: e4a4754288971e949a74f90737193702, type: 3} + - target: {fileID: 3028288566889208749, guid: 02daecb0115395844b4932445d039051, type: 3} + propertyPath: _prefabs.Array.data[12] + value: + objectReference: {fileID: 2230360378425099702, guid: ece16a59d4dca2246817fbb1b23f17ba, type: 3} + - target: {fileID: 3028288566889208749, guid: 02daecb0115395844b4932445d039051, type: 3} + propertyPath: _prefabs.Array.data[13] + value: + objectReference: {fileID: 6962989255644195630, guid: 02eb2d787f58e9943a0cb46d0b13e6b8, type: 3} + - target: {fileID: 3028288566889208749, guid: 02daecb0115395844b4932445d039051, type: 3} + propertyPath: _prefabs.Array.data[14] + value: + objectReference: {fileID: 7670155643566295935, guid: 717a063ebb684a748b9f40cac33fab52, type: 3} + - target: {fileID: 3028288566889208749, guid: 02daecb0115395844b4932445d039051, type: 3} + propertyPath: _prefabs.Array.data[15] + value: + objectReference: {fileID: 5157279992115123224, guid: 85534a2d6c2add54d864073914646192, type: 3} + - target: {fileID: 3028288566889208749, guid: 02daecb0115395844b4932445d039051, type: 3} + propertyPath: _prefabs.Array.data[16] + value: + objectReference: {fileID: 6962989255644195630, guid: 8b50d9afb3bbd204d8dfea3d64f13fa2, type: 3} + - target: {fileID: 3028288566889208749, guid: 02daecb0115395844b4932445d039051, type: 3} + propertyPath: _prefabs.Array.data[17] + value: + objectReference: {fileID: 809914571062164693, guid: 5497dc5adfbe67341980c9d946816424, type: 3} + - target: {fileID: 3028288566889208749, guid: 02daecb0115395844b4932445d039051, type: 3} + propertyPath: _prefabs.Array.data[18] + value: + objectReference: {fileID: 4897909026855453892, guid: 3918c7d48763f184a92c7d61380ca258, type: 3} + - target: {fileID: 3028288566889208749, guid: 02daecb0115395844b4932445d039051, type: 3} + propertyPath: _prefabs.Array.data[19] + value: + objectReference: {fileID: 8433619855353240514, guid: bc81e2a1e8b64884692701c2892f62a4, type: 3} + - target: {fileID: 3028288566889208749, guid: 02daecb0115395844b4932445d039051, type: 3} + propertyPath: _prefabs.Array.data[20] + value: + objectReference: {fileID: 4052934186652138539, guid: 8560e1f66d452b543a705c8a0f3e22fa, type: 3} + - target: {fileID: 3028288566889208749, guid: 02daecb0115395844b4932445d039051, type: 3} + propertyPath: _prefabs.Array.data[21] + value: + objectReference: {fileID: 3814095509541806390, guid: 9527f3a1482b90a48bb6c62acc70f986, type: 3} + - target: {fileID: 3028288566889208749, guid: 02daecb0115395844b4932445d039051, type: 3} + propertyPath: _prefabs.Array.data[22] + value: + objectReference: {fileID: 907652127959947826, guid: e20680474d73eee49836ff9cbc6d0b28, type: 3} + - target: {fileID: 3028288566889208749, guid: 02daecb0115395844b4932445d039051, type: 3} + propertyPath: _prefabs.Array.data[23] + value: + objectReference: {fileID: 907652127959947826, guid: afc444040d3adcf45a882e4882521f5e, type: 3} + - target: {fileID: 3028288566889208749, guid: 02daecb0115395844b4932445d039051, type: 3} + propertyPath: _prefabs.Array.data[24] + value: + objectReference: {fileID: 4817988606444742093, guid: 306211cf6348ac747a78d89bd72fca3e, type: 3} + - target: {fileID: 3028288566889208749, guid: 02daecb0115395844b4932445d039051, type: 3} + propertyPath: _prefabs.Array.data[25] + value: + objectReference: {fileID: 1893888152770301340, guid: eb25bde5e3c72d34fbc9095e2c83cdb4, type: 3} + - target: {fileID: 3028288566889208749, guid: 02daecb0115395844b4932445d039051, type: 3} + propertyPath: _prefabs.Array.data[26] + value: + objectReference: {fileID: 3409838768749337993, guid: 096f5f6b487dccb41a48faf69f87fae9, type: 3} + - target: {fileID: 3028288566889208749, guid: 02daecb0115395844b4932445d039051, type: 3} + propertyPath: _prefabs.Array.data[27] + value: + objectReference: {fileID: 1388419617042242061, guid: 4a2f48781c26ad247b697aa368358f88, type: 3} + - target: {fileID: 3028288566889208749, guid: 02daecb0115395844b4932445d039051, type: 3} + propertyPath: _prefabs.Array.data[28] + value: + objectReference: {fileID: 3405186844740662670, guid: 074c072b696214a4ba44ff66e9a7d9a6, type: 3} + - target: {fileID: 3028288566889208749, guid: 02daecb0115395844b4932445d039051, type: 3} + propertyPath: _prefabs.Array.data[29] + value: + objectReference: {fileID: 6962989255644195630, guid: a2dc5d9672c10074fa9c35c12f6339c1, type: 3} + - target: {fileID: 3028288566889208749, guid: 02daecb0115395844b4932445d039051, type: 3} + propertyPath: _prefabs.Array.data[30] + value: + objectReference: {fileID: 6962989255644195630, guid: 484f0eca1c74ae34694692de56a36739, type: 3} + - target: {fileID: 3028288566889208749, guid: 02daecb0115395844b4932445d039051, type: 3} + propertyPath: _prefabs.Array.data[31] + value: + objectReference: {fileID: 6962989255644195630, guid: f20569b5452c2b341a95d656b7534b7e, type: 3} + - target: {fileID: 3028288566889208749, guid: 02daecb0115395844b4932445d039051, type: 3} + propertyPath: _scriptableObjects.Array.size + value: 8 + objectReference: {fileID: 0} + - target: {fileID: 3028288566889208749, guid: 02daecb0115395844b4932445d039051, type: 3} + propertyPath: _scriptableObjects.Array.data[0] + value: + objectReference: {fileID: 11400000, guid: 3723ba09738ef6245947ae3ba7978b21, type: 2} + - target: {fileID: 3028288566889208749, guid: 02daecb0115395844b4932445d039051, type: 3} + propertyPath: _scriptableObjects.Array.data[1] + value: + objectReference: {fileID: 11400000, guid: 4002377ed7e87b34699f126f2b10c703, type: 2} + - target: {fileID: 3028288566889208749, guid: 02daecb0115395844b4932445d039051, type: 3} + propertyPath: _scriptableObjects.Array.data[2] + value: + objectReference: {fileID: 11400000, guid: 15606c8c503e8164fb69178aa7016f58, type: 2} + - target: {fileID: 3028288566889208749, guid: 02daecb0115395844b4932445d039051, type: 3} + propertyPath: _scriptableObjects.Array.data[3] + value: + objectReference: {fileID: 11400000, guid: 7568f730b2ba3754297a7612452482e2, type: 2} + - target: {fileID: 3028288566889208749, guid: 02daecb0115395844b4932445d039051, type: 3} + propertyPath: _scriptableObjects.Array.data[4] + value: + objectReference: {fileID: 11400000, guid: e0b1d2d816ae5624c99b09a2bebb2a39, type: 2} - target: {fileID: 3028288566889208750, guid: 02daecb0115395844b4932445d039051, type: 3} propertyPath: firstLevel value: diff --git a/Assets/Scripts/Ally/Harvester.cs b/Assets/Scripts/Ally/Harvester.cs index 7640594..cb48205 100644 --- a/Assets/Scripts/Ally/Harvester.cs +++ b/Assets/Scripts/Ally/Harvester.cs @@ -6,7 +6,7 @@ public class Harvester : Ally { [SerializeField] [Tooltip("helps choose the right skin for the harvester depending on resource")] private List _harvesterResourcePairs; - protected ResourceChoice ResourceChoice => _resourceChoice; + protected ResourceNodeType ResourceNodeType => _resourceNodeType; public override Vector2 RangeMultiplier { get; } @@ -19,7 +19,7 @@ public class Harvester : Ally public override float AttackSpeedMultiplier { get; } [SerializeField] - private ResourceChoice _resourceChoice; + private ResourceNodeType _resourceNodeType; public override sealed void Start() { base.Start(); @@ -36,16 +36,9 @@ public class Harvester : Ally var tile = LevelManager.Instance.Get(t => t.Position == Position); if (tile == default) return; - //get the resource of the tile we're on - var yieldPrefab = tile.YieldPrefab; - if (!yieldPrefab) return; - - var resourceMaker = yieldPrefab.GetComponent(); - if (!resourceMaker) return; - //if we already have the right harvester for the resource, no need to change - var resourceChoice = resourceMaker.ResourceChoice; - if (resourceChoice == this.ResourceChoice) return; + var resourceChoice = tile.ResourceNodeType; + if (resourceChoice == this.ResourceNodeType) return; //get the right pair for the resource we're on var harvResPair = _harvesterResourcePairs.Find(hrp => hrp.Resource == resourceChoice); diff --git a/Assets/Scripts/Ally/HarvesterResourcePair.cs b/Assets/Scripts/Ally/HarvesterResourcePair.cs index f76addc..47993a4 100644 --- a/Assets/Scripts/Ally/HarvesterResourcePair.cs +++ b/Assets/Scripts/Ally/HarvesterResourcePair.cs @@ -10,8 +10,8 @@ public class HarvesterResourcePair [SerializeField] private GameObject _harvesterPrefab; [SerializeField] - private ResourceChoice _resource; + private ResourceNodeType _resource; public GameObject HarvesterPrefab => _harvesterPrefab; - public ResourceChoice Resource => _resource; + public ResourceNodeType Resource => _resource; } \ No newline at end of file diff --git a/Assets/Scripts/AnimationEntity.cs b/Assets/Scripts/AnimationEntity.cs index b8c0f77..e2018b7 100644 --- a/Assets/Scripts/AnimationEntity.cs +++ b/Assets/Scripts/AnimationEntity.cs @@ -26,7 +26,8 @@ public class AnimationEntity : MonoBehaviour } void Update() - { + { + if (!_animatorEntity) return; if (_doSomething && _animatorEntity.GetCurrentAnimatorStateInfo(0).normalizedTime >= 1f) { PlayIdleAnim(); diff --git a/Assets/Scripts/Drag&Drop/DraggablePlaceholder.cs b/Assets/Scripts/Drag&Drop/DraggablePlaceholder.cs index 45fc0d5..a7c0898 100644 --- a/Assets/Scripts/Drag&Drop/DraggablePlaceholder.cs +++ b/Assets/Scripts/Drag&Drop/DraggablePlaceholder.cs @@ -93,7 +93,7 @@ public abstract class DraggablePlaceholder : MonoBehaviour { return !LevelManager.Instance.Has(obj => obj.Position.IsContainedIn(transform.position)) && _lvlBoundsCache.Contains(transform.position) - && ResourceManager.Instance.EnoughFor(Rock, Wood, Food, 0); + && ResourceManager.Instance.EnoughFor(Rock, Wood, Food); } /// diff --git a/Assets/Scripts/Drag&Drop/GameObjectPlacementButton.cs b/Assets/Scripts/Drag&Drop/GameObjectPlacementButton.cs index ef6e0b6..356cb40 100644 --- a/Assets/Scripts/Drag&Drop/GameObjectPlacementButton.cs +++ b/Assets/Scripts/Drag&Drop/GameObjectPlacementButton.cs @@ -9,7 +9,11 @@ public class GameObjectPlacementButton : UnitPlacementButton protected override bool CanPlace() { var isBuilding = _prefab.GetComponent(); - return ResourceManager.Instance.EnoughFor(_rock, _wood, _food, isBuilding ? 0 : GlobalConfig.Instance.Current.populationCostPerUnit) && _button.enabled && _canSpawn; + var defaultPopCost = GlobalConfig.Instance.Current.populationCostPerUnit; + var hasEnoughPopulation = isBuilding || ResourceManager.Instance.EnoughPopulationFor(defaultPopCost); + return ResourceManager.Instance.EnoughFor(_rock, _wood, _food) + && hasEnoughPopulation + && _button.enabled && _canSpawn; } protected override DraggablePlaceholder Place() diff --git a/Assets/Scripts/Drag&Drop/ObjectPlaceholder.cs b/Assets/Scripts/Drag&Drop/ObjectPlaceholder.cs index 500892e..9fbe0b7 100644 --- a/Assets/Scripts/Drag&Drop/ObjectPlaceholder.cs +++ b/Assets/Scripts/Drag&Drop/ObjectPlaceholder.cs @@ -12,8 +12,11 @@ public class ObjectPlaceholder : DraggablePlaceholder var objsOnPosition = LevelManager.Instance.GetAll(obj => obj.Position.IsContainedIn(transform.position)); var positionIsCollidable = objsOnPosition.Exists(obj => obj.IsCollidable); + var defaultUnitCost = GlobalConfig.Instance.Current.populationCostPerUnit; return !positionIsCollidable && _lvlBoundsCache.Contains(transform.position) - && ResourceManager.Instance.EnoughFor(Rock, Wood, Food, Prefab.GetComponent() ? 0 : 1); + && ResourceManager.Instance.EnoughFor(Rock, Wood, Food) + && (Prefab.GetComponent() + || ResourceManager.Instance.EnoughPopulationFor(defaultUnitCost)); } } \ No newline at end of file diff --git a/Assets/Scripts/Drag&Drop/TilePlacementButton.cs b/Assets/Scripts/Drag&Drop/TilePlacementButton.cs index dc85eb3..01e3764 100644 --- a/Assets/Scripts/Drag&Drop/TilePlacementButton.cs +++ b/Assets/Scripts/Drag&Drop/TilePlacementButton.cs @@ -8,7 +8,7 @@ public class TilePlacementButton : UnitPlacementButton protected override bool CanPlace() { - return ResourceManager.Instance.EnoughFor(_rock, _wood, _food, 0) && _button.enabled && _canSpawn; + return ResourceManager.Instance.EnoughFor(_rock, _wood, _food) && _button.enabled && _canSpawn; } protected override DraggablePlaceholder Place() diff --git a/Assets/Scripts/Enum.cs b/Assets/Scripts/Enum.cs index 0ea191f..08bcd5c 100644 --- a/Assets/Scripts/Enum.cs +++ b/Assets/Scripts/Enum.cs @@ -2,9 +2,15 @@ public class Enum { public enum ResourceChoice { - Rock, - Wood, - Food, - Berry + Rock = 0, + Wood = 1, + Food = 2 }; + public enum ResourceNodeType + { + Rock = 0, + Forest = 1, + Farm = 2, + BerryBush = 3 + } } diff --git a/Assets/Scripts/General/Database.cs b/Assets/Scripts/General/Database.cs index af66706..e4b5b8b 100644 --- a/Assets/Scripts/General/Database.cs +++ b/Assets/Scripts/General/Database.cs @@ -37,7 +37,7 @@ public class Database : SingletonBehaviour public void Add(T element) => elements.Add(element); - + public void Clear() => elements.Clear(); public IEnumerator GetEnumerator() { return elements.GetEnumerator(); diff --git a/Assets/Scripts/LevelConfig/WaveObserver.cs b/Assets/Scripts/LevelConfig/WaveObserver.cs index 3229353..9b8c8c0 100644 --- a/Assets/Scripts/LevelConfig/WaveObserver.cs +++ b/Assets/Scripts/LevelConfig/WaveObserver.cs @@ -21,6 +21,11 @@ public class WaveObserver : Singleton _copyConstantSpawn = new List(); _copyGroupSpawn = new List(); _groupSpawnTimers = new List(); + if (!_levelConfig) + { + Debug.LogError("level config was null"); + return; + } foreach (EnemyType enemy in _levelConfig.ConstantSpawn) { _copyConstantSpawn.Add(enemy.Count); diff --git a/Assets/Scripts/LoadingManager.cs b/Assets/Scripts/LoadingManager.cs index 93ae13c..fbed75c 100644 --- a/Assets/Scripts/LoadingManager.cs +++ b/Assets/Scripts/LoadingManager.cs @@ -101,9 +101,4 @@ public class LoadingManager : MonoBehaviour { SceneManager.UnloadSceneAsync(gameObject.scene.name); } - - - - - } \ No newline at end of file diff --git a/Assets/Scripts/Resource/ResourceMaker.cs b/Assets/Scripts/Resource/ResourceMaker.cs index 628f304..1bab68d 100644 --- a/Assets/Scripts/Resource/ResourceMaker.cs +++ b/Assets/Scripts/Resource/ResourceMaker.cs @@ -46,7 +46,6 @@ public class ResourceMaker : MonoBehaviour if (_isPlaying) { - var amount = GlobalConfig.Instance.Current.harvestAmount; _timePassed += Time.deltaTime; float duration = _timePassed / _desiredTime; duration = duration * duration * (3.0f - 2.0f * duration); @@ -54,26 +53,16 @@ public class ResourceMaker : MonoBehaviour if(Vector2.Distance(transform.position,_endPosition) < 0.001f) { _isPlaying = false; - switch (_resourceChoice) - { - case Enum.ResourceChoice.Rock: - _resourceManagerInstance.RockAmount = amount; - break; - case Enum.ResourceChoice.Wood: - _resourceManagerInstance.WoodAmount = amount; - break; - case Enum.ResourceChoice.Food: - _resourceManagerInstance.FoodAmount = amount; - break; - case Enum.ResourceChoice.Berry: - _resourceManagerInstance.BerryAmount = amount; - break; - } Destroy(gameObject); } } } + void OnDestroy() + { + AddResourceToInventory(GlobalConfig.Instance.Current.harvestAmount); + } + public void AddResourceToInventory(int amount) { switch (_resourceChoice) diff --git a/Assets/Scripts/Resource/ResourceManager.cs b/Assets/Scripts/Resource/ResourceManager.cs index 0bc7b18..cb31eb8 100644 --- a/Assets/Scripts/Resource/ResourceManager.cs +++ b/Assets/Scripts/Resource/ResourceManager.cs @@ -116,11 +116,14 @@ public class ResourceManager : Singleton } } - public bool EnoughFor(int rock, int wood, int food = 0, int population = 1) + public bool EnoughFor(int rock, int wood, int food = 0) { return _rockAmount >= rock && _woodAmount >= wood - && _foodAmount >= food - && _currentPopulation + population <= _maximumPopulation; + && _foodAmount >= food; + } + public bool EnoughPopulationFor(int population = 1) + { + return _currentPopulation + population <= _maximumPopulation; } } diff --git a/Assets/Scripts/Tiles/ResourceTile.cs b/Assets/Scripts/Tiles/ResourceTile.cs index cfd4e6a..ca6e765 100644 --- a/Assets/Scripts/Tiles/ResourceTile.cs +++ b/Assets/Scripts/Tiles/ResourceTile.cs @@ -8,7 +8,10 @@ public class ResourceTile : LevelTile [SerializeField] [Tooltip("the prefab of the currency that will be spawned when mining this resource")] private GameObject _yieldPrefab; - + [SerializeField] + private Enum.ResourceNodeType _resourceNodeType; + + public Enum.ResourceNodeType ResourceNodeType => _resourceNodeType; public GameObject YieldPrefab => _yieldPrefab; private string YieldPrefabName => _yieldPrefab.name; diff --git a/Assets/Scripts/WorldMap/WorldMapManager.cs b/Assets/Scripts/WorldMap/WorldMapManager.cs index 676f3fd..b2b1b62 100644 --- a/Assets/Scripts/WorldMap/WorldMapManager.cs +++ b/Assets/Scripts/WorldMap/WorldMapManager.cs @@ -70,7 +70,6 @@ public class WorldMapManager : MonoBehaviour public void CallLevelWorld1(int levelToCall) { - string levelToGet = "1-" + levelToCall; if (_buttonList[levelToCall - 1].GetComponent().sprite.name != "worldmap_level_locked") { PlayerPrefs.SetString(LoadingManager.SceneToLoad, _gameScene); diff --git a/Assets/Tilemaps/LevelEditorPalette.prefab b/Assets/Tilemaps/LevelEditorPalette.prefab index 1abd475..457a086 100644 --- a/Assets/Tilemaps/LevelEditorPalette.prefab +++ b/Assets/Tilemaps/LevelEditorPalette.prefab @@ -87,16 +87,6 @@ Tilemap: m_GameObject: {fileID: 5890485537825364348} m_Enabled: 1 m_Tiles: - - first: {x: -1, y: -4, z: 0} - second: - serializedVersion: 2 - m_TileIndex: 8 - m_TileSpriteIndex: 8 - m_TileMatrixIndex: 0 - m_TileColorIndex: 0 - m_TileObjectToInstantiateIndex: 65535 - dummyAlignment: 0 - m_AllTileFlags: 0 - first: {x: -1, y: -3, z: 0} second: serializedVersion: 2 @@ -215,7 +205,7 @@ Tilemap: m_Data: {fileID: 11400000, guid: 7568f730b2ba3754297a7612452482e2, type: 2} - m_RefCount: 1 m_Data: {fileID: 11400000, guid: 15606c8c503e8164fb69178aa7016f58, type: 2} - - m_RefCount: 2 + - m_RefCount: 1 m_Data: {fileID: 11400000, guid: 3723ba09738ef6245947ae3ba7978b21, type: 2} m_TileSpriteArray: - m_RefCount: 1 @@ -234,10 +224,10 @@ Tilemap: m_Data: {fileID: 21300000, guid: 5cf7447a03096c04ead18f1855f01cd7, type: 3} - m_RefCount: 1 m_Data: {fileID: 21300000, guid: 8354a544f4ca3514e87d40d2de9afaee, type: 3} - - m_RefCount: 2 + - m_RefCount: 1 m_Data: {fileID: 21300000, guid: 22cdcbd5df3efd74fa4d119fc5836708, type: 3} m_TileMatrixArray: - - m_RefCount: 11 + - m_RefCount: 10 m_Data: e00: 1 e01: 0 @@ -256,7 +246,7 @@ Tilemap: e32: 0 e33: 1 m_TileColorArray: - - m_RefCount: 11 + - m_RefCount: 10 m_Data: {r: 1, g: 1, b: 1, a: 1} m_TileObjectToInstantiateArray: [] m_AnimationFrameRate: 1 @@ -331,7 +321,7 @@ TilemapRenderer: m_Mode: 0 m_DetectChunkCullingBounds: 0 m_MaskInteraction: 0 ---- !u!114 &8094062243660986082 +--- !u!114 &70335294776359290 MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} diff --git a/Assets/Tiles/BushTile.asset b/Assets/Tiles/BushTile.asset index 1b2dac9..20aa5b0 100644 --- a/Assets/Tiles/BushTile.asset +++ b/Assets/Tiles/BushTile.asset @@ -15,4 +15,5 @@ MonoBehaviour: _sprite: {fileID: 21300000, guid: 22cdcbd5df3efd74fa4d119fc5836708, type: 3} _isCollidable: 0 _yieldPrefab: {fileID: 6962989255644195630, guid: a2dc5d9672c10074fa9c35c12f6339c1, type: 3} - _randomPositionConfig: 0.5 + _resourceNodeType: 3 + _randomPositionConfig: 0.25 diff --git a/Assets/Tiles/Farm.asset b/Assets/Tiles/Farm.asset index 326eb50..62d4a52 100644 --- a/Assets/Tiles/Farm.asset +++ b/Assets/Tiles/Farm.asset @@ -15,5 +15,5 @@ MonoBehaviour: _sprite: {fileID: 21300000, guid: ccca3e050cb082b45af0a099790463f6, type: 3} _isCollidable: 0 _yieldPrefab: {fileID: 6962989255644195630, guid: a2dc5d9672c10074fa9c35c12f6339c1, type: 3} - _yieldDuration: 5 + _resourceNodeType: 2 _randomPositionConfig: 0.25 diff --git a/Assets/Tiles/Forest.asset b/Assets/Tiles/Forest.asset index 88f485a..fee629b 100644 --- a/Assets/Tiles/Forest.asset +++ b/Assets/Tiles/Forest.asset @@ -15,5 +15,5 @@ MonoBehaviour: _sprite: {fileID: 21300000, guid: 43582b3c6b60fd144bc56d8ab3b14349, type: 3} _isCollidable: 0 _yieldPrefab: {fileID: 6962989255644195630, guid: f20569b5452c2b341a95d656b7534b7e, type: 3} - _yieldDuration: 5 + _resourceNodeType: 1 _randomPositionConfig: 0.5 diff --git a/Assets/Tiles/Meat.asset b/Assets/Tiles/Meat.asset deleted file mode 100644 index ddf80a2..0000000 --- a/Assets/Tiles/Meat.asset +++ /dev/null @@ -1,19 +0,0 @@ -%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: 84b05f2a26f63da46a1028488482d079, type: 3} - m_Name: Meat - m_EditorClassIdentifier: - _sprite: {fileID: 21300000, guid: b1e6b8ebeb2e25f4f8c5de93a31dd6a2, type: 3} - _isCollidable: 0 - _yieldPrefab: {fileID: 6962989255644195630, guid: a2dc5d9672c10074fa9c35c12f6339c1, type: 3} - _yieldDuration: 5 - _randomPositionConfig: 0.5 diff --git a/Assets/Tiles/Meat.asset.meta b/Assets/Tiles/Meat.asset.meta deleted file mode 100644 index b062d41..0000000 --- a/Assets/Tiles/Meat.asset.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: a19b3b6859986b449aac7484e064097a -NativeFormatImporter: - externalObjects: {} - mainObjectFileID: 0 - userData: - assetBundleName: - assetBundleVariant: From 4568c350bfec91842dc9a8fe0917798fbfce7dda Mon Sep 17 00:00:00 2001 From: Felix Boucher Date: Sun, 12 Nov 2023 20:31:21 -0500 Subject: [PATCH 07/13] toggle collider in coroutine instead of script --- Assets/Scripts/Detection.cs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/Assets/Scripts/Detection.cs b/Assets/Scripts/Detection.cs index c3acfcf..5c1339f 100644 --- a/Assets/Scripts/Detection.cs +++ b/Assets/Scripts/Detection.cs @@ -103,14 +103,19 @@ public class Detection : MonoBehaviour if(_projectileDamage == 0) { if ((other.gameObject.tag == "Opponent" && _entityLinked is Ally) || (other.gameObject.tag == "Ally" && _entityLinked is Opponent)) { _entityLinked.IsEnemyDetected = false; - enabled = false; - enabled = true; + StartCoroutine(ToggleCollider()); } } } } + IEnumerator ToggleCollider() + { + _collider.enabled = false; + yield return null; + _collider.enabled = true; + } //Getter and Setter public Entity EntityLinked From e1ffb8c88703387e94a243c6ce643d7ba12d761b Mon Sep 17 00:00:00 2001 From: craftwill Date: Mon, 13 Nov 2023 17:47:23 -0500 Subject: [PATCH 08/13] Add berries to all levels --- Assets/Design/Levels/Level1.asset | 6 +++++- Assets/Design/Levels/Level2.asset | 14 +++++--------- Assets/Design/Levels/Level3.asset | 12 ++++++------ Assets/Design/Levels/Level4.asset | 10 +++++----- Assets/Design/Levels/Level5.asset | 30 +++++++++++------------------- Assets/Design/Levels/Level6.asset | 10 +++++----- 6 files changed, 37 insertions(+), 45 deletions(-) diff --git a/Assets/Design/Levels/Level1.asset b/Assets/Design/Levels/Level1.asset index 3639283..02ba32a 100644 --- a/Assets/Design/Levels/Level1.asset +++ b/Assets/Design/Levels/Level1.asset @@ -148,6 +148,10 @@ MonoBehaviour: _position: {x: -10, y: -3, z: 0} - _tile: {fileID: 11400000, guid: e74655ccbd41a2b46b1ec9615aba0301, type: 2} _position: {x: -10, y: -2, z: 0} + - _tile: {fileID: 11400000, guid: 3723ba09738ef6245947ae3ba7978b21, type: 2} + _position: {x: -10, y: -1, z: 0} + - _tile: {fileID: 11400000, guid: 3723ba09738ef6245947ae3ba7978b21, type: 2} + _position: {x: -10, y: 0, z: 0} - _tile: {fileID: 11400000, guid: e74655ccbd41a2b46b1ec9615aba0301, type: 2} _position: {x: -10, y: 1, z: 0} - _tile: {fileID: 11400000, guid: e74655ccbd41a2b46b1ec9615aba0301, type: 2} @@ -244,7 +248,7 @@ MonoBehaviour: _renderLayer: Default _position: {x: 0, y: 0} _scale: {x: 1, y: 1} - _waveConfig: {fileID: 11400000, guid: 4c72177270b51eb46872d1665e3a097e, type: 2} + _waveConfig: {fileID: 0} _startPopulation: 5 _startFood: 50 _startWood: 0 diff --git a/Assets/Design/Levels/Level2.asset b/Assets/Design/Levels/Level2.asset index a5fa3ab..7c41e4e 100644 --- a/Assets/Design/Levels/Level2.asset +++ b/Assets/Design/Levels/Level2.asset @@ -146,16 +146,14 @@ MonoBehaviour: _tiles: - _tile: {fileID: 11400000, guid: e0b1d2d816ae5624c99b09a2bebb2a39, type: 2} _position: {x: -10, y: -3, z: 0} - - _tile: {fileID: 11400000, guid: e0b1d2d816ae5624c99b09a2bebb2a39, type: 2} + - _tile: {fileID: 11400000, guid: 3723ba09738ef6245947ae3ba7978b21, type: 2} _position: {x: -10, y: -2, z: 0} - - _tile: {fileID: 11400000, guid: e0b1d2d816ae5624c99b09a2bebb2a39, type: 2} + - _tile: {fileID: 11400000, guid: 3723ba09738ef6245947ae3ba7978b21, type: 2} _position: {x: -10, y: -1, z: 0} - - _tile: {fileID: 11400000, guid: e0b1d2d816ae5624c99b09a2bebb2a39, type: 2} + - _tile: {fileID: 11400000, guid: 3723ba09738ef6245947ae3ba7978b21, type: 2} _position: {x: -10, y: 0, z: 0} - - _tile: {fileID: 11400000, guid: e0b1d2d816ae5624c99b09a2bebb2a39, type: 2} + - _tile: {fileID: 11400000, guid: 3723ba09738ef6245947ae3ba7978b21, type: 2} _position: {x: -10, y: 1, z: 0} - - _tile: {fileID: 11400000, guid: e0b1d2d816ae5624c99b09a2bebb2a39, type: 2} - _position: {x: -10, y: 2, z: 0} - _tile: {fileID: 11400000, guid: e0b1d2d816ae5624c99b09a2bebb2a39, type: 2} _position: {x: -9, y: -3, z: 0} - _tile: {fileID: 11400000, guid: e0b1d2d816ae5624c99b09a2bebb2a39, type: 2} @@ -166,8 +164,6 @@ MonoBehaviour: _position: {x: -9, y: 0, z: 0} - _tile: {fileID: 11400000, guid: e0b1d2d816ae5624c99b09a2bebb2a39, type: 2} _position: {x: -9, y: 1, z: 0} - - _tile: {fileID: 11400000, guid: e0b1d2d816ae5624c99b09a2bebb2a39, type: 2} - _position: {x: -9, y: 2, z: 0} _isInvisible: 0 _isCollidable: 0 _isTrigger: 0 @@ -196,7 +192,7 @@ MonoBehaviour: _renderLayer: Default _position: {x: 0, y: 0} _scale: {x: 1, y: 1} - _waveConfig: {fileID: 11400000, guid: 4c72177270b51eb46872d1665e3a097e, type: 2} + _waveConfig: {fileID: 0} _startPopulation: 5 _startFood: 50 _startWood: 0 diff --git a/Assets/Design/Levels/Level3.asset b/Assets/Design/Levels/Level3.asset index 0ca94e4..d34eecd 100644 --- a/Assets/Design/Levels/Level3.asset +++ b/Assets/Design/Levels/Level3.asset @@ -146,12 +146,12 @@ MonoBehaviour: _tiles: - _tile: {fileID: 11400000, guid: e0b1d2d816ae5624c99b09a2bebb2a39, type: 2} _position: {x: -10, y: -3, z: 0} - - _tile: {fileID: 11400000, guid: 7568f730b2ba3754297a7612452482e2, type: 2} - _position: {x: -10, y: -1, z: 0} - - _tile: {fileID: 11400000, guid: 7568f730b2ba3754297a7612452482e2, type: 2} - _position: {x: -10, y: 0, z: 0} + - _tile: {fileID: 11400000, guid: 3723ba09738ef6245947ae3ba7978b21, type: 2} + _position: {x: -10, y: 2, z: 0} - _tile: {fileID: 11400000, guid: e0b1d2d816ae5624c99b09a2bebb2a39, type: 2} _position: {x: -9, y: -3, z: 0} + - _tile: {fileID: 11400000, guid: 3723ba09738ef6245947ae3ba7978b21, type: 2} + _position: {x: -9, y: 2, z: 0} - _tile: {fileID: 11400000, guid: e0b1d2d816ae5624c99b09a2bebb2a39, type: 2} _position: {x: -8, y: -3, z: 0} - _tile: {fileID: 11400000, guid: e0b1d2d816ae5624c99b09a2bebb2a39, type: 2} @@ -162,7 +162,7 @@ MonoBehaviour: _position: {x: -5, y: -3, z: 0} - _tile: {fileID: 11400000, guid: e0b1d2d816ae5624c99b09a2bebb2a39, type: 2} _position: {x: -4, y: -3, z: 0} - - _tile: {fileID: 11400000, guid: e0d57b3c128ba1447920637cdb289530, type: 2} + - _tile: {fileID: 11400000, guid: e0b1d2d816ae5624c99b09a2bebb2a39, type: 2} _position: {x: -3, y: -3, z: 0} - _tile: {fileID: 11400000, guid: e74655ccbd41a2b46b1ec9615aba0301, type: 2} _position: {x: -2, y: -3, z: 0} @@ -194,7 +194,7 @@ MonoBehaviour: _renderLayer: Default _position: {x: 0, y: 0} _scale: {x: 1, y: 1} - _waveConfig: {fileID: 11400000, guid: 4c72177270b51eb46872d1665e3a097e, type: 2} + _waveConfig: {fileID: 0} _startPopulation: 5 _startFood: 50 _startWood: 0 diff --git a/Assets/Design/Levels/Level4.asset b/Assets/Design/Levels/Level4.asset index 396af7d..5b59118 100644 --- a/Assets/Design/Levels/Level4.asset +++ b/Assets/Design/Levels/Level4.asset @@ -144,9 +144,9 @@ MonoBehaviour: _scale: {x: 1, y: 1} - _key: Entities _tiles: - - _tile: {fileID: 11400000, guid: e0d57b3c128ba1447920637cdb289530, type: 2} + - _tile: {fileID: 11400000, guid: 3723ba09738ef6245947ae3ba7978b21, type: 2} _position: {x: -10, y: -3, z: 0} - - _tile: {fileID: 11400000, guid: e0d57b3c128ba1447920637cdb289530, type: 2} + - _tile: {fileID: 11400000, guid: 3723ba09738ef6245947ae3ba7978b21, type: 2} _position: {x: -10, y: -2, z: 0} - _tile: {fileID: 11400000, guid: e74655ccbd41a2b46b1ec9615aba0301, type: 2} _position: {x: -10, y: -1, z: 0} @@ -156,9 +156,9 @@ MonoBehaviour: _position: {x: -10, y: 1, z: 0} - _tile: {fileID: 11400000, guid: e0b1d2d816ae5624c99b09a2bebb2a39, type: 2} _position: {x: -10, y: 2, z: 0} - - _tile: {fileID: 11400000, guid: e0d57b3c128ba1447920637cdb289530, type: 2} + - _tile: {fileID: 11400000, guid: 3723ba09738ef6245947ae3ba7978b21, type: 2} _position: {x: -9, y: -3, z: 0} - - _tile: {fileID: 11400000, guid: e0d57b3c128ba1447920637cdb289530, type: 2} + - _tile: {fileID: 11400000, guid: 3723ba09738ef6245947ae3ba7978b21, type: 2} _position: {x: -9, y: -2, z: 0} - _tile: {fileID: 11400000, guid: e74655ccbd41a2b46b1ec9615aba0301, type: 2} _position: {x: -9, y: -1, z: 0} @@ -224,7 +224,7 @@ MonoBehaviour: _renderLayer: Default _position: {x: 0, y: 0} _scale: {x: 1, y: 1} - _waveConfig: {fileID: 11400000, guid: 4c72177270b51eb46872d1665e3a097e, type: 2} + _waveConfig: {fileID: 0} _startPopulation: 5 _startFood: 50 _startWood: 0 diff --git a/Assets/Design/Levels/Level5.asset b/Assets/Design/Levels/Level5.asset index 691e82b..0794c35 100644 --- a/Assets/Design/Levels/Level5.asset +++ b/Assets/Design/Levels/Level5.asset @@ -145,33 +145,27 @@ MonoBehaviour: - _key: Entities _tiles: - _tile: {fileID: 11400000, guid: e0b1d2d816ae5624c99b09a2bebb2a39, type: 2} - _position: {x: -10, y: -2, z: 0} - - _tile: {fileID: 11400000, guid: e74655ccbd41a2b46b1ec9615aba0301, type: 2} _position: {x: -10, y: -1, z: 0} - - _tile: {fileID: 11400000, guid: e74655ccbd41a2b46b1ec9615aba0301, type: 2} + - _tile: {fileID: 11400000, guid: e0b1d2d816ae5624c99b09a2bebb2a39, type: 2} _position: {x: -10, y: 0, z: 0} - _tile: {fileID: 11400000, guid: e0b1d2d816ae5624c99b09a2bebb2a39, type: 2} - _position: {x: -10, y: 1, z: 0} - - _tile: {fileID: 11400000, guid: e0b1d2d816ae5624c99b09a2bebb2a39, type: 2} - _position: {x: -9, y: -2, z: 0} - - _tile: {fileID: 11400000, guid: e74655ccbd41a2b46b1ec9615aba0301, type: 2} _position: {x: -9, y: -1, z: 0} - - _tile: {fileID: 11400000, guid: e74655ccbd41a2b46b1ec9615aba0301, type: 2} + - _tile: {fileID: 11400000, guid: e0b1d2d816ae5624c99b09a2bebb2a39, type: 2} _position: {x: -9, y: 0, z: 0} - _tile: {fileID: 11400000, guid: e0b1d2d816ae5624c99b09a2bebb2a39, type: 2} - _position: {x: -9, y: 1, z: 0} - - _tile: {fileID: 11400000, guid: e0b1d2d816ae5624c99b09a2bebb2a39, type: 2} - _position: {x: -8, y: -2, z: 0} - - _tile: {fileID: 11400000, guid: e74655ccbd41a2b46b1ec9615aba0301, type: 2} _position: {x: -8, y: -1, z: 0} - - _tile: {fileID: 11400000, guid: e74655ccbd41a2b46b1ec9615aba0301, type: 2} + - _tile: {fileID: 11400000, guid: e0b1d2d816ae5624c99b09a2bebb2a39, type: 2} _position: {x: -8, y: 0, z: 0} - _tile: {fileID: 11400000, guid: e0b1d2d816ae5624c99b09a2bebb2a39, type: 2} - _position: {x: -8, y: 1, z: 0} - - _tile: {fileID: 11400000, guid: e0d57b3c128ba1447920637cdb289530, type: 2} - _position: {x: -5, y: -3, z: 0} + _position: {x: -7, y: -1, z: 0} + - _tile: {fileID: 11400000, guid: e0b1d2d816ae5624c99b09a2bebb2a39, type: 2} + _position: {x: -7, y: 0, z: 0} - _tile: {fileID: 11400000, guid: e0d57b3c128ba1447920637cdb289530, type: 2} _position: {x: -4, y: -3, z: 0} + - _tile: {fileID: 11400000, guid: e0d57b3c128ba1447920637cdb289530, type: 2} + _position: {x: -3, y: -3, z: 0} + - _tile: {fileID: 11400000, guid: e0d57b3c128ba1447920637cdb289530, type: 2} + _position: {x: -2, y: 2, z: 0} _isInvisible: 0 _isCollidable: 0 _isTrigger: 0 @@ -181,8 +175,6 @@ MonoBehaviour: _scale: {x: 1, y: 1} - _key: Spawners _tiles: - - _tile: {fileID: 11400000, guid: 3723ba09738ef6245947ae3ba7978b21, type: 2} - _position: {x: -6, y: -1, z: 0} - _tile: {fileID: 11400000, guid: 4002377ed7e87b34699f126f2b10c703, type: 2} _position: {x: -1, y: -3, z: 0} - _tile: {fileID: 11400000, guid: 4002377ed7e87b34699f126f2b10c703, type: 2} @@ -202,7 +194,7 @@ MonoBehaviour: _renderLayer: Default _position: {x: 0, y: 0} _scale: {x: 1, y: 1} - _waveConfig: {fileID: 11400000, guid: 4c72177270b51eb46872d1665e3a097e, type: 2} + _waveConfig: {fileID: 0} _startPopulation: 5 _startFood: 50 _startWood: 0 diff --git a/Assets/Design/Levels/Level6.asset b/Assets/Design/Levels/Level6.asset index 3bcebfa..4ba96c0 100644 --- a/Assets/Design/Levels/Level6.asset +++ b/Assets/Design/Levels/Level6.asset @@ -162,14 +162,14 @@ MonoBehaviour: _position: {x: -7, y: -2, z: 0} - _tile: {fileID: 11400000, guid: e74655ccbd41a2b46b1ec9615aba0301, type: 2} _position: {x: -7, y: 1, z: 0} + - _tile: {fileID: 11400000, guid: 3723ba09738ef6245947ae3ba7978b21, type: 2} + _position: {x: -6, y: -2, z: 0} - _tile: {fileID: 11400000, guid: e74655ccbd41a2b46b1ec9615aba0301, type: 2} _position: {x: -6, y: 1, z: 0} - - _tile: {fileID: 11400000, guid: 3723ba09738ef6245947ae3ba7978b21, type: 2} - _position: {x: -5, y: -3, z: 0} - - _tile: {fileID: 11400000, guid: 3723ba09738ef6245947ae3ba7978b21, type: 2} - _position: {x: -5, y: -1, z: 0} - _tile: {fileID: 11400000, guid: e74655ccbd41a2b46b1ec9615aba0301, type: 2} _position: {x: -5, y: 1, z: 0} + - _tile: {fileID: 11400000, guid: 3723ba09738ef6245947ae3ba7978b21, type: 2} + _position: {x: -4, y: -1, z: 0} - _tile: {fileID: 11400000, guid: e74655ccbd41a2b46b1ec9615aba0301, type: 2} _position: {x: -4, y: 1, z: 0} - _tile: {fileID: 11400000, guid: e0b1d2d816ae5624c99b09a2bebb2a39, type: 2} @@ -206,7 +206,7 @@ MonoBehaviour: _renderLayer: Default _position: {x: 0, y: 0} _scale: {x: 1, y: 1} - _waveConfig: {fileID: 11400000, guid: 4c72177270b51eb46872d1665e3a097e, type: 2} + _waveConfig: {fileID: 0} _startPopulation: 5 _startFood: 50 _startWood: 0 From 2c701112ad9d9dbfa2fb87fce1db1bcd1736dd0b Mon Sep 17 00:00:00 2001 From: craftwill Date: Mon, 13 Nov 2023 17:56:14 -0500 Subject: [PATCH 09/13] Add levels missing config; Add island float animation --- Assets/Animations/UI/WorldMap.meta | 8 + .../UI/WorldMap/WorldMapIsland.controller | 72 ++++++ .../WorldMap/WorldMapIsland.controller.meta | 8 + .../UI/WorldMap/WorldMapIsland_Float.anim | 134 ++++++++++++ .../WorldMap/WorldMapIsland_Float.anim.meta | 8 + Assets/Design/Levels/Level1.asset | 2 +- Assets/Design/Levels/Level2.asset | 2 +- Assets/Design/Levels/Level3.asset | 2 +- Assets/Design/Levels/Level4.asset | 2 +- Assets/Design/Levels/Level5.asset | 2 +- Assets/Design/Levels/Level6.asset | 2 +- Assets/Prefabs/UI/WorldMap/Btn_Level.prefab | 2 +- .../Prefabs/UI/WorldMap/WorldMapCanvas.prefab | 205 ++++++++++++++++-- 13 files changed, 426 insertions(+), 23 deletions(-) create mode 100644 Assets/Animations/UI/WorldMap.meta create mode 100644 Assets/Animations/UI/WorldMap/WorldMapIsland.controller create mode 100644 Assets/Animations/UI/WorldMap/WorldMapIsland.controller.meta create mode 100644 Assets/Animations/UI/WorldMap/WorldMapIsland_Float.anim create mode 100644 Assets/Animations/UI/WorldMap/WorldMapIsland_Float.anim.meta diff --git a/Assets/Animations/UI/WorldMap.meta b/Assets/Animations/UI/WorldMap.meta new file mode 100644 index 0000000..9b8d994 --- /dev/null +++ b/Assets/Animations/UI/WorldMap.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 743e30fe10b54494aaf996bdf084bd58 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Animations/UI/WorldMap/WorldMapIsland.controller b/Assets/Animations/UI/WorldMap/WorldMapIsland.controller new file mode 100644 index 0000000..f445fed --- /dev/null +++ b/Assets/Animations/UI/WorldMap/WorldMapIsland.controller @@ -0,0 +1,72 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1107 &-9102624072654608672 +AnimatorStateMachine: + serializedVersion: 6 + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: Base Layer + m_ChildStates: + - serializedVersion: 1 + m_State: {fileID: 1345182337023351907} + m_Position: {x: 200, y: 0, z: 0} + m_ChildStateMachines: [] + m_AnyStateTransitions: [] + m_EntryTransitions: [] + m_StateMachineTransitions: {} + m_StateMachineBehaviours: [] + m_AnyStatePosition: {x: 50, y: 20, z: 0} + m_EntryPosition: {x: 50, y: 120, z: 0} + m_ExitPosition: {x: 800, y: 120, z: 0} + m_ParentStateMachinePosition: {x: 800, y: 20, z: 0} + m_DefaultState: {fileID: 1345182337023351907} +--- !u!91 &9100000 +AnimatorController: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: WorldMapIsland + serializedVersion: 5 + m_AnimatorParameters: [] + m_AnimatorLayers: + - serializedVersion: 5 + m_Name: Base Layer + m_StateMachine: {fileID: -9102624072654608672} + m_Mask: {fileID: 0} + m_Motions: [] + m_Behaviours: [] + m_BlendingMode: 0 + m_SyncedLayerIndex: -1 + m_DefaultWeight: 0 + m_IKPass: 0 + m_SyncedLayerAffectsTiming: 0 + m_Controller: {fileID: 9100000} +--- !u!1102 &1345182337023351907 +AnimatorState: + serializedVersion: 6 + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: WorldMapIsland_Float + m_Speed: 1 + m_CycleOffset: 0 + m_Transitions: [] + m_StateMachineBehaviours: [] + m_Position: {x: 50, y: 50, z: 0} + m_IKOnFeet: 0 + m_WriteDefaultValues: 1 + m_Mirror: 0 + m_SpeedParameterActive: 0 + m_MirrorParameterActive: 0 + m_CycleOffsetParameterActive: 0 + m_TimeParameterActive: 0 + m_Motion: {fileID: 7400000, guid: cba18d9e310383d4eb6eaee15164cfba, type: 2} + m_Tag: + m_SpeedParameter: + m_MirrorParameter: + m_CycleOffsetParameter: + m_TimeParameter: diff --git a/Assets/Animations/UI/WorldMap/WorldMapIsland.controller.meta b/Assets/Animations/UI/WorldMap/WorldMapIsland.controller.meta new file mode 100644 index 0000000..45ca4ba --- /dev/null +++ b/Assets/Animations/UI/WorldMap/WorldMapIsland.controller.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: c66556f1f1203974b8418e3db529fa58 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 9100000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Animations/UI/WorldMap/WorldMapIsland_Float.anim b/Assets/Animations/UI/WorldMap/WorldMapIsland_Float.anim new file mode 100644 index 0000000..7a40e2d --- /dev/null +++ b/Assets/Animations/UI/WorldMap/WorldMapIsland_Float.anim @@ -0,0 +1,134 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!74 &7400000 +AnimationClip: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: WorldMapIsland_Float + serializedVersion: 6 + m_Legacy: 0 + m_Compressed: 0 + m_UseHighQualityCurve: 1 + m_RotationCurves: [] + m_CompressedRotationCurves: [] + m_EulerCurves: [] + m_PositionCurves: [] + m_ScaleCurves: [] + m_FloatCurves: + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 2 + value: -10 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 4 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_AnchoredPosition.y + path: + classID: 224 + script: {fileID: 0} + m_PPtrCurves: [] + m_SampleRate: 60 + m_WrapMode: 0 + m_Bounds: + m_Center: {x: 0, y: 0, z: 0} + m_Extent: {x: 0, y: 0, z: 0} + m_ClipBindingConstant: + genericBindings: + - serializedVersion: 2 + path: 0 + attribute: 538195251 + script: {fileID: 0} + typeID: 224 + customType: 28 + isPPtrCurve: 0 + pptrCurveMapping: [] + m_AnimationClipSettings: + serializedVersion: 2 + m_AdditiveReferencePoseClip: {fileID: 0} + m_AdditiveReferencePoseTime: 0 + m_StartTime: 0 + m_StopTime: 4 + m_OrientationOffsetY: 0 + m_Level: 0 + m_CycleOffset: 0 + m_HasAdditiveReferencePose: 0 + m_LoopTime: 1 + m_LoopBlend: 0 + m_LoopBlendOrientation: 0 + m_LoopBlendPositionY: 0 + m_LoopBlendPositionXZ: 0 + m_KeepOriginalOrientation: 0 + m_KeepOriginalPositionY: 1 + m_KeepOriginalPositionXZ: 0 + m_HeightFromFeet: 0 + m_Mirror: 0 + m_EditorCurves: + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 2 + value: -10 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 4 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_AnchoredPosition.y + path: + classID: 224 + script: {fileID: 0} + m_EulerEditorCurves: [] + m_HasGenericRootTransform: 0 + m_HasMotionFloatCurves: 0 + m_Events: [] diff --git a/Assets/Animations/UI/WorldMap/WorldMapIsland_Float.anim.meta b/Assets/Animations/UI/WorldMap/WorldMapIsland_Float.anim.meta new file mode 100644 index 0000000..313074f --- /dev/null +++ b/Assets/Animations/UI/WorldMap/WorldMapIsland_Float.anim.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: cba18d9e310383d4eb6eaee15164cfba +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 7400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Design/Levels/Level1.asset b/Assets/Design/Levels/Level1.asset index 02ba32a..2622186 100644 --- a/Assets/Design/Levels/Level1.asset +++ b/Assets/Design/Levels/Level1.asset @@ -248,7 +248,7 @@ MonoBehaviour: _renderLayer: Default _position: {x: 0, y: 0} _scale: {x: 1, y: 1} - _waveConfig: {fileID: 0} + _waveConfig: {fileID: 11400000, guid: 4c72177270b51eb46872d1665e3a097e, type: 2} _startPopulation: 5 _startFood: 50 _startWood: 0 diff --git a/Assets/Design/Levels/Level2.asset b/Assets/Design/Levels/Level2.asset index 7c41e4e..fa30ea8 100644 --- a/Assets/Design/Levels/Level2.asset +++ b/Assets/Design/Levels/Level2.asset @@ -192,7 +192,7 @@ MonoBehaviour: _renderLayer: Default _position: {x: 0, y: 0} _scale: {x: 1, y: 1} - _waveConfig: {fileID: 0} + _waveConfig: {fileID: 11400000, guid: 4c72177270b51eb46872d1665e3a097e, type: 2} _startPopulation: 5 _startFood: 50 _startWood: 0 diff --git a/Assets/Design/Levels/Level3.asset b/Assets/Design/Levels/Level3.asset index d34eecd..03d7452 100644 --- a/Assets/Design/Levels/Level3.asset +++ b/Assets/Design/Levels/Level3.asset @@ -194,7 +194,7 @@ MonoBehaviour: _renderLayer: Default _position: {x: 0, y: 0} _scale: {x: 1, y: 1} - _waveConfig: {fileID: 0} + _waveConfig: {fileID: 11400000, guid: 4c72177270b51eb46872d1665e3a097e, type: 2} _startPopulation: 5 _startFood: 50 _startWood: 0 diff --git a/Assets/Design/Levels/Level4.asset b/Assets/Design/Levels/Level4.asset index 5b59118..c67d17f 100644 --- a/Assets/Design/Levels/Level4.asset +++ b/Assets/Design/Levels/Level4.asset @@ -224,7 +224,7 @@ MonoBehaviour: _renderLayer: Default _position: {x: 0, y: 0} _scale: {x: 1, y: 1} - _waveConfig: {fileID: 0} + _waveConfig: {fileID: 11400000, guid: 4c72177270b51eb46872d1665e3a097e, type: 2} _startPopulation: 5 _startFood: 50 _startWood: 0 diff --git a/Assets/Design/Levels/Level5.asset b/Assets/Design/Levels/Level5.asset index 0794c35..bd97463 100644 --- a/Assets/Design/Levels/Level5.asset +++ b/Assets/Design/Levels/Level5.asset @@ -194,7 +194,7 @@ MonoBehaviour: _renderLayer: Default _position: {x: 0, y: 0} _scale: {x: 1, y: 1} - _waveConfig: {fileID: 0} + _waveConfig: {fileID: 11400000, guid: 4c72177270b51eb46872d1665e3a097e, type: 2} _startPopulation: 5 _startFood: 50 _startWood: 0 diff --git a/Assets/Design/Levels/Level6.asset b/Assets/Design/Levels/Level6.asset index 4ba96c0..278d86a 100644 --- a/Assets/Design/Levels/Level6.asset +++ b/Assets/Design/Levels/Level6.asset @@ -206,7 +206,7 @@ MonoBehaviour: _renderLayer: Default _position: {x: 0, y: 0} _scale: {x: 1, y: 1} - _waveConfig: {fileID: 0} + _waveConfig: {fileID: 11400000, guid: 4c72177270b51eb46872d1665e3a097e, type: 2} _startPopulation: 5 _startFood: 50 _startWood: 0 diff --git a/Assets/Prefabs/UI/WorldMap/Btn_Level.prefab b/Assets/Prefabs/UI/WorldMap/Btn_Level.prefab index ae08edd..413bb8e 100644 --- a/Assets/Prefabs/UI/WorldMap/Btn_Level.prefab +++ b/Assets/Prefabs/UI/WorldMap/Btn_Level.prefab @@ -247,7 +247,7 @@ MonoBehaviour: m_SelectOnRight: {fileID: 0} m_Transition: 1 m_Colors: - m_NormalColor: {r: 1, g: 1, b: 1, a: 1} + m_NormalColor: {r: 0.8396226, g: 0.8396226, b: 0.8396226, a: 1} m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} m_PressedColor: {r: 0.6132076, g: 0.6132076, b: 0.6132076, a: 1} m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} diff --git a/Assets/Prefabs/UI/WorldMap/WorldMapCanvas.prefab b/Assets/Prefabs/UI/WorldMap/WorldMapCanvas.prefab index 2ccd1e6..757c6e3 100644 --- a/Assets/Prefabs/UI/WorldMap/WorldMapCanvas.prefab +++ b/Assets/Prefabs/UI/WorldMap/WorldMapCanvas.prefab @@ -1,5 +1,81 @@ %YAML 1.1 %TAG !u! tag:unity3d.com,2011: +--- !u!1 &1473428787 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1473428788} + - component: {fileID: 1473428790} + - component: {fileID: 1473428789} + m_Layer: 5 + m_Name: background + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1473428788 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1473428787} + 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: 1388419617042242050} + m_RootOrder: 0 + 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: 0, y: 0} + m_SizeDelta: {x: 1920, y: 1080} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!222 &1473428790 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1473428787} + m_CullTransparentMesh: 1 +--- !u!114 &1473428789 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1473428787} + 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: 0.740566, g: 1, b: 0.95764345, 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: 94c1e489ce789c4409775082a60a76c6, 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!1 &1388419616670829467 GameObject: m_ObjectHideFlags: 0 @@ -18,7 +94,7 @@ GameObject: m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 - m_IsActive: 1 + m_IsActive: 0 --- !u!224 &1388419616670829464 RectTransform: m_ObjectHideFlags: 0 @@ -28,16 +104,16 @@ RectTransform: m_GameObject: {fileID: 1388419616670829467} m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 0.8343763, y: 0.8343763, z: 0.8343763} + m_LocalScale: {x: 0.16324572, y: 0.16324572, z: 0.16324572} m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 1388419617214705178} m_RootOrder: 11 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: 846.13, y: 573.41} - m_SizeDelta: {x: 227.75, y: 187.408} + m_AnchorMin: {x: 1, y: 1} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: -64, y: -58} + m_SizeDelta: {x: 512, y: 512} m_Pivot: {x: 0.5, y: 0.5} --- !u!222 &1388419616670829471 CanvasRenderer: @@ -148,16 +224,16 @@ RectTransform: m_GameObject: {fileID: 1388419616788066155} m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 0.81355935, y: 0.81355935, z: 0.81355935} + m_LocalScale: {x: 0.8135594, y: 0.8135594, z: 0.8135594} m_ConstrainProportionsScale: 0 m_Children: [] - m_Father: {fileID: 1388419617042242050} + m_Father: {fileID: 7318915945480603808} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 0} m_AnchorMax: {x: 1, y: 1} - m_AnchoredPosition: {x: 0.32531738, y: -0.00036621094} - m_SizeDelta: {x: 440.39978, y: 305.7627} + m_AnchoredPosition: {x: -57.674683, y: -99.00037} + m_SizeDelta: {x: 2260.4, y: 1285.7627} m_Pivot: {x: 0.5, y: 0.5} --- !u!222 &1388419616788066158 CanvasRenderer: @@ -228,8 +304,8 @@ RectTransform: m_LocalScale: {x: 0, y: 0, z: 0} m_ConstrainProportionsScale: 0 m_Children: - - {fileID: 1388419616788066152} - - {fileID: 1388419617214705178} + - {fileID: 1473428788} + - {fileID: 6045558796034018510} m_Father: {fileID: 0} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} @@ -322,7 +398,7 @@ RectTransform: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1388419617214705253} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + 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 @@ -339,14 +415,111 @@ RectTransform: - {fileID: 652135140497265160} - {fileID: 652135141588773322} - {fileID: 1388419616670829464} - m_Father: {fileID: 1388419617042242050} + m_Father: {fileID: 7318915945480603808} m_RootOrder: 1 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 0} m_AnchorMax: {x: 1, y: 1} - m_AnchoredPosition: {x: 0, y: 0} - m_SizeDelta: {x: 0, y: 0} + m_AnchoredPosition: {x: -58, y: -99} + m_SizeDelta: {x: 1820, y: 980} m_Pivot: {x: 0.5, y: 0.5} +--- !u!1 &6646286295886637728 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 6045558796034018510} + m_Layer: 5 + m_Name: IslandRoot + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &6045558796034018510 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6646286295886637728} + 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: 7318915945480603808} + m_Father: {fileID: 1388419617042242050} + 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: 0, y: 0} + m_SizeDelta: {x: 100, y: 100} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!1 &7562342414061786083 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 7318915945480603808} + - component: {fileID: 360981297534925855} + m_Layer: 5 + m_Name: anim + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &7318915945480603808 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7562342414061786083} + 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: 1388419616788066152} + - {fileID: 1388419617214705178} + m_Father: {fileID: 6045558796034018510} + m_RootOrder: 0 + 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: 0, y: 0} + m_SizeDelta: {x: 100, y: 100} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!95 &360981297534925855 +Animator: + serializedVersion: 5 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7562342414061786083} + m_Enabled: 1 + m_Avatar: {fileID: 0} + m_Controller: {fileID: 9100000, guid: c66556f1f1203974b8418e3db529fa58, type: 2} + m_CullingMode: 0 + m_UpdateMode: 0 + m_ApplyRootMotion: 0 + m_LinearVelocityBlending: 0 + m_StabilizeFeet: 0 + m_WarningMessage: + m_HasTransformHierarchy: 1 + m_AllowConstantClipSamplingOptimization: 1 + m_KeepAnimatorStateOnDisable: 0 + m_WriteDefaultValuesOnDisable: 0 --- !u!1001 &652135141416114485 PrefabInstance: m_ObjectHideFlags: 0 From e8d89dbd038b9d92c832c5a33908dd31589e1ffe Mon Sep 17 00:00:00 2001 From: craftwill Date: Mon, 13 Nov 2023 18:57:58 -0500 Subject: [PATCH 10/13] Balanced level configs --- Assets/Design/Levels/Level1.asset | 4 +- Assets/Design/Levels/Level2.asset | 4 +- Assets/Design/Levels/Level3.asset | 4 +- Assets/Design/Levels/Level4.asset | 4 +- Assets/Design/Levels/Level5.asset | 4 +- Assets/Design/Levels/Level6.asset | 4 +- Assets/Design/Levels/TestDrag&Drop.asset | 353 ------------------ Assets/Design/Levels/TestGame.asset | 191 ---------- Assets/Design/Levels/WaveConfig01.asset | 31 -- Assets/Design/Levels/WaveConfig_1_1.asset | 25 ++ ...1.asset.meta => WaveConfig_1_1.asset.meta} | 0 Assets/Design/Levels/WaveConfig_1_2.asset | 33 ++ ...1.asset.meta => WaveConfig_1_2.asset.meta} | 2 +- Assets/Design/Levels/WaveConfig_1_3.asset | 33 ++ ...p.asset.meta => WaveConfig_1_3.asset.meta} | 2 +- Assets/Design/Levels/WaveConfig_1_4.asset | 33 ++ ...e.asset.meta => WaveConfig_1_4.asset.meta} | 2 +- Assets/Design/Levels/WaveConfig_1_5.asset | 33 ++ .../Design/Levels/WaveConfig_1_5.asset.meta | 8 + Assets/Design/Levels/WaveConfig_1_6.asset | 33 ++ .../Design/Levels/WaveConfig_1_6.asset.meta | 8 + ...onfig_DefaultWorld1_NormalDifficulty.asset | 20 +- .../Levels/WaveConfig_World1_Level1.asset | 31 -- .../Scripts/Events/LastWaveCompletedEvent.cs | 3 + .../Events/LastWaveCompletedEvent.cs.meta | 11 + Assets/Scripts/Opponent/EnemyType.cs | 13 +- Assets/Scripts/VictoryDefeat.cs | 32 +- 27 files changed, 272 insertions(+), 649 deletions(-) delete mode 100644 Assets/Design/Levels/TestDrag&Drop.asset delete mode 100644 Assets/Design/Levels/TestGame.asset delete mode 100644 Assets/Design/Levels/WaveConfig01.asset create mode 100644 Assets/Design/Levels/WaveConfig_1_1.asset rename Assets/Design/Levels/{WaveConfig_World1_Level1.asset.meta => WaveConfig_1_1.asset.meta} (100%) create mode 100644 Assets/Design/Levels/WaveConfig_1_2.asset rename Assets/Design/Levels/{WaveConfig01.asset.meta => WaveConfig_1_2.asset.meta} (79%) create mode 100644 Assets/Design/Levels/WaveConfig_1_3.asset rename Assets/Design/Levels/{TestDrag&Drop.asset.meta => WaveConfig_1_3.asset.meta} (79%) create mode 100644 Assets/Design/Levels/WaveConfig_1_4.asset rename Assets/Design/Levels/{TestGame.asset.meta => WaveConfig_1_4.asset.meta} (79%) create mode 100644 Assets/Design/Levels/WaveConfig_1_5.asset create mode 100644 Assets/Design/Levels/WaveConfig_1_5.asset.meta create mode 100644 Assets/Design/Levels/WaveConfig_1_6.asset create mode 100644 Assets/Design/Levels/WaveConfig_1_6.asset.meta delete mode 100644 Assets/Design/Levels/WaveConfig_World1_Level1.asset create mode 100644 Assets/Scripts/Events/LastWaveCompletedEvent.cs create mode 100644 Assets/Scripts/Events/LastWaveCompletedEvent.cs.meta diff --git a/Assets/Design/Levels/Level1.asset b/Assets/Design/Levels/Level1.asset index 2622186..6705b55 100644 --- a/Assets/Design/Levels/Level1.asset +++ b/Assets/Design/Levels/Level1.asset @@ -248,8 +248,8 @@ MonoBehaviour: _renderLayer: Default _position: {x: 0, y: 0} _scale: {x: 1, y: 1} - _waveConfig: {fileID: 11400000, guid: 4c72177270b51eb46872d1665e3a097e, type: 2} + _waveConfig: {fileID: 11400000, guid: d8140ae36f1b7fd4fb1a57ab3dc69de4, type: 2} _startPopulation: 5 - _startFood: 50 + _startFood: 30 _startWood: 0 _startRock: 0 diff --git a/Assets/Design/Levels/Level2.asset b/Assets/Design/Levels/Level2.asset index fa30ea8..9f4a4ba 100644 --- a/Assets/Design/Levels/Level2.asset +++ b/Assets/Design/Levels/Level2.asset @@ -192,8 +192,8 @@ MonoBehaviour: _renderLayer: Default _position: {x: 0, y: 0} _scale: {x: 1, y: 1} - _waveConfig: {fileID: 11400000, guid: 4c72177270b51eb46872d1665e3a097e, type: 2} + _waveConfig: {fileID: 11400000, guid: e9e134bb6a24e4647a27955d3d276bd2, type: 2} _startPopulation: 5 - _startFood: 50 + _startFood: 30 _startWood: 0 _startRock: 0 diff --git a/Assets/Design/Levels/Level3.asset b/Assets/Design/Levels/Level3.asset index 03d7452..13c89a7 100644 --- a/Assets/Design/Levels/Level3.asset +++ b/Assets/Design/Levels/Level3.asset @@ -194,8 +194,8 @@ MonoBehaviour: _renderLayer: Default _position: {x: 0, y: 0} _scale: {x: 1, y: 1} - _waveConfig: {fileID: 11400000, guid: 4c72177270b51eb46872d1665e3a097e, type: 2} + _waveConfig: {fileID: 11400000, guid: c22ff5f49b21f9844a4d9693dc06777c, type: 2} _startPopulation: 5 - _startFood: 50 + _startFood: 30 _startWood: 0 _startRock: 0 diff --git a/Assets/Design/Levels/Level4.asset b/Assets/Design/Levels/Level4.asset index c67d17f..3033302 100644 --- a/Assets/Design/Levels/Level4.asset +++ b/Assets/Design/Levels/Level4.asset @@ -224,8 +224,8 @@ MonoBehaviour: _renderLayer: Default _position: {x: 0, y: 0} _scale: {x: 1, y: 1} - _waveConfig: {fileID: 11400000, guid: 4c72177270b51eb46872d1665e3a097e, type: 2} + _waveConfig: {fileID: 11400000, guid: 5ccff833a19a71f4499a3b3d786f4d11, type: 2} _startPopulation: 5 - _startFood: 50 + _startFood: 30 _startWood: 0 _startRock: 0 diff --git a/Assets/Design/Levels/Level5.asset b/Assets/Design/Levels/Level5.asset index bd97463..70cb095 100644 --- a/Assets/Design/Levels/Level5.asset +++ b/Assets/Design/Levels/Level5.asset @@ -194,8 +194,8 @@ MonoBehaviour: _renderLayer: Default _position: {x: 0, y: 0} _scale: {x: 1, y: 1} - _waveConfig: {fileID: 11400000, guid: 4c72177270b51eb46872d1665e3a097e, type: 2} + _waveConfig: {fileID: 11400000, guid: 2462ecbf554cf1d4883dea95b2504a9f, type: 2} _startPopulation: 5 - _startFood: 50 + _startFood: 30 _startWood: 0 _startRock: 0 diff --git a/Assets/Design/Levels/Level6.asset b/Assets/Design/Levels/Level6.asset index 278d86a..1e61549 100644 --- a/Assets/Design/Levels/Level6.asset +++ b/Assets/Design/Levels/Level6.asset @@ -206,8 +206,8 @@ MonoBehaviour: _renderLayer: Default _position: {x: 0, y: 0} _scale: {x: 1, y: 1} - _waveConfig: {fileID: 11400000, guid: 4c72177270b51eb46872d1665e3a097e, type: 2} + _waveConfig: {fileID: 11400000, guid: eee8fc46b43d8144ca603169dc9f26d6, type: 2} _startPopulation: 5 - _startFood: 50 + _startFood: 30 _startWood: 0 _startRock: 0 diff --git a/Assets/Design/Levels/TestDrag&Drop.asset b/Assets/Design/Levels/TestDrag&Drop.asset deleted file mode 100644 index f6c395b..0000000 --- a/Assets/Design/Levels/TestDrag&Drop.asset +++ /dev/null @@ -1,353 +0,0 @@ -%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: 2b25d284985e65e48b50826c522a5ec3, type: 3} - m_Name: TestDrag&Drop - m_EditorClassIdentifier: - _data: - - _key: Background - _tiles: - - _tile: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2} - _position: {x: -10, y: -4, z: 0} - - _tile: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2} - _position: {x: -10, y: -3, z: 0} - - _tile: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2} - _position: {x: -10, y: -2, z: 0} - - _tile: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2} - _position: {x: -10, y: -1, z: 0} - - _tile: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2} - _position: {x: -10, y: 0, z: 0} - - _tile: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2} - _position: {x: -10, y: 1, z: 0} - - _tile: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2} - _position: {x: -10, y: 2, z: 0} - - _tile: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2} - _position: {x: -9, y: -4, z: 0} - - _tile: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2} - _position: {x: -9, y: -3, z: 0} - - _tile: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2} - _position: {x: -9, y: -2, z: 0} - - _tile: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2} - _position: {x: -9, y: -1, z: 0} - - _tile: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2} - _position: {x: -9, y: 0, z: 0} - - _tile: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2} - _position: {x: -9, y: 1, z: 0} - - _tile: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2} - _position: {x: -9, y: 2, z: 0} - - _tile: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2} - _position: {x: -8, y: -4, z: 0} - - _tile: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2} - _position: {x: -8, y: -3, z: 0} - - _tile: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2} - _position: {x: -8, y: -2, z: 0} - - _tile: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2} - _position: {x: -8, y: -1, z: 0} - - _tile: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2} - _position: {x: -8, y: 0, z: 0} - - _tile: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2} - _position: {x: -8, y: 1, z: 0} - - _tile: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2} - _position: {x: -8, y: 2, z: 0} - - _tile: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2} - _position: {x: -7, y: -4, z: 0} - - _tile: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2} - _position: {x: -7, y: -3, z: 0} - - _tile: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2} - _position: {x: -7, y: -2, z: 0} - - _tile: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2} - _position: {x: -7, y: -1, z: 0} - - _tile: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2} - _position: {x: -7, y: 0, z: 0} - - _tile: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2} - _position: {x: -7, y: 1, z: 0} - - _tile: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2} - _position: {x: -7, y: 2, z: 0} - - _tile: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2} - _position: {x: -6, y: -4, z: 0} - - _tile: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2} - _position: {x: -6, y: -3, z: 0} - - _tile: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2} - _position: {x: -6, y: -2, z: 0} - - _tile: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2} - _position: {x: -6, y: -1, z: 0} - - _tile: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2} - _position: {x: -6, y: 0, z: 0} - - _tile: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2} - _position: {x: -6, y: 1, z: 0} - - _tile: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2} - _position: {x: -6, y: 2, z: 0} - - _tile: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2} - _position: {x: -5, y: -4, z: 0} - - _tile: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2} - _position: {x: -5, y: -3, z: 0} - - _tile: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2} - _position: {x: -5, y: -2, z: 0} - - _tile: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2} - _position: {x: -5, y: -1, z: 0} - - _tile: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2} - _position: {x: -5, y: 0, z: 0} - - _tile: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2} - _position: {x: -5, y: 1, z: 0} - - _tile: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2} - _position: {x: -5, y: 2, z: 0} - - _tile: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2} - _position: {x: -4, y: -4, z: 0} - - _tile: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2} - _position: {x: -4, y: -3, z: 0} - - _tile: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2} - _position: {x: -4, y: -2, z: 0} - - _tile: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2} - _position: {x: -4, y: -1, z: 0} - - _tile: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2} - _position: {x: -4, y: 0, z: 0} - - _tile: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2} - _position: {x: -4, y: 1, z: 0} - - _tile: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2} - _position: {x: -4, y: 2, z: 0} - - _tile: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2} - _position: {x: -3, y: -4, z: 0} - - _tile: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2} - _position: {x: -3, y: -3, z: 0} - - _tile: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2} - _position: {x: -3, y: -2, z: 0} - - _tile: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2} - _position: {x: -3, y: -1, z: 0} - - _tile: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2} - _position: {x: -3, y: 0, z: 0} - - _tile: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2} - _position: {x: -3, y: 1, z: 0} - - _tile: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2} - _position: {x: -3, y: 2, z: 0} - - _tile: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2} - _position: {x: -2, y: -4, z: 0} - - _tile: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2} - _position: {x: -2, y: -3, z: 0} - - _tile: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2} - _position: {x: -2, y: -2, z: 0} - - _tile: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2} - _position: {x: -2, y: -1, z: 0} - - _tile: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2} - _position: {x: -2, y: 0, z: 0} - - _tile: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2} - _position: {x: -2, y: 1, z: 0} - - _tile: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2} - _position: {x: -2, y: 2, z: 0} - - _tile: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2} - _position: {x: -1, y: -4, z: 0} - - _tile: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2} - _position: {x: -1, y: -3, z: 0} - - _tile: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2} - _position: {x: -1, y: -2, z: 0} - - _tile: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2} - _position: {x: -1, y: -1, z: 0} - - _tile: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2} - _position: {x: -1, y: 0, z: 0} - - _tile: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2} - _position: {x: -1, y: 1, z: 0} - - _tile: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2} - _position: {x: -1, y: 2, z: 0} - - _tile: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2} - _position: {x: 0, y: -4, z: 0} - - _tile: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2} - _position: {x: 0, y: -3, z: 0} - - _tile: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2} - _position: {x: 0, y: -2, z: 0} - - _tile: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2} - _position: {x: 0, y: -1, z: 0} - - _tile: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2} - _position: {x: 0, y: 0, z: 0} - - _tile: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2} - _position: {x: 0, y: 1, z: 0} - - _tile: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2} - _position: {x: 0, y: 2, z: 0} - - _tile: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2} - _position: {x: 1, y: -4, z: 0} - - _tile: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2} - _position: {x: 1, y: -3, z: 0} - - _tile: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2} - _position: {x: 1, y: -2, z: 0} - - _tile: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2} - _position: {x: 1, y: -1, z: 0} - - _tile: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2} - _position: {x: 1, y: 0, z: 0} - - _tile: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2} - _position: {x: 1, y: 1, z: 0} - - _tile: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2} - _position: {x: 1, y: 2, z: 0} - - _tile: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2} - _position: {x: 2, y: -4, z: 0} - - _tile: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2} - _position: {x: 2, y: -3, z: 0} - - _tile: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2} - _position: {x: 2, y: -2, z: 0} - - _tile: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2} - _position: {x: 2, y: -1, z: 0} - - _tile: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2} - _position: {x: 2, y: 0, z: 0} - - _tile: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2} - _position: {x: 2, y: 1, z: 0} - - _tile: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2} - _position: {x: 2, y: 2, z: 0} - - _tile: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2} - _position: {x: 3, y: -4, z: 0} - - _tile: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2} - _position: {x: 3, y: -3, z: 0} - - _tile: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2} - _position: {x: 3, y: -2, z: 0} - - _tile: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2} - _position: {x: 3, y: -1, z: 0} - - _tile: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2} - _position: {x: 3, y: 0, z: 0} - - _tile: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2} - _position: {x: 3, y: 1, z: 0} - - _tile: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2} - _position: {x: 3, y: 2, z: 0} - - _tile: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2} - _position: {x: 4, y: -4, z: 0} - - _tile: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2} - _position: {x: 4, y: -3, z: 0} - - _tile: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2} - _position: {x: 4, y: -2, z: 0} - - _tile: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2} - _position: {x: 4, y: -1, z: 0} - - _tile: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2} - _position: {x: 4, y: 0, z: 0} - - _tile: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2} - _position: {x: 4, y: 1, z: 0} - - _tile: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2} - _position: {x: 4, y: 2, z: 0} - - _tile: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2} - _position: {x: 5, y: -4, z: 0} - - _tile: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2} - _position: {x: 5, y: -3, z: 0} - - _tile: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2} - _position: {x: 5, y: -2, z: 0} - - _tile: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2} - _position: {x: 5, y: -1, z: 0} - - _tile: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2} - _position: {x: 5, y: 0, z: 0} - - _tile: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2} - _position: {x: 5, y: 1, z: 0} - - _tile: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2} - _position: {x: 5, y: 2, z: 0} - - _tile: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2} - _position: {x: 6, y: -4, z: 0} - - _tile: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2} - _position: {x: 6, y: -3, z: 0} - - _tile: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2} - _position: {x: 6, y: -2, z: 0} - - _tile: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2} - _position: {x: 6, y: -1, z: 0} - - _tile: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2} - _position: {x: 6, y: 0, z: 0} - - _tile: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2} - _position: {x: 6, y: 1, z: 0} - - _tile: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2} - _position: {x: 6, y: 2, z: 0} - - _tile: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2} - _position: {x: 7, y: -4, z: 0} - - _tile: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2} - _position: {x: 7, y: -3, z: 0} - - _tile: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2} - _position: {x: 7, y: -2, z: 0} - - _tile: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2} - _position: {x: 7, y: -1, z: 0} - - _tile: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2} - _position: {x: 7, y: 0, z: 0} - - _tile: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2} - _position: {x: 7, y: 1, z: 0} - - _tile: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2} - _position: {x: 7, y: 2, z: 0} - - _tile: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2} - _position: {x: 8, y: -4, z: 0} - - _tile: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2} - _position: {x: 8, y: -3, z: 0} - - _tile: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2} - _position: {x: 8, y: -2, z: 0} - - _tile: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2} - _position: {x: 8, y: -1, z: 0} - - _tile: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2} - _position: {x: 8, y: 0, z: 0} - - _tile: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2} - _position: {x: 8, y: 1, z: 0} - - _tile: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2} - _position: {x: 8, y: 2, z: 0} - - _tile: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2} - _position: {x: 9, y: -4, z: 0} - - _tile: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2} - _position: {x: 9, y: -3, z: 0} - - _tile: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2} - _position: {x: 9, y: -2, z: 0} - - _tile: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2} - _position: {x: 9, y: -1, z: 0} - - _tile: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2} - _position: {x: 9, y: 0, z: 0} - - _tile: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2} - _position: {x: 9, y: 1, z: 0} - - _tile: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2} - _position: {x: 9, y: 2, z: 0} - - _tile: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2} - _position: {x: 10, y: -4, z: 0} - - _tile: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2} - _position: {x: 10, y: -3, z: 0} - - _tile: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2} - _position: {x: 10, y: -2, z: 0} - - _tile: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2} - _position: {x: 10, y: -1, z: 0} - - _tile: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2} - _position: {x: 10, y: 0, z: 0} - - _tile: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2} - _position: {x: 10, y: 1, z: 0} - - _tile: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2} - _position: {x: 10, y: 2, z: 0} - _isInvisible: 0 - _isCollidable: 0 - _isTrigger: 0 - _renderOrder: 0 - _renderLayer: Default - _position: {x: 0, y: 0} - _scale: {x: 1, y: 1} - - _key: Entities - _tiles: [] - _isInvisible: 0 - _isCollidable: 0 - _isTrigger: 0 - _renderOrder: 1 - _renderLayer: Default - _position: {x: 0, y: 0} - _scale: {x: 1, y: 1} - - _key: Spawners - _tiles: - - _tile: {fileID: 11400000, guid: 4aaf448680c7f8a438a9a5861c622a55, type: 2} - _position: {x: -10, y: -4, z: 0} - - _tile: {fileID: 11400000, guid: 4aaf448680c7f8a438a9a5861c622a55, type: 2} - _position: {x: -10, y: -2, z: 0} - - _tile: {fileID: 11400000, guid: 4aaf448680c7f8a438a9a5861c622a55, type: 2} - _position: {x: -10, y: 0, z: 0} - - _tile: {fileID: 11400000, guid: 4aaf448680c7f8a438a9a5861c622a55, type: 2} - _position: {x: -10, y: 2, z: 0} - - _tile: {fileID: 11400000, guid: 4002377ed7e87b34699f126f2b10c703, type: 2} - _position: {x: 10, y: -4, z: 0} - - _tile: {fileID: 11400000, guid: 4002377ed7e87b34699f126f2b10c703, type: 2} - _position: {x: 10, y: -2, z: 0} - - _tile: {fileID: 11400000, guid: 4002377ed7e87b34699f126f2b10c703, type: 2} - _position: {x: 10, y: 0, z: 0} - - _tile: {fileID: 11400000, guid: 4002377ed7e87b34699f126f2b10c703, type: 2} - _position: {x: 10, y: 2, z: 0} - _isInvisible: 0 - _isCollidable: 0 - _isTrigger: 0 - _renderOrder: 2 - _renderLayer: Default - _position: {x: 0, y: 0} - _scale: {x: 1, y: 1} - _waveConfig: {fileID: 11400000, guid: 4c72177270b51eb46872d1665e3a097e, type: 2} diff --git a/Assets/Design/Levels/TestGame.asset b/Assets/Design/Levels/TestGame.asset deleted file mode 100644 index 7faa9f9..0000000 --- a/Assets/Design/Levels/TestGame.asset +++ /dev/null @@ -1,191 +0,0 @@ -%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: 2b25d284985e65e48b50826c522a5ec3, type: 3} - m_Name: TestGame - m_EditorClassIdentifier: - _data: - - _key: Background - _tiles: - - _tile: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2} - _position: {x: -10, y: -3, z: 0} - - _tile: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2} - _position: {x: -10, y: -2, z: 0} - - _tile: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2} - _position: {x: -10, y: -1, z: 0} - - _tile: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2} - _position: {x: -10, y: 0, z: 0} - - _tile: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2} - _position: {x: -10, y: 1, z: 0} - - _tile: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2} - _position: {x: -10, y: 2, z: 0} - - _tile: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2} - _position: {x: -9, y: -3, z: 0} - - _tile: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2} - _position: {x: -9, y: -2, z: 0} - - _tile: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2} - _position: {x: -9, y: -1, z: 0} - - _tile: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2} - _position: {x: -9, y: 0, z: 0} - - _tile: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2} - _position: {x: -9, y: 1, z: 0} - - _tile: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2} - _position: {x: -9, y: 2, z: 0} - - _tile: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2} - _position: {x: -8, y: -3, z: 0} - - _tile: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2} - _position: {x: -8, y: -2, z: 0} - - _tile: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2} - _position: {x: -8, y: -1, z: 0} - - _tile: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2} - _position: {x: -8, y: 0, z: 0} - - _tile: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2} - _position: {x: -8, y: 1, z: 0} - - _tile: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2} - _position: {x: -8, y: 2, z: 0} - - _tile: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2} - _position: {x: -7, y: -3, z: 0} - - _tile: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2} - _position: {x: -7, y: -2, z: 0} - - _tile: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2} - _position: {x: -7, y: -1, z: 0} - - _tile: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2} - _position: {x: -7, y: 0, z: 0} - - _tile: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2} - _position: {x: -7, y: 1, z: 0} - - _tile: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2} - _position: {x: -7, y: 2, z: 0} - - _tile: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2} - _position: {x: -6, y: -3, z: 0} - - _tile: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2} - _position: {x: -6, y: -2, z: 0} - - _tile: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2} - _position: {x: -6, y: -1, z: 0} - - _tile: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2} - _position: {x: -6, y: 0, z: 0} - - _tile: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2} - _position: {x: -6, y: 1, z: 0} - - _tile: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2} - _position: {x: -6, y: 2, z: 0} - - _tile: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2} - _position: {x: -5, y: -3, z: 0} - - _tile: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2} - _position: {x: -5, y: -2, z: 0} - - _tile: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2} - _position: {x: -5, y: -1, z: 0} - - _tile: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2} - _position: {x: -5, y: 0, z: 0} - - _tile: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2} - _position: {x: -5, y: 1, z: 0} - - _tile: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2} - _position: {x: -5, y: 2, z: 0} - - _tile: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2} - _position: {x: -4, y: -3, z: 0} - - _tile: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2} - _position: {x: -4, y: -2, z: 0} - - _tile: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2} - _position: {x: -4, y: -1, z: 0} - - _tile: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2} - _position: {x: -4, y: 0, z: 0} - - _tile: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2} - _position: {x: -4, y: 1, z: 0} - - _tile: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2} - _position: {x: -4, y: 2, z: 0} - - _tile: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2} - _position: {x: -3, y: -3, z: 0} - - _tile: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2} - _position: {x: -3, y: -2, z: 0} - - _tile: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2} - _position: {x: -3, y: -1, z: 0} - - _tile: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2} - _position: {x: -3, y: 0, z: 0} - - _tile: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2} - _position: {x: -3, y: 1, z: 0} - - _tile: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2} - _position: {x: -3, y: 2, z: 0} - - _tile: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2} - _position: {x: -2, y: -3, z: 0} - - _tile: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2} - _position: {x: -2, y: -2, z: 0} - - _tile: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2} - _position: {x: -2, y: -1, z: 0} - - _tile: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2} - _position: {x: -2, y: 0, z: 0} - - _tile: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2} - _position: {x: -2, y: 1, z: 0} - - _tile: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2} - _position: {x: -2, y: 2, z: 0} - - _tile: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2} - _position: {x: -1, y: -3, z: 0} - - _tile: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2} - _position: {x: -1, y: -2, z: 0} - - _tile: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2} - _position: {x: -1, y: -1, z: 0} - - _tile: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2} - _position: {x: -1, y: 0, z: 0} - - _tile: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2} - _position: {x: -1, y: 1, z: 0} - - _tile: {fileID: 11400000, guid: ef5a154519b23a34aaded32e86bf7f2f, type: 2} - _position: {x: -1, y: 2, z: 0} - _isInvisible: 0 - _isCollidable: 0 - _isTrigger: 0 - _renderOrder: 0 - _renderLayer: Default - _position: {x: 0, y: 0} - _scale: {x: 1, y: 1} - - _key: Entities - _tiles: - - _tile: {fileID: 11400000, guid: e0b1d2d816ae5624c99b09a2bebb2a39, type: 2} - _position: {x: -10, y: -3, z: 0} - - _tile: {fileID: 11400000, guid: e0b1d2d816ae5624c99b09a2bebb2a39, type: 2} - _position: {x: -10, y: -2, z: 0} - - _tile: {fileID: 11400000, guid: e0b1d2d816ae5624c99b09a2bebb2a39, type: 2} - _position: {x: -10, y: -1, z: 0} - - _tile: {fileID: 11400000, guid: e0b1d2d816ae5624c99b09a2bebb2a39, type: 2} - _position: {x: -9, y: -3, z: 0} - - _tile: {fileID: 11400000, guid: e0b1d2d816ae5624c99b09a2bebb2a39, type: 2} - _position: {x: -9, y: -2, z: 0} - - _tile: {fileID: 11400000, guid: e0b1d2d816ae5624c99b09a2bebb2a39, type: 2} - _position: {x: -9, y: -1, z: 0} - - _tile: {fileID: 11400000, guid: e0d57b3c128ba1447920637cdb289530, type: 2} - _position: {x: -6, y: 2, z: 0} - - _tile: {fileID: 11400000, guid: e0d57b3c128ba1447920637cdb289530, type: 2} - _position: {x: -5, y: 2, z: 0} - _isInvisible: 0 - _isCollidable: 0 - _isTrigger: 0 - _renderOrder: 1 - _renderLayer: Default - _position: {x: 0, y: 0} - _scale: {x: 1, y: 1} - - _key: Spawners - _tiles: - - _tile: {fileID: 11400000, guid: 4002377ed7e87b34699f126f2b10c703, type: 2} - _position: {x: -1, y: -3, z: 0} - - _tile: {fileID: 11400000, guid: 4002377ed7e87b34699f126f2b10c703, type: 2} - _position: {x: -1, y: -2, z: 0} - - _tile: {fileID: 11400000, guid: 4002377ed7e87b34699f126f2b10c703, type: 2} - _position: {x: -1, y: -1, z: 0} - - _tile: {fileID: 11400000, guid: 4002377ed7e87b34699f126f2b10c703, type: 2} - _position: {x: -1, y: 0, z: 0} - - _tile: {fileID: 11400000, guid: 4002377ed7e87b34699f126f2b10c703, type: 2} - _position: {x: -1, y: 1, z: 0} - - _tile: {fileID: 11400000, guid: 4002377ed7e87b34699f126f2b10c703, type: 2} - _position: {x: -1, y: 2, z: 0} - _isInvisible: 1 - _isCollidable: 0 - _isTrigger: 0 - _renderOrder: 2 - _renderLayer: Default - _position: {x: 0, y: 0} - _scale: {x: 1, y: 1} - _waveConfig: {fileID: 11400000, guid: 4c72177270b51eb46872d1665e3a097e, type: 2} diff --git a/Assets/Design/Levels/WaveConfig01.asset b/Assets/Design/Levels/WaveConfig01.asset deleted file mode 100644 index db67372..0000000 --- a/Assets/Design/Levels/WaveConfig01.asset +++ /dev/null @@ -1,31 +0,0 @@ -%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: eb0795e326609f0499365f5b65c2b5cd, type: 3} - m_Name: WaveConfig01 - m_EditorClassIdentifier: - _constantSpawn: - - _enemy: {fileID: 313037212318601125, guid: 1be769d6ef642314b8846bed35e7297c, type: 3} - _count: 5 - _nestedGroupSpawn: - - groupSpawn: - - _enemy: {fileID: 313037212318601125, guid: 5bbf0d85fa5bb3f4599da79f0a84e3a9, type: 3} - _count: 0 - - _enemy: {fileID: 313037212318601125, guid: 5bbf0d85fa5bb3f4599da79f0a84e3a9, type: 3} - _count: 2 - triggerTime: 0.1 - - groupSpawn: - - _enemy: {fileID: 313037212318601125, guid: 5bbf0d85fa5bb3f4599da79f0a84e3a9, type: 3} - _count: 1 - - _enemy: {fileID: 313037212318601125, guid: 5bbf0d85fa5bb3f4599da79f0a84e3a9, type: 3} - _count: 2 - triggerTime: 1 - _gameDuration: 3 diff --git a/Assets/Design/Levels/WaveConfig_1_1.asset b/Assets/Design/Levels/WaveConfig_1_1.asset new file mode 100644 index 0000000..ef59db7 --- /dev/null +++ b/Assets/Design/Levels/WaveConfig_1_1.asset @@ -0,0 +1,25 @@ +%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: eb0795e326609f0499365f5b65c2b5cd, type: 3} + m_Name: WaveConfig_1_1 + m_EditorClassIdentifier: + _constantSpawn: + - _enemy: {fileID: 80204295746100150, guid: 1be769d6ef642314b8846bed35e7297c, type: 3} + _count: 10 + - _enemy: {fileID: 80204295746100150, guid: 2419a879bd4e47d4fa8b30de0fcdde42, type: 3} + _count: 20 + _nestedGroupSpawn: + - groupSpawn: + - _enemy: {fileID: 80204295746100150, guid: 5bbf0d85fa5bb3f4599da79f0a84e3a9, type: 3} + _count: 2 + triggerTime: 2 + _gameDuration: 3 diff --git a/Assets/Design/Levels/WaveConfig_World1_Level1.asset.meta b/Assets/Design/Levels/WaveConfig_1_1.asset.meta similarity index 100% rename from Assets/Design/Levels/WaveConfig_World1_Level1.asset.meta rename to Assets/Design/Levels/WaveConfig_1_1.asset.meta diff --git a/Assets/Design/Levels/WaveConfig_1_2.asset b/Assets/Design/Levels/WaveConfig_1_2.asset new file mode 100644 index 0000000..fde9534 --- /dev/null +++ b/Assets/Design/Levels/WaveConfig_1_2.asset @@ -0,0 +1,33 @@ +%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: eb0795e326609f0499365f5b65c2b5cd, type: 3} + m_Name: WaveConfig_1_2 + m_EditorClassIdentifier: + _constantSpawn: + - _enemy: {fileID: 80204295746100150, guid: 1be769d6ef642314b8846bed35e7297c, type: 3} + _count: 10 + - _enemy: {fileID: 80204295746100150, guid: 2419a879bd4e47d4fa8b30de0fcdde42, type: 3} + _count: 20 + _nestedGroupSpawn: + - groupSpawn: + - _enemy: {fileID: 80204295746100150, guid: 2419a879bd4e47d4fa8b30de0fcdde42, type: 3} + _count: 5 + triggerTime: 1 + - groupSpawn: + - _enemy: {fileID: 80204295746100150, guid: 1be769d6ef642314b8846bed35e7297c, type: 3} + _count: 7 + triggerTime: 2 + - groupSpawn: + - _enemy: {fileID: 80204295746100150, guid: 5bbf0d85fa5bb3f4599da79f0a84e3a9, type: 3} + _count: 3 + triggerTime: 2.5 + _gameDuration: 3 diff --git a/Assets/Design/Levels/WaveConfig01.asset.meta b/Assets/Design/Levels/WaveConfig_1_2.asset.meta similarity index 79% rename from Assets/Design/Levels/WaveConfig01.asset.meta rename to Assets/Design/Levels/WaveConfig_1_2.asset.meta index 7ed0ea8..fba576a 100644 --- a/Assets/Design/Levels/WaveConfig01.asset.meta +++ b/Assets/Design/Levels/WaveConfig_1_2.asset.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 21b0f85f7c746974db1e72f2df646f5d +guid: e9e134bb6a24e4647a27955d3d276bd2 NativeFormatImporter: externalObjects: {} mainObjectFileID: 11400000 diff --git a/Assets/Design/Levels/WaveConfig_1_3.asset b/Assets/Design/Levels/WaveConfig_1_3.asset new file mode 100644 index 0000000..a48e4ac --- /dev/null +++ b/Assets/Design/Levels/WaveConfig_1_3.asset @@ -0,0 +1,33 @@ +%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: eb0795e326609f0499365f5b65c2b5cd, type: 3} + m_Name: WaveConfig_1_3 + m_EditorClassIdentifier: + _constantSpawn: + - _enemy: {fileID: 80204295746100150, guid: 1be769d6ef642314b8846bed35e7297c, type: 3} + _count: 15 + - _enemy: {fileID: 80204295746100150, guid: 2419a879bd4e47d4fa8b30de0fcdde42, type: 3} + _count: 25 + _nestedGroupSpawn: + - groupSpawn: + - _enemy: {fileID: 80204295746100150, guid: 2419a879bd4e47d4fa8b30de0fcdde42, type: 3} + _count: 5 + triggerTime: 1 + - groupSpawn: + - _enemy: {fileID: 80204295746100150, guid: 1be769d6ef642314b8846bed35e7297c, type: 3} + _count: 7 + triggerTime: 2 + - groupSpawn: + - _enemy: {fileID: 80204295746100150, guid: 5bbf0d85fa5bb3f4599da79f0a84e3a9, type: 3} + _count: 3 + triggerTime: 2.5 + _gameDuration: 3 diff --git a/Assets/Design/Levels/TestDrag&Drop.asset.meta b/Assets/Design/Levels/WaveConfig_1_3.asset.meta similarity index 79% rename from Assets/Design/Levels/TestDrag&Drop.asset.meta rename to Assets/Design/Levels/WaveConfig_1_3.asset.meta index 5f50d38..977ae8c 100644 --- a/Assets/Design/Levels/TestDrag&Drop.asset.meta +++ b/Assets/Design/Levels/WaveConfig_1_3.asset.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 458348dd169e806459b7449b7e157d64 +guid: c22ff5f49b21f9844a4d9693dc06777c NativeFormatImporter: externalObjects: {} mainObjectFileID: 11400000 diff --git a/Assets/Design/Levels/WaveConfig_1_4.asset b/Assets/Design/Levels/WaveConfig_1_4.asset new file mode 100644 index 0000000..dd747ee --- /dev/null +++ b/Assets/Design/Levels/WaveConfig_1_4.asset @@ -0,0 +1,33 @@ +%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: eb0795e326609f0499365f5b65c2b5cd, type: 3} + m_Name: WaveConfig_1_4 + m_EditorClassIdentifier: + _constantSpawn: + - _enemy: {fileID: 80204295746100150, guid: 1be769d6ef642314b8846bed35e7297c, type: 3} + _count: 15 + - _enemy: {fileID: 80204295746100150, guid: 2419a879bd4e47d4fa8b30de0fcdde42, type: 3} + _count: 25 + _nestedGroupSpawn: + - groupSpawn: + - _enemy: {fileID: 80204295746100150, guid: 2419a879bd4e47d4fa8b30de0fcdde42, type: 3} + _count: 10 + triggerTime: 1 + - groupSpawn: + - _enemy: {fileID: 80204295746100150, guid: 1be769d6ef642314b8846bed35e7297c, type: 3} + _count: 8 + triggerTime: 2 + - groupSpawn: + - _enemy: {fileID: 80204295746100150, guid: 5bbf0d85fa5bb3f4599da79f0a84e3a9, type: 3} + _count: 4 + triggerTime: 2.5 + _gameDuration: 3 diff --git a/Assets/Design/Levels/TestGame.asset.meta b/Assets/Design/Levels/WaveConfig_1_4.asset.meta similarity index 79% rename from Assets/Design/Levels/TestGame.asset.meta rename to Assets/Design/Levels/WaveConfig_1_4.asset.meta index ad54b76..e01f3e4 100644 --- a/Assets/Design/Levels/TestGame.asset.meta +++ b/Assets/Design/Levels/WaveConfig_1_4.asset.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: f5a11cb6d0d324b47b493042c7615112 +guid: 5ccff833a19a71f4499a3b3d786f4d11 NativeFormatImporter: externalObjects: {} mainObjectFileID: 11400000 diff --git a/Assets/Design/Levels/WaveConfig_1_5.asset b/Assets/Design/Levels/WaveConfig_1_5.asset new file mode 100644 index 0000000..d3b19f3 --- /dev/null +++ b/Assets/Design/Levels/WaveConfig_1_5.asset @@ -0,0 +1,33 @@ +%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: eb0795e326609f0499365f5b65c2b5cd, type: 3} + m_Name: WaveConfig_1_5 + m_EditorClassIdentifier: + _constantSpawn: + - _enemy: {fileID: 80204295746100150, guid: 1be769d6ef642314b8846bed35e7297c, type: 3} + _count: 15 + - _enemy: {fileID: 80204295746100150, guid: 2419a879bd4e47d4fa8b30de0fcdde42, type: 3} + _count: 25 + _nestedGroupSpawn: + - groupSpawn: + - _enemy: {fileID: 80204295746100150, guid: 2419a879bd4e47d4fa8b30de0fcdde42, type: 3} + _count: 12 + triggerTime: 1 + - groupSpawn: + - _enemy: {fileID: 80204295746100150, guid: 1be769d6ef642314b8846bed35e7297c, type: 3} + _count: 8 + triggerTime: 2 + - groupSpawn: + - _enemy: {fileID: 80204295746100150, guid: 5bbf0d85fa5bb3f4599da79f0a84e3a9, type: 3} + _count: 4 + triggerTime: 2.5 + _gameDuration: 3 diff --git a/Assets/Design/Levels/WaveConfig_1_5.asset.meta b/Assets/Design/Levels/WaveConfig_1_5.asset.meta new file mode 100644 index 0000000..2ebd9a8 --- /dev/null +++ b/Assets/Design/Levels/WaveConfig_1_5.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 2462ecbf554cf1d4883dea95b2504a9f +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Design/Levels/WaveConfig_1_6.asset b/Assets/Design/Levels/WaveConfig_1_6.asset new file mode 100644 index 0000000..6c1bd9e --- /dev/null +++ b/Assets/Design/Levels/WaveConfig_1_6.asset @@ -0,0 +1,33 @@ +%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: eb0795e326609f0499365f5b65c2b5cd, type: 3} + m_Name: WaveConfig_1_6 + m_EditorClassIdentifier: + _constantSpawn: + - _enemy: {fileID: 80204295746100150, guid: 1be769d6ef642314b8846bed35e7297c, type: 3} + _count: 15 + - _enemy: {fileID: 80204295746100150, guid: 2419a879bd4e47d4fa8b30de0fcdde42, type: 3} + _count: 25 + _nestedGroupSpawn: + - groupSpawn: + - _enemy: {fileID: 80204295746100150, guid: 2419a879bd4e47d4fa8b30de0fcdde42, type: 3} + _count: 12 + triggerTime: 1 + - groupSpawn: + - _enemy: {fileID: 80204295746100150, guid: 1be769d6ef642314b8846bed35e7297c, type: 3} + _count: 9 + triggerTime: 2 + - groupSpawn: + - _enemy: {fileID: 80204295746100150, guid: 5bbf0d85fa5bb3f4599da79f0a84e3a9, type: 3} + _count: 4 + triggerTime: 2.5 + _gameDuration: 3 diff --git a/Assets/Design/Levels/WaveConfig_1_6.asset.meta b/Assets/Design/Levels/WaveConfig_1_6.asset.meta new file mode 100644 index 0000000..341be63 --- /dev/null +++ b/Assets/Design/Levels/WaveConfig_1_6.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: eee8fc46b43d8144ca603169dc9f26d6 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Design/Levels/WaveConfig_DefaultWorld1_NormalDifficulty.asset b/Assets/Design/Levels/WaveConfig_DefaultWorld1_NormalDifficulty.asset index 67c9384..246d1f0 100644 --- a/Assets/Design/Levels/WaveConfig_DefaultWorld1_NormalDifficulty.asset +++ b/Assets/Design/Levels/WaveConfig_DefaultWorld1_NormalDifficulty.asset @@ -13,23 +13,11 @@ MonoBehaviour: m_Name: WaveConfig_DefaultWorld1_NormalDifficulty m_EditorClassIdentifier: _constantSpawn: - - _enemy: {fileID: 313037212318601125, guid: 2419a879bd4e47d4fa8b30de0fcdde42, type: 3} - _count: 15 - - _enemy: {fileID: 313037212318601125, guid: 1be769d6ef642314b8846bed35e7297c, type: 3} - _count: 10 + - _enemy: {fileID: 80204295746100150, guid: 1be769d6ef642314b8846bed35e7297c, type: 3} + _count: 20 _nestedGroupSpawn: - groupSpawn: - - _enemy: {fileID: 313037212318601125, guid: 1be769d6ef642314b8846bed35e7297c, type: 3} + - _enemy: {fileID: 80204295746100150, guid: 2419a879bd4e47d4fa8b30de0fcdde42, type: 3} _count: 1 - triggerTime: 0.1 - - groupSpawn: - - _enemy: {fileID: 313037212318601125, guid: 2419a879bd4e47d4fa8b30de0fcdde42, type: 3} - _count: 1 - - _enemy: {fileID: 313037212318601125, guid: 2419a879bd4e47d4fa8b30de0fcdde42, type: 3} - _count: 1 - - _enemy: {fileID: 313037212318601125, guid: 2419a879bd4e47d4fa8b30de0fcdde42, type: 3} - _count: 1 - - _enemy: {fileID: 313037212318601125, guid: 2419a879bd4e47d4fa8b30de0fcdde42, type: 3} - _count: 1 - triggerTime: 1 + triggerTime: 0.25 _gameDuration: 3 diff --git a/Assets/Design/Levels/WaveConfig_World1_Level1.asset b/Assets/Design/Levels/WaveConfig_World1_Level1.asset deleted file mode 100644 index 8078d53..0000000 --- a/Assets/Design/Levels/WaveConfig_World1_Level1.asset +++ /dev/null @@ -1,31 +0,0 @@ -%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: eb0795e326609f0499365f5b65c2b5cd, type: 3} - m_Name: WaveConfig_World1_Level1 - m_EditorClassIdentifier: - _constantSpawn: - - _enemy: {fileID: 313037212318601125, guid: 1be769d6ef642314b8846bed35e7297c, type: 3} - _count: 20 - _nestedGroupSpawn: - - groupSpawn: - - _enemy: {fileID: 313037212318601125, guid: 1be769d6ef642314b8846bed35e7297c, type: 3} - _count: 1 - - _enemy: {fileID: 313037212318601125, guid: 1be769d6ef642314b8846bed35e7297c, type: 3} - _count: 1 - - _enemy: {fileID: 313037212318601125, guid: 1be769d6ef642314b8846bed35e7297c, type: 3} - _count: 3 - - _enemy: {fileID: 313037212318601125, guid: 1be769d6ef642314b8846bed35e7297c, type: 3} - _count: 5 - - _enemy: {fileID: 313037212318601125, guid: 1be769d6ef642314b8846bed35e7297c, type: 3} - _count: 17 - triggerTime: 0.5 - _gameDuration: 3 diff --git a/Assets/Scripts/Events/LastWaveCompletedEvent.cs b/Assets/Scripts/Events/LastWaveCompletedEvent.cs new file mode 100644 index 0000000..8613568 --- /dev/null +++ b/Assets/Scripts/Events/LastWaveCompletedEvent.cs @@ -0,0 +1,3 @@ +using GatherAndDefend.Events; + +public class LastWaveCompletedEvent : EventBase { } \ No newline at end of file diff --git a/Assets/Scripts/Events/LastWaveCompletedEvent.cs.meta b/Assets/Scripts/Events/LastWaveCompletedEvent.cs.meta new file mode 100644 index 0000000..0b7765f --- /dev/null +++ b/Assets/Scripts/Events/LastWaveCompletedEvent.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 056fb8bd9181745448b804766e4081bd +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/Opponent/EnemyType.cs b/Assets/Scripts/Opponent/EnemyType.cs index 1bb9e02..1a3493b 100644 --- a/Assets/Scripts/Opponent/EnemyType.cs +++ b/Assets/Scripts/Opponent/EnemyType.cs @@ -6,19 +6,26 @@ using System; public class EnemyType { [SerializeField] - private Opponent _enemy; + private GameObject _enemy; [SerializeField] private int _count; + private Opponent _opponent; + public int GetEnemyToughness() { - float toughness = Mathf.Round((_enemy.Hp / 10) / 2); + if (_opponent == null) + { + _opponent = _enemy.GetComponent(); + } + + float toughness = Mathf.Round((_opponent.Hp / 10) / 2); return (int)toughness; } public GameObject GetEnemyObject() { - return _enemy.gameObject; + return _enemy; } public int Count { diff --git a/Assets/Scripts/VictoryDefeat.cs b/Assets/Scripts/VictoryDefeat.cs index fde40a0..1aca2cc 100644 --- a/Assets/Scripts/VictoryDefeat.cs +++ b/Assets/Scripts/VictoryDefeat.cs @@ -1,36 +1,50 @@ +using GatherAndDefend.Events; using System.Collections; using System.Collections.Generic; using UnityEngine; public class VictoryDefeat : MonoBehaviour { - private bool _wavesEnd = false; - private bool _isShowingVictoryOrDefeat = false; + public const float positionLoseLimit = -10.0f; + [SerializeField] private Animator _victoryAnimator; [SerializeField] private Animator _defeatAnimator; - public const float positionLoseLimit = -10.0f; + private bool _lastWaveCompleted = false; + private bool _isShowingVictoryOrDefeat = false; private void Start() { _isShowingVictoryOrDefeat = false; + + EventAggregator.Instance.GetEvent().Attach(HandleLastWaveCompletedEvent); } - void Update() + private void OnDestroy() + { + EventAggregator.Instance.GetEvent().Detach(HandleLastWaveCompletedEvent); + } + + private void HandleLastWaveCompletedEvent() + { + _lastWaveCompleted = true; + } + + private void Update() { if (_isShowingVictoryOrDefeat) return; List opponentsList = LevelManager.Instance.GetAll(x => x is Opponent); - //I believe that we win if the waves are finished and there are no more monsters (to be modified in the case that's not it) - if(_wavesEnd && opponentsList.Count == 0) + // Win if the waves are finished and there are no more monsters. + if(_lastWaveCompleted && opponentsList.Count == 0) { _victoryAnimator.Play("ShowVictoryOrDefeat"); _isShowingVictoryOrDefeat = true; - //win ! + // win ! } - //I estimate that we lose if one of the enemies arrives behind our line of defense (to be modified in the case it's not that) + // Lose if one of the enemies arrives behind our line of defense. foreach (Opponent opponent in opponentsList) { if (opponent == null) return; @@ -38,7 +52,7 @@ public class VictoryDefeat : MonoBehaviour { _defeatAnimator.Play("ShowVictoryOrDefeat"); _isShowingVictoryOrDefeat = true; - //lose :( + // lose :( } } } From 25d574714f32e7eec33f90451d2054cb643722ff Mon Sep 17 00:00:00 2001 From: Baptiste Date: Mon, 13 Nov 2023 19:08:18 -0500 Subject: [PATCH 11/13] add the save and unlock next level after finishing anyone --- Assets/Prefabs/UI/VictoryDefeatScreen.prefab | 4 +- .../Prefabs/UI/WorldMap/WorldMapCanvas.prefab | 6 +- Assets/Scenes/LevelSelect.unity | 36 ++++++++++ Assets/Scripts/VictoryDefeat.cs | 5 ++ Assets/Scripts/WorldMap/WorldMapManager.cs | 9 +++ Assets/Scripts/WorldMap/WorldMapSave.cs | 71 +++++++++++++++++-- 6 files changed, 120 insertions(+), 11 deletions(-) diff --git a/Assets/Prefabs/UI/VictoryDefeatScreen.prefab b/Assets/Prefabs/UI/VictoryDefeatScreen.prefab index 56bcdf0..39c899c 100644 --- a/Assets/Prefabs/UI/VictoryDefeatScreen.prefab +++ b/Assets/Prefabs/UI/VictoryDefeatScreen.prefab @@ -613,7 +613,7 @@ MonoBehaviour: m_OnCullStateChanged: m_PersistentCalls: m_Calls: [] - m_text: Five Up + m_text: Return Map m_isRightToLeft: 0 m_fontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2} m_sharedMaterial: {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2} @@ -1891,7 +1891,7 @@ MonoBehaviour: m_OnCullStateChanged: m_PersistentCalls: m_Calls: [] - m_text: Return + m_text: Retry m_isRightToLeft: 0 m_fontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2} m_sharedMaterial: {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2} diff --git a/Assets/Prefabs/UI/WorldMap/WorldMapCanvas.prefab b/Assets/Prefabs/UI/WorldMap/WorldMapCanvas.prefab index 2ccd1e6..7cb189f 100644 --- a/Assets/Prefabs/UI/WorldMap/WorldMapCanvas.prefab +++ b/Assets/Prefabs/UI/WorldMap/WorldMapCanvas.prefab @@ -36,7 +36,7 @@ RectTransform: 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: 846.13, y: 573.41} + m_AnchoredPosition: {x: 846.12, y: -250} m_SizeDelta: {x: 227.75, y: 187.408} m_Pivot: {x: 0.5, y: 0.5} --- !u!222 &1388419616670829471 @@ -344,8 +344,8 @@ RectTransform: m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 0} m_AnchorMax: {x: 1, y: 1} - m_AnchoredPosition: {x: 0, y: 0} - m_SizeDelta: {x: 0, y: 0} + m_AnchoredPosition: {x: 0, y: -61.694} + m_SizeDelta: {x: 0, y: -123.389} m_Pivot: {x: 0.5, y: 0.5} --- !u!1001 &652135141416114485 PrefabInstance: diff --git a/Assets/Scenes/LevelSelect.unity b/Assets/Scenes/LevelSelect.unity index a8d03fd..5cd9090 100644 --- a/Assets/Scenes/LevelSelect.unity +++ b/Assets/Scenes/LevelSelect.unity @@ -537,6 +537,42 @@ PrefabInstance: propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_Target value: objectReference: {fileID: 1340105976} + - target: {fileID: 1388419616670829464, guid: 4a2f48781c26ad247b697aa368358f88, type: 3} + propertyPath: m_AnchoredPosition.x + value: 828 + objectReference: {fileID: 0} + - target: {fileID: 1388419616670829464, guid: 4a2f48781c26ad247b697aa368358f88, type: 3} + propertyPath: m_AnchoredPosition.y + value: -327.58 + objectReference: {fileID: 0} + - target: {fileID: 1388419616670829465, guid: 4a2f48781c26ad247b697aa368358f88, type: 3} + propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.size + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 1388419616670829465, guid: 4a2f48781c26ad247b697aa368358f88, type: 3} + propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_Mode + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 1388419616670829465, guid: 4a2f48781c26ad247b697aa368358f88, type: 3} + propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_Target + value: + objectReference: {fileID: 1340105976} + - target: {fileID: 1388419616670829465, guid: 4a2f48781c26ad247b697aa368358f88, type: 3} + propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_CallState + value: 2 + objectReference: {fileID: 0} + - target: {fileID: 1388419616670829465, guid: 4a2f48781c26ad247b697aa368358f88, type: 3} + propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_MethodName + value: WorldReinitialition + objectReference: {fileID: 0} + - target: {fileID: 1388419616670829465, guid: 4a2f48781c26ad247b697aa368358f88, type: 3} + propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_TargetAssemblyTypeName + value: WorldMapManager, GameAssembly + objectReference: {fileID: 0} + - target: {fileID: 1388419616670829465, guid: 4a2f48781c26ad247b697aa368358f88, type: 3} + propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_Arguments.m_ObjectArgumentAssemblyTypeName + value: UnityEngine.Object, UnityEngine + objectReference: {fileID: 0} - target: {fileID: 1388419617042242050, guid: 4a2f48781c26ad247b697aa368358f88, type: 3} propertyPath: m_Pivot.x value: 0 diff --git a/Assets/Scripts/VictoryDefeat.cs b/Assets/Scripts/VictoryDefeat.cs index fde40a0..d650a20 100644 --- a/Assets/Scripts/VictoryDefeat.cs +++ b/Assets/Scripts/VictoryDefeat.cs @@ -10,9 +10,12 @@ public class VictoryDefeat : MonoBehaviour [SerializeField] private Animator _defeatAnimator; public const float positionLoseLimit = -10.0f; + + private WorldMapSave _wms; private void Start() { + _wms = new WorldMapSave(); _isShowingVictoryOrDefeat = false; } @@ -27,6 +30,7 @@ public class VictoryDefeat : MonoBehaviour { _victoryAnimator.Play("ShowVictoryOrDefeat"); _isShowingVictoryOrDefeat = true; + _wms.UnlockNextLevel(); //win ! } @@ -42,4 +46,5 @@ public class VictoryDefeat : MonoBehaviour } } } + } diff --git a/Assets/Scripts/WorldMap/WorldMapManager.cs b/Assets/Scripts/WorldMap/WorldMapManager.cs index 676f3fd..d390a43 100644 --- a/Assets/Scripts/WorldMap/WorldMapManager.cs +++ b/Assets/Scripts/WorldMap/WorldMapManager.cs @@ -22,7 +22,9 @@ public class WorldMapManager : MonoBehaviour void Start() { //TODO: getMajorSaveFile() //Call et obtiens le chemin du fichier de sauvegarde; + _worldMapSave = new WorldMapSave(); + _worldMapSave.WorldInitialition(); UnlockLevels(); PlayerPrefs.SetInt("LevelToLoad", -1); @@ -54,6 +56,13 @@ public class WorldMapManager : MonoBehaviour counterIndex++; } } + + public void WorldReinitialition() + { + _worldMapSave.WorldReinitialition(); + + } + private void ShowLockedIcon(GameObject currentLevelButton) { currentLevelButton.GetComponent().sprite = _lockedIcon; diff --git a/Assets/Scripts/WorldMap/WorldMapSave.cs b/Assets/Scripts/WorldMap/WorldMapSave.cs index fd70d52..83bf361 100644 --- a/Assets/Scripts/WorldMap/WorldMapSave.cs +++ b/Assets/Scripts/WorldMap/WorldMapSave.cs @@ -1,6 +1,8 @@ using System.Collections; using System.Collections.Generic; using UnityEngine; +using System.IO; +using System.Runtime.Serialization.Formatters.Binary; public class WorldMapSave { @@ -11,21 +13,78 @@ public class WorldMapSave SAVED } - private LevelState[] levelUnlocked = { LevelState.UNLOCKED, LevelState.UNLOCKED, LevelState.UNLOCKED, LevelState.UNLOCKED, - LevelState.UNLOCKED, LevelState.SAVED, LevelState.LOCKED, LevelState.LOCKED, LevelState.LOCKED, LevelState.LOCKED, LevelState.LOCKED }; + private LevelState[] levelUnlocked = { LevelState.SAVED, LevelState.LOCKED, LevelState.LOCKED, LevelState.LOCKED, + LevelState.LOCKED, LevelState.LOCKED, LevelState.LOCKED, LevelState.LOCKED, LevelState.LOCKED, LevelState.LOCKED, LevelState.LOCKED }; - public void UnlockNextLevel(int levelNumber) + private string filePath; + + public void WorldInitialition() { - if(levelNumber == 10) + + filePath = Application.persistentDataPath + "/data.dat"; + + if (File.Exists(filePath)) { - //UnlockNextWorld(); + ReadData(); } else { - levelUnlocked[levelNumber + 1] = LevelState.UNLOCKED; + WriteData(); } } + public void WriteData() + { + BinaryFormatter formatter = new BinaryFormatter(); + FileStream fileStream = File.Create(filePath); + formatter.Serialize(fileStream, levelUnlocked); + fileStream.Close(); + } + + public void ReadData() + { + BinaryFormatter formatter = new BinaryFormatter(); + FileStream fileStream = File.Open(filePath, FileMode.Open); + levelUnlocked = (LevelState[])formatter.Deserialize(fileStream); + fileStream.Close(); + } + + private int GetSavedLevelIndex() + { + for (int i = 0; i < levelUnlocked.Length; i++) + { + if (levelUnlocked[i] == LevelState.SAVED) + { + return i; + } + } + + // If LevelState.SAVED not find + return -1; + } + + public void UnlockNextLevel() + { + filePath = Application.persistentDataPath + "/data.dat"; + ReadData(); + //int actuelLevel = PlayerPrefs.GetInt(LevelToLoad,NoLevel); + //Debug.Log(actuelLevel); + levelUnlocked[GetSavedLevelIndex() + 1] = LevelState.SAVED; + levelUnlocked[GetSavedLevelIndex()] = LevelState.UNLOCKED; + WriteData(); + } + + public void WorldReinitialition() + { + if (File.Exists(filePath)) + { + File.Delete(filePath); + levelUnlocked = new LevelState[] { LevelState.SAVED, LevelState.LOCKED, LevelState.LOCKED, LevelState.LOCKED, LevelState.LOCKED, LevelState.LOCKED, LevelState.LOCKED, LevelState.LOCKED, LevelState.LOCKED, LevelState.LOCKED, LevelState.LOCKED }; + } + WorldInitialition(); + + } + public LevelState GetLevelState(int index) { return levelUnlocked[index]; From c8d2e4332629c0f92ee9ccd1680cde81b529f4bc Mon Sep 17 00:00:00 2001 From: craftwill Date: Mon, 13 Nov 2023 20:03:28 -0500 Subject: [PATCH 12/13] Add timed victory and config changes --- Assets/Design/Levels/Level1.asset | 4 ++-- Assets/Design/Levels/Level2.asset | 4 ++-- Assets/Design/Levels/Level3.asset | 4 ++-- Assets/Design/Levels/Level4.asset | 4 ++-- Assets/Design/Levels/Level5.asset | 6 ++++-- Assets/Design/Levels/Level6.asset | 4 ++-- Assets/Scripts/LevelConfig/WaveConfig.cs | 1 + Assets/Scripts/LevelConfig/WaveObserver.cs | 13 ++++++++++++- Assets/Scripts/LevelManager/LevelManager.cs | 2 +- 9 files changed, 28 insertions(+), 14 deletions(-) diff --git a/Assets/Design/Levels/Level1.asset b/Assets/Design/Levels/Level1.asset index 6705b55..23e574f 100644 --- a/Assets/Design/Levels/Level1.asset +++ b/Assets/Design/Levels/Level1.asset @@ -249,7 +249,7 @@ MonoBehaviour: _position: {x: 0, y: 0} _scale: {x: 1, y: 1} _waveConfig: {fileID: 11400000, guid: d8140ae36f1b7fd4fb1a57ab3dc69de4, type: 2} - _startPopulation: 5 - _startFood: 30 + _startPopulation: 10 + _startFood: 40 _startWood: 0 _startRock: 0 diff --git a/Assets/Design/Levels/Level2.asset b/Assets/Design/Levels/Level2.asset index 9f4a4ba..7c89056 100644 --- a/Assets/Design/Levels/Level2.asset +++ b/Assets/Design/Levels/Level2.asset @@ -193,7 +193,7 @@ MonoBehaviour: _position: {x: 0, y: 0} _scale: {x: 1, y: 1} _waveConfig: {fileID: 11400000, guid: e9e134bb6a24e4647a27955d3d276bd2, type: 2} - _startPopulation: 5 - _startFood: 30 + _startPopulation: 10 + _startFood: 40 _startWood: 0 _startRock: 0 diff --git a/Assets/Design/Levels/Level3.asset b/Assets/Design/Levels/Level3.asset index 13c89a7..fd01a7b 100644 --- a/Assets/Design/Levels/Level3.asset +++ b/Assets/Design/Levels/Level3.asset @@ -195,7 +195,7 @@ MonoBehaviour: _position: {x: 0, y: 0} _scale: {x: 1, y: 1} _waveConfig: {fileID: 11400000, guid: c22ff5f49b21f9844a4d9693dc06777c, type: 2} - _startPopulation: 5 - _startFood: 30 + _startPopulation: 10 + _startFood: 40 _startWood: 0 _startRock: 0 diff --git a/Assets/Design/Levels/Level4.asset b/Assets/Design/Levels/Level4.asset index 3033302..50684b7 100644 --- a/Assets/Design/Levels/Level4.asset +++ b/Assets/Design/Levels/Level4.asset @@ -225,7 +225,7 @@ MonoBehaviour: _position: {x: 0, y: 0} _scale: {x: 1, y: 1} _waveConfig: {fileID: 11400000, guid: 5ccff833a19a71f4499a3b3d786f4d11, type: 2} - _startPopulation: 5 - _startFood: 30 + _startPopulation: 10 + _startFood: 40 _startWood: 0 _startRock: 0 diff --git a/Assets/Design/Levels/Level5.asset b/Assets/Design/Levels/Level5.asset index 70cb095..d4222a4 100644 --- a/Assets/Design/Levels/Level5.asset +++ b/Assets/Design/Levels/Level5.asset @@ -148,6 +148,8 @@ MonoBehaviour: _position: {x: -10, y: -1, z: 0} - _tile: {fileID: 11400000, guid: e0b1d2d816ae5624c99b09a2bebb2a39, type: 2} _position: {x: -10, y: 0, z: 0} + - _tile: {fileID: 11400000, guid: 3723ba09738ef6245947ae3ba7978b21, type: 2} + _position: {x: -10, y: 1, z: 0} - _tile: {fileID: 11400000, guid: e0b1d2d816ae5624c99b09a2bebb2a39, type: 2} _position: {x: -9, y: -1, z: 0} - _tile: {fileID: 11400000, guid: e0b1d2d816ae5624c99b09a2bebb2a39, type: 2} @@ -195,7 +197,7 @@ MonoBehaviour: _position: {x: 0, y: 0} _scale: {x: 1, y: 1} _waveConfig: {fileID: 11400000, guid: 2462ecbf554cf1d4883dea95b2504a9f, type: 2} - _startPopulation: 5 - _startFood: 30 + _startPopulation: 10 + _startFood: 40 _startWood: 0 _startRock: 0 diff --git a/Assets/Design/Levels/Level6.asset b/Assets/Design/Levels/Level6.asset index 1e61549..f455d8e 100644 --- a/Assets/Design/Levels/Level6.asset +++ b/Assets/Design/Levels/Level6.asset @@ -207,7 +207,7 @@ MonoBehaviour: _position: {x: 0, y: 0} _scale: {x: 1, y: 1} _waveConfig: {fileID: 11400000, guid: eee8fc46b43d8144ca603169dc9f26d6, type: 2} - _startPopulation: 5 - _startFood: 30 + _startPopulation: 10 + _startFood: 40 _startWood: 0 _startRock: 0 diff --git a/Assets/Scripts/LevelConfig/WaveConfig.cs b/Assets/Scripts/LevelConfig/WaveConfig.cs index afee1dd..3671260 100644 --- a/Assets/Scripts/LevelConfig/WaveConfig.cs +++ b/Assets/Scripts/LevelConfig/WaveConfig.cs @@ -43,6 +43,7 @@ public class WaveConfig : ScriptableObject return interval; } } + 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 5c1de7e..2ab3d1c 100644 --- a/Assets/Scripts/LevelConfig/WaveObserver.cs +++ b/Assets/Scripts/LevelConfig/WaveObserver.cs @@ -1,3 +1,5 @@ +using GatherAndDefend.Events; +using System.Threading.Tasks; using System.Collections.Generic; using UnityEngine; @@ -15,7 +17,7 @@ public class WaveObserver : Singleton private bool _once = true; private int _currentGroupIndex = 0; - public void SetLevelConfig(WaveConfig config) + public void Init(WaveConfig config) { _levelConfig = Object.Instantiate(config); _copyConstantSpawn = new List(); @@ -39,6 +41,15 @@ public class WaveObserver : Singleton } _groupSpawnTimers.Add(_levelConfig.NestedGroupSpawn[index].triggerTime); } + + // Start game timer, at the end, player wins. + GameTimer(); + } + + private async void GameTimer() + { + await Task.Delay((int) _levelConfig.GameDuration * 60 * 1000); + EventAggregator.Instance.GetEvent().Invoke(); } /** diff --git a/Assets/Scripts/LevelManager/LevelManager.cs b/Assets/Scripts/LevelManager/LevelManager.cs index 940bd8f..c1b1ea7 100644 --- a/Assets/Scripts/LevelManager/LevelManager.cs +++ b/Assets/Scripts/LevelManager/LevelManager.cs @@ -166,7 +166,7 @@ public class LevelManager : Singleton _currentLevel = level; _waveObserver = WaveObserver.Instance; - _waveObserver.SetLevelConfig(_currentLevel.WaveConfig); + _waveObserver.Init(_currentLevel.WaveConfig); Grid grid = Object.FindObjectOfType(); //create new grid if there is none if (!grid) From 8e50c6d45539b846c411f65c445eb42704690ae0 Mon Sep 17 00:00:00 2001 From: craftwill Date: Mon, 13 Nov 2023 22:26:24 -0500 Subject: [PATCH 13/13] Fix spawning for gala and fix archer atk speed --- Assets/Design/Levels/WaveConfig_1_1.asset | 2 -- Assets/Design/Levels/WaveConfig_1_2.asset | 4 +--- Assets/Design/Levels/WaveConfig_1_3.asset | 4 +--- Assets/Design/Levels/WaveConfig_1_4.asset | 4 +--- Assets/Design/Levels/WaveConfig_1_5.asset | 4 +--- Assets/Design/Levels/WaveConfig_1_6.asset | 4 +--- Assets/GlobalConfig.asset | 11 ++++++--- Assets/Prefabs/Sticks/archerStick.prefab | 2 +- .../Prefabs/UI/WorldMap/WorldMapCanvas.prefab | 24 ++++++++++++++----- .../LevelManager/LevelManagerScript.cs | 6 +++++ 10 files changed, 38 insertions(+), 27 deletions(-) diff --git a/Assets/Design/Levels/WaveConfig_1_1.asset b/Assets/Design/Levels/WaveConfig_1_1.asset index ef59db7..721069f 100644 --- a/Assets/Design/Levels/WaveConfig_1_1.asset +++ b/Assets/Design/Levels/WaveConfig_1_1.asset @@ -14,8 +14,6 @@ MonoBehaviour: m_EditorClassIdentifier: _constantSpawn: - _enemy: {fileID: 80204295746100150, guid: 1be769d6ef642314b8846bed35e7297c, type: 3} - _count: 10 - - _enemy: {fileID: 80204295746100150, guid: 2419a879bd4e47d4fa8b30de0fcdde42, type: 3} _count: 20 _nestedGroupSpawn: - groupSpawn: diff --git a/Assets/Design/Levels/WaveConfig_1_2.asset b/Assets/Design/Levels/WaveConfig_1_2.asset index fde9534..e13eb45 100644 --- a/Assets/Design/Levels/WaveConfig_1_2.asset +++ b/Assets/Design/Levels/WaveConfig_1_2.asset @@ -14,9 +14,7 @@ MonoBehaviour: m_EditorClassIdentifier: _constantSpawn: - _enemy: {fileID: 80204295746100150, guid: 1be769d6ef642314b8846bed35e7297c, type: 3} - _count: 10 - - _enemy: {fileID: 80204295746100150, guid: 2419a879bd4e47d4fa8b30de0fcdde42, type: 3} - _count: 20 + _count: 40 _nestedGroupSpawn: - groupSpawn: - _enemy: {fileID: 80204295746100150, guid: 2419a879bd4e47d4fa8b30de0fcdde42, type: 3} diff --git a/Assets/Design/Levels/WaveConfig_1_3.asset b/Assets/Design/Levels/WaveConfig_1_3.asset index a48e4ac..509e8a4 100644 --- a/Assets/Design/Levels/WaveConfig_1_3.asset +++ b/Assets/Design/Levels/WaveConfig_1_3.asset @@ -14,9 +14,7 @@ MonoBehaviour: m_EditorClassIdentifier: _constantSpawn: - _enemy: {fileID: 80204295746100150, guid: 1be769d6ef642314b8846bed35e7297c, type: 3} - _count: 15 - - _enemy: {fileID: 80204295746100150, guid: 2419a879bd4e47d4fa8b30de0fcdde42, type: 3} - _count: 25 + _count: 40 _nestedGroupSpawn: - groupSpawn: - _enemy: {fileID: 80204295746100150, guid: 2419a879bd4e47d4fa8b30de0fcdde42, type: 3} diff --git a/Assets/Design/Levels/WaveConfig_1_4.asset b/Assets/Design/Levels/WaveConfig_1_4.asset index dd747ee..991a946 100644 --- a/Assets/Design/Levels/WaveConfig_1_4.asset +++ b/Assets/Design/Levels/WaveConfig_1_4.asset @@ -14,9 +14,7 @@ MonoBehaviour: m_EditorClassIdentifier: _constantSpawn: - _enemy: {fileID: 80204295746100150, guid: 1be769d6ef642314b8846bed35e7297c, type: 3} - _count: 15 - - _enemy: {fileID: 80204295746100150, guid: 2419a879bd4e47d4fa8b30de0fcdde42, type: 3} - _count: 25 + _count: 45 _nestedGroupSpawn: - groupSpawn: - _enemy: {fileID: 80204295746100150, guid: 2419a879bd4e47d4fa8b30de0fcdde42, type: 3} diff --git a/Assets/Design/Levels/WaveConfig_1_5.asset b/Assets/Design/Levels/WaveConfig_1_5.asset index d3b19f3..067592f 100644 --- a/Assets/Design/Levels/WaveConfig_1_5.asset +++ b/Assets/Design/Levels/WaveConfig_1_5.asset @@ -14,9 +14,7 @@ MonoBehaviour: m_EditorClassIdentifier: _constantSpawn: - _enemy: {fileID: 80204295746100150, guid: 1be769d6ef642314b8846bed35e7297c, type: 3} - _count: 15 - - _enemy: {fileID: 80204295746100150, guid: 2419a879bd4e47d4fa8b30de0fcdde42, type: 3} - _count: 25 + _count: 45 _nestedGroupSpawn: - groupSpawn: - _enemy: {fileID: 80204295746100150, guid: 2419a879bd4e47d4fa8b30de0fcdde42, type: 3} diff --git a/Assets/Design/Levels/WaveConfig_1_6.asset b/Assets/Design/Levels/WaveConfig_1_6.asset index 6c1bd9e..8e903f4 100644 --- a/Assets/Design/Levels/WaveConfig_1_6.asset +++ b/Assets/Design/Levels/WaveConfig_1_6.asset @@ -14,9 +14,7 @@ MonoBehaviour: m_EditorClassIdentifier: _constantSpawn: - _enemy: {fileID: 80204295746100150, guid: 1be769d6ef642314b8846bed35e7297c, type: 3} - _count: 15 - - _enemy: {fileID: 80204295746100150, guid: 2419a879bd4e47d4fa8b30de0fcdde42, type: 3} - _count: 25 + _count: 50 _nestedGroupSpawn: - groupSpawn: - _enemy: {fileID: 80204295746100150, guid: 2419a879bd4e47d4fa8b30de0fcdde42, type: 3} diff --git a/Assets/GlobalConfig.asset b/Assets/GlobalConfig.asset index 2cf54dc..a1e13e3 100644 --- a/Assets/GlobalConfig.asset +++ b/Assets/GlobalConfig.asset @@ -13,21 +13,26 @@ MonoBehaviour: m_Name: GlobalConfig m_EditorClassIdentifier: damageFlashIntensity: 1 - enemySpeedMultiplier: 1 + enemySpeedMultiplier: 0.8 enemyDamageMultiplier: 1 enemyLifeMultiplier: 1 enemyRangeMultiplier: {x: 1, y: 1} enemyAttackSpeedMultiplier: 1 + groupSpawnDelay: 0.05 allyDamageMultiplier: 1 allyLifeMultiplier: 1 allyAttackSpeedMultiplier: 1 allySpeedMultiplier: 1 allyRangeMultiplier: {x: 1, y: 1} + basePopulation: 5 + populationGivenPerHouse: 5 + populationCostPerUnit: 1 + populationWarningPercentage: 0.85 harvestDuration: 10 harvestAmount: 10 useRandomHarvestDuration: 1 - randomHarvestDurationMinimum: 8 - randomHarvestDurationMaximum: 12 + randomHarvestDurationMinimum: 9 + randomHarvestDurationMaximum: 11 loadingAddedTime: 0.2 baseTileSpawnSpeed: 33 tileSpawnAcceleration: 2 diff --git a/Assets/Prefabs/Sticks/archerStick.prefab b/Assets/Prefabs/Sticks/archerStick.prefab index adfe105..0cb46a0 100644 --- a/Assets/Prefabs/Sticks/archerStick.prefab +++ b/Assets/Prefabs/Sticks/archerStick.prefab @@ -652,7 +652,7 @@ MonoBehaviour: _hp: 10 _speed: 0 _attack_damage: 2 - _attack_interval: 2 + _attack_interval: 4 --- !u!82 &-6673723252830894487 AudioSource: m_ObjectHideFlags: 0 diff --git a/Assets/Prefabs/UI/WorldMap/WorldMapCanvas.prefab b/Assets/Prefabs/UI/WorldMap/WorldMapCanvas.prefab index cca42b1..794d889 100644 --- a/Assets/Prefabs/UI/WorldMap/WorldMapCanvas.prefab +++ b/Assets/Prefabs/UI/WorldMap/WorldMapCanvas.prefab @@ -94,7 +94,7 @@ GameObject: m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 - m_IsActive: 0 + m_IsActive: 1 --- !u!224 &1388419616670829464 RectTransform: m_ObjectHideFlags: 0 @@ -110,9 +110,9 @@ RectTransform: m_Father: {fileID: 1388419617214705178} m_RootOrder: 11 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 1, y: 1} - m_AnchorMax: {x: 1, y: 1} - m_AnchoredPosition: {x: -64, y: -58} + m_AnchorMin: {x: 1, y: 0} + m_AnchorMax: {x: 1, y: 0} + m_AnchoredPosition: {x: -23, y: 168} m_SizeDelta: {x: 512, y: 512} m_Pivot: {x: 0.5, y: 0.5} --- !u!222 &1388419616670829471 @@ -196,7 +196,19 @@ MonoBehaviour: m_TargetGraphic: {fileID: 1388419616670829470} m_OnClick: m_PersistentCalls: - m_Calls: [] + m_Calls: + - m_Target: {fileID: 0} + m_TargetAssemblyTypeName: WorldMapManager, GameAssembly + m_MethodName: WorldReinitialition + m_Mode: 1 + m_Arguments: + m_ObjectArgument: {fileID: 0} + m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine + m_IntArgument: 0 + m_FloatArgument: 0 + m_StringArgument: + m_BoolArgument: 0 + m_CallState: 2 --- !u!1 &1388419616788066155 GameObject: m_ObjectHideFlags: 0 @@ -2561,4 +2573,4 @@ PrefabInstance: RectTransform: m_CorrespondingSourceObject: {fileID: 1893888152770301339, guid: eb25bde5e3c72d34fbc9095e2c83cdb4, type: 3} m_PrefabInstance: {fileID: 1388419618220364677} - m_PrefabAsset: {fileID: 0} \ No newline at end of file + m_PrefabAsset: {fileID: 0} diff --git a/Assets/Scripts/LevelManager/LevelManagerScript.cs b/Assets/Scripts/LevelManager/LevelManagerScript.cs index 0f90f51..969851e 100644 --- a/Assets/Scripts/LevelManager/LevelManagerScript.cs +++ b/Assets/Scripts/LevelManager/LevelManagerScript.cs @@ -38,6 +38,12 @@ public class LevelManagerScript : SingletonBehaviour void Update() { updateAction?.Invoke(); + + // Gala hack to win level instantly + if (Input.GetKeyDown(KeyCode.Alpha0)) + { + EventAggregator.Instance.GetEvent().Invoke(); + } } private void Instance_LevelLoaded(Level level)