diff --git a/Assembly-CSharp.csproj b/Assembly-CSharp.csproj index bbca7cc..f79cdbe 100644 --- a/Assembly-CSharp.csproj +++ b/Assembly-CSharp.csproj @@ -27,7 +27,7 @@ full false Temp\Bin\Debug\Assembly-CSharp\ - UNITY_6000_4_8;UNITY_6000_4;UNITY_6000;UNITY_5_3_OR_NEWER;UNITY_5_4_OR_NEWER;UNITY_5_5_OR_NEWER;UNITY_5_6_OR_NEWER;UNITY_2017_1_OR_NEWER;UNITY_2017_2_OR_NEWER;UNITY_2017_3_OR_NEWER;UNITY_2017_4_OR_NEWER;UNITY_2018_1_OR_NEWER;UNITY_2018_2_OR_NEWER;UNITY_2018_3_OR_NEWER;UNITY_2018_4_OR_NEWER;UNITY_2019_1_OR_NEWER;UNITY_2019_2_OR_NEWER;UNITY_2019_3_OR_NEWER;UNITY_2019_4_OR_NEWER;UNITY_2020_1_OR_NEWER;UNITY_2020_2_OR_NEWER;UNITY_2020_3_OR_NEWER;UNITY_2021_1_OR_NEWER;UNITY_2021_2_OR_NEWER;UNITY_2021_3_OR_NEWER;UNITY_2022_1_OR_NEWER;UNITY_2022_2_OR_NEWER;UNITY_2022_3_OR_NEWER;UNITY_2023_1_OR_NEWER;UNITY_2023_2_OR_NEWER;UNITY_2023_3_OR_NEWER;UNITY_6000_0_OR_NEWER;UNITY_6000_1_OR_NEWER;UNITY_6000_2_OR_NEWER;UNITY_6000_3_OR_NEWER;UNITY_6000_4_OR_NEWER;PLATFORM_ARCH_64;UNITY_64;UNITY_INCLUDE_TESTS;ENABLE_AR;ENABLE_AUDIO;ENABLE_AUDIO_SCRIPTABLE_PIPELINE;ENABLE_CACHING;ENABLE_CLOTH;ENABLE_EVENT_QUEUE;ENABLE_MICROPHONE;ENABLE_MULTIPLE_DISPLAYS;ENABLE_PHYSICS;ENABLE_TEXTURE_STREAMING;ENABLE_VIRTUALTEXTURING;ENABLE_LZMA;ENABLE_UNITYEVENTS;ENABLE_VR;ENABLE_WEBCAM;ENABLE_UNITYWEBREQUEST;ENABLE_WWW;ENABLE_CLOUD_SERVICES;ENABLE_CLOUD_SERVICES_ADS;ENABLE_CLOUD_SERVICES_USE_WEBREQUEST;ENABLE_UNITY_CONSENT;ENABLE_UNITY_CLOUD_IDENTIFIERS;ENABLE_CLOUD_SERVICES_CRASH_REPORTING;ENABLE_CLOUD_SERVICES_NATIVE_CRASH_REPORTING;ENABLE_CLOUD_SERVICES_PURCHASING;ENABLE_CLOUD_SERVICES_ANALYTICS;ENABLE_CLOUD_SERVICES_BUILD;ENABLE_EDITOR_GAME_SERVICES;ENABLE_UNITY_GAME_SERVICES_ANALYTICS_SUPPORT;ENABLE_CLOUD_LICENSE;ENABLE_EDITOR_HUB_LICENSE;ENABLE_WEBSOCKET_CLIENT;ENABLE_GENERATE_NATIVE_PLUGINS_FOR_ASSEMBLIES_API;ENABLE_DIRECTOR_AUDIO;ENABLE_DIRECTOR_TEXTURE;ENABLE_MANAGED_JOBS;ENABLE_MANAGED_TRANSFORM_JOBS;ENABLE_MANAGED_ANIMATION_JOBS;ENABLE_MANAGED_AUDIO_JOBS;ENABLE_MANAGED_UNITYTLS;INCLUDE_DYNAMIC_GI;ENABLE_SCRIPTING_GC_WBARRIERS;PLATFORM_SUPPORTS_MONO;RENDER_SOFTWARE_CURSOR;ENABLE_MARSHALLING_TESTS;ENABLE_VIDEO;ENABLE_NAVIGATION_OFFMESHLINK_TO_NAVMESHLINK;ENABLE_ACCELERATOR_CLIENT_DEBUGGING;ENABLE_ACCESSIBILITY_SCREEN_READER;TEXTCORE_1_0_OR_NEWER;EDITOR_ONLY_NAVMESH_BUILDER_DEPRECATED;PLATFORM_STANDALONE_WIN;PLATFORM_STANDALONE;UNITY_STANDALONE_WIN;UNITY_STANDALONE;ENABLE_RUNTIME_GI;ENABLE_MOVIES;ENABLE_NETWORK;ENABLE_NVIDIA;ENABLE_AMD;ENABLE_CRUNCH_TEXTURE_COMPRESSION;ENABLE_CLOUD_SERVICES_ENGINE_DIAGNOSTICS;ENABLE_OUT_OF_PROCESS_CRASH_HANDLER;ENABLE_CLUSTER_SYNC;ENABLE_CLUSTERINPUT;PLATFORM_UPDATES_TIME_OUTSIDE_OF_PLAYER_LOOP;GFXDEVICE_WAITFOREVENT_MESSAGEPUMP;PLATFORM_USES_EXPLICIT_MEMORY_MANAGER_INITIALIZER;PLATFORM_SUPPORTS_WAIT_FOR_PRESENTATION;PLATFORM_SUPPORTS_SPLIT_GRAPHICS_JOBS;ENABLE_MONO;NET_STANDARD_2_0;NET_STANDARD;NET_STANDARD_2_1;NETSTANDARD;NETSTANDARD2_1;ENABLE_PROFILER;ENABLE_PROFILER_ASSISTANT_INTEGRATION;DEBUG;TRACE;UNITY_ASSERTIONS;UNITY_EDITOR;UNITY_EDITOR_64;UNITY_EDITOR_WIN;ENABLE_UNITY_COLLECTIONS_CHECKS;ENABLE_BURST_AOT;UNITY_TEAM_LICENSE;ENABLE_CUSTOM_RENDER_TEXTURE;ENABLE_DIRECTOR;ENABLE_LOCALIZATION;ENABLE_SPRITES;ENABLE_TERRAIN;ENABLE_TILEMAP;ENABLE_TIMELINE;ENABLE_INPUT_SYSTEM;ENABLE_LEGACY_INPUT_MANAGER;TEXTCORE_FONT_ENGINE_1_5_OR_NEWER;TEXTCORE_TEXT_ENGINE_1_5_OR_NEWER;TEXTCORE_FONT_ENGINE_1_6_OR_NEWER;SENTIS_ANALYTICS_ENABLED;CSHARP_7_OR_LATER;CSHARP_7_3_OR_NEWER + UNITY_6000_4_8;UNITY_6000_4;UNITY_6000;UNITY_5_3_OR_NEWER;UNITY_5_4_OR_NEWER;UNITY_5_5_OR_NEWER;UNITY_5_6_OR_NEWER;UNITY_2017_1_OR_NEWER;UNITY_2017_2_OR_NEWER;UNITY_2017_3_OR_NEWER;UNITY_2017_4_OR_NEWER;UNITY_2018_1_OR_NEWER;UNITY_2018_2_OR_NEWER;UNITY_2018_3_OR_NEWER;UNITY_2018_4_OR_NEWER;UNITY_2019_1_OR_NEWER;UNITY_2019_2_OR_NEWER;UNITY_2019_3_OR_NEWER;UNITY_2019_4_OR_NEWER;UNITY_2020_1_OR_NEWER;UNITY_2020_2_OR_NEWER;UNITY_2020_3_OR_NEWER;UNITY_2021_1_OR_NEWER;UNITY_2021_2_OR_NEWER;UNITY_2021_3_OR_NEWER;UNITY_2022_1_OR_NEWER;UNITY_2022_2_OR_NEWER;UNITY_2022_3_OR_NEWER;UNITY_2023_1_OR_NEWER;UNITY_2023_2_OR_NEWER;UNITY_2023_3_OR_NEWER;UNITY_6000_0_OR_NEWER;UNITY_6000_1_OR_NEWER;UNITY_6000_2_OR_NEWER;UNITY_6000_3_OR_NEWER;UNITY_6000_4_OR_NEWER;PLATFORM_ARCH_64;UNITY_64;UNITY_INCLUDE_TESTS;ENABLE_AR;ENABLE_AUDIO;ENABLE_AUDIO_SCRIPTABLE_PIPELINE;ENABLE_CACHING;ENABLE_CLOTH;ENABLE_EVENT_QUEUE;ENABLE_MICROPHONE;ENABLE_MULTIPLE_DISPLAYS;ENABLE_PHYSICS;ENABLE_TEXTURE_STREAMING;ENABLE_VIRTUALTEXTURING;ENABLE_LZMA;ENABLE_UNITYEVENTS;ENABLE_VR;ENABLE_WEBCAM;ENABLE_UNITYWEBREQUEST;ENABLE_WWW;ENABLE_CLOUD_SERVICES;ENABLE_CLOUD_SERVICES_ADS;ENABLE_CLOUD_SERVICES_USE_WEBREQUEST;ENABLE_UNITY_CONSENT;ENABLE_UNITY_CLOUD_IDENTIFIERS;ENABLE_CLOUD_SERVICES_CRASH_REPORTING;ENABLE_CLOUD_SERVICES_NATIVE_CRASH_REPORTING;ENABLE_CLOUD_SERVICES_PURCHASING;ENABLE_CLOUD_SERVICES_ANALYTICS;ENABLE_CLOUD_SERVICES_BUILD;ENABLE_EDITOR_GAME_SERVICES;ENABLE_UNITY_GAME_SERVICES_ANALYTICS_SUPPORT;ENABLE_CLOUD_LICENSE;ENABLE_EDITOR_HUB_LICENSE;ENABLE_WEBSOCKET_CLIENT;ENABLE_GENERATE_NATIVE_PLUGINS_FOR_ASSEMBLIES_API;ENABLE_DIRECTOR_AUDIO;ENABLE_DIRECTOR_TEXTURE;ENABLE_MANAGED_JOBS;ENABLE_MANAGED_TRANSFORM_JOBS;ENABLE_MANAGED_ANIMATION_JOBS;ENABLE_MANAGED_AUDIO_JOBS;ENABLE_MANAGED_UNITYTLS;INCLUDE_DYNAMIC_GI;ENABLE_SCRIPTING_GC_WBARRIERS;PLATFORM_SUPPORTS_MONO;RENDER_SOFTWARE_CURSOR;ENABLE_MARSHALLING_TESTS;ENABLE_VIDEO;ENABLE_NAVIGATION_OFFMESHLINK_TO_NAVMESHLINK;ENABLE_ACCELERATOR_CLIENT_DEBUGGING;ENABLE_ACCESSIBILITY_SCREEN_READER;TEXTCORE_1_0_OR_NEWER;EDITOR_ONLY_NAVMESH_BUILDER_DEPRECATED;PLATFORM_STANDALONE_WIN;PLATFORM_STANDALONE;UNITY_STANDALONE_WIN;UNITY_STANDALONE;ENABLE_RUNTIME_GI;ENABLE_MOVIES;ENABLE_NETWORK;ENABLE_NVIDIA;ENABLE_AMD;ENABLE_CRUNCH_TEXTURE_COMPRESSION;ENABLE_CLOUD_SERVICES_ENGINE_DIAGNOSTICS;ENABLE_OUT_OF_PROCESS_CRASH_HANDLER;ENABLE_CLUSTER_SYNC;ENABLE_CLUSTERINPUT;PLATFORM_UPDATES_TIME_OUTSIDE_OF_PLAYER_LOOP;GFXDEVICE_WAITFOREVENT_MESSAGEPUMP;PLATFORM_USES_EXPLICIT_MEMORY_MANAGER_INITIALIZER;PLATFORM_SUPPORTS_WAIT_FOR_PRESENTATION;PLATFORM_SUPPORTS_SPLIT_GRAPHICS_JOBS;ENABLE_MONO;NET_STANDARD_2_0;NET_STANDARD;NET_STANDARD_2_1;NETSTANDARD;NETSTANDARD2_1;ENABLE_PROFILER;ENABLE_PROFILER_ASSISTANT_INTEGRATION;DEBUG;TRACE;UNITY_ASSERTIONS;UNITY_EDITOR;UNITY_EDITOR_64;UNITY_EDITOR_WIN;ENABLE_UNITY_COLLECTIONS_CHECKS;ENABLE_BURST_AOT;UNITY_TEAM_LICENSE;ENABLE_CUSTOM_RENDER_TEXTURE;ENABLE_DIRECTOR;ENABLE_LOCALIZATION;ENABLE_SPRITES;ENABLE_TERRAIN;ENABLE_TILEMAP;ENABLE_TIMELINE;ENABLE_INPUT_SYSTEM;ENABLE_LEGACY_INPUT_MANAGER;TEXTCORE_FONT_ENGINE_1_5_OR_NEWER;TEXTCORE_TEXT_ENGINE_1_5_OR_NEWER;TEXTCORE_FONT_ENGINE_1_6_OR_NEWER;SENTIS_ANALYTICS_ENABLED;APP_UI_EDITOR_ONLY;CSHARP_7_OR_LATER;CSHARP_7_3_OR_NEWER prompt 4 0169,0649 @@ -98,6 +98,7 @@ + diff --git a/Assets/Scenes/SampleScene.unity b/Assets/Scenes/SampleScene.unity index f69717e..f88ff3e 100644 --- a/Assets/Scenes/SampleScene.unity +++ b/Assets/Scenes/SampleScene.unity @@ -928,9 +928,9 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: bulletPrefab: {fileID: 64532214264549638, guid: 2ad92b831082deb4d950dc3d3e01c7b0, type: 3} - damage: 1 + damage: 2 fireRate: 1 - attackRange: 10 + attackRange: 6 extraBullets: 0 homingEnabled: 0 ricochetEnabled: 0 diff --git a/Assets/Scripts/EnemyHealth.cs b/Assets/Scripts/EnemyHealth.cs index 582c3af..f5f6d41 100644 --- a/Assets/Scripts/EnemyHealth.cs +++ b/Assets/Scripts/EnemyHealth.cs @@ -128,7 +128,9 @@ public class EnemyHealth : MonoBehaviour text.text = damage.ToString(); text.fontSize = 3.1f; text.alignment = TextAlignmentOptions.Center; - text.color = Color.white; + text.color = GetDamageTakenMultiplier() > 1f + ? new Color(0.4f, 0.9f, 1f, 1f) + : new Color(1f, 0.88f, 0.58f, 1f); text.sortingOrder = 50; textObject.AddComponent().Configure(0.75f, new Vector3(0f, 0.58f, 0f)); } diff --git a/Assets/Scripts/EnemySpawner.cs b/Assets/Scripts/EnemySpawner.cs index 9947517..7cd0d53 100644 --- a/Assets/Scripts/EnemySpawner.cs +++ b/Assets/Scripts/EnemySpawner.cs @@ -20,12 +20,12 @@ public class EnemySpawner : MonoBehaviour private bool isSpawning = false; private bool stageComplete = false; private int enemiesRemaining = 0; - private int baseEnemyCount = 5; - private int enemyCountIncrease = 3; - private float enemySpeed = 1.16f; + private int baseEnemyCount = 9; + private int enemyCountIncrease = 5; + private float enemySpeed = 1.05f; private int enemyBaseHP = 1; - private float maxEnemySpeed = 6f; - private int maxEnemyHP = 20; + private float maxEnemySpeed = 5.2f; + private int maxEnemyHP = 32; private RectTransform bossHealthBar; private Image bossHealthFill; private TextMeshProUGUI bossHealthText; @@ -60,7 +60,7 @@ public class EnemySpawner : MonoBehaviour for (int i = 0; i < enemiesToSpawn; i++) { SpawnEnemy(false); - yield return new WaitForSeconds(1f); + yield return new WaitForSeconds(0.72f); } if (IsBossWave(currentWave)) @@ -79,8 +79,8 @@ public class EnemySpawner : MonoBehaviour Enemy enemyComponent = newEnemy.GetComponent(); if (enemyComponent != null) { - float waveSpeedBonus = currentWave * 0.028f; - float stageSpeedBonus = (currentStage - 1) * 0.025f; + float waveSpeedBonus = currentWave * 0.022f; + float stageSpeedBonus = (currentStage - 1) * 0.018f; enemyComponent.speed = Mathf.Min(maxEnemySpeed, enemySpeed + waveSpeedBonus + stageSpeedBonus); if (boss) enemyComponent.speed *= 0.72f; @@ -89,9 +89,11 @@ public class EnemySpawner : MonoBehaviour EnemyHealth enemyHealth = newEnemy.GetComponent(); if (enemyHealth != null) { - int scaledHP = enemyBaseHP + Mathf.FloorToInt(currentWave * 0.14f) + Mathf.FloorToInt((currentStage - 1) * 0.25f); + int scaledHP = enemyBaseHP + + Mathf.RoundToInt((currentWave - 1) * 0.15f) + + Mathf.RoundToInt((currentStage - 1) * 0.45f); if (boss) - scaledHP = Mathf.RoundToInt((scaledHP + currentStage + currentWave * 0.48f) * 3.05f); + scaledHP = Mathf.RoundToInt((scaledHP + currentStage + currentWave * 0.4f) * 2.6f); scaledHP = Mathf.Min(boss ? maxEnemyHP * 4 : maxEnemyHP, scaledHP); enemyHealth.SetHealth(scaledHP); @@ -131,7 +133,7 @@ public class EnemySpawner : MonoBehaviour if (roll < fastChance) { enemyObject.name = "Fast Enemy"; - enemyComponent.speed *= 1.65f; + enemyComponent.speed *= 1.55f; enemyObject.transform.localScale *= 0.82f; if (spriteRenderer != null) spriteRenderer.color = new Color(0.35f, 0.78f, 1f, 1f); @@ -141,7 +143,7 @@ public class EnemySpawner : MonoBehaviour enemyObject.name = "Tank Enemy"; enemyComponent.speed *= 0.62f; enemyObject.transform.localScale *= 1.32f; - enemyHealth.SetHealth(Mathf.Max(2, Mathf.RoundToInt(enemyHealth.GetCurrentHealth() * 2.35f))); + enemyHealth.SetHealth(Mathf.Max(2, Mathf.RoundToInt(enemyHealth.GetCurrentHealth() * 1.8f))); if (spriteRenderer != null) spriteRenderer.color = new Color(0.78f, 0.56f, 0.28f, 1f); } @@ -246,7 +248,7 @@ public class EnemySpawner : MonoBehaviour if (bossHealthFill != null) { bossHealthFill.fillAmount = 1f; - bossHealthFill.color = Color.Lerp(new Color(0.55f, 0.05f, 0.06f, 1f), new Color(0.95f, 0.2f, 0.18f, 1f), percent); + bossHealthFill.color = Color.Lerp(new Color(0.48f, 0.035f, 0.055f, 1f), UITheme.Red, percent); RectTransform fillRect = bossHealthFill.rectTransform; fillRect.anchorMax = new Vector2(percent, fillRect.anchorMax.y); fillRect.offsetMax = Vector2.zero; @@ -284,10 +286,12 @@ public class EnemySpawner : MonoBehaviour rect.SetAsLastSibling(); Image background = overlay.GetComponent(); - background.color = new Color(0f, 0f, 0f, 0.78f); + background.color = new Color(0.005f, 0.012f, 0.022f, 0.9f); background.raycastTarget = true; - TextMeshProUGUI title = CreateOverlayText("Title", rect, "YOU WIN", 46f, FontStyles.Bold); + UITheme.AddAccent(rect, "VictoryLine", UITheme.Green, new Vector2(0.5f, 0.5f), new Vector2(0.5f, 0.5f), new Vector2(-220f, 118f), new Vector2(220f, 121f)); + TextMeshProUGUI title = CreateOverlayText("Title", rect, "STAGE SECURED", 46f, FontStyles.Bold); + title.color = UITheme.Green; PlaceOverlayRect(title.rectTransform, 0f, 76f, 420f, 70f); TextMeshProUGUI subtitle = CreateOverlayText("Subtitle", rect, $"Stage {currentStage} complete. Stage {nextStage} unlocked.", 20f, FontStyles.Normal); @@ -296,7 +300,7 @@ public class EnemySpawner : MonoBehaviour if (unlockedTeslaTower) { TextMeshProUGUI unlockText = CreateOverlayText("UnlockText", rect, "You unlocked: Tesla Tower", 22f, FontStyles.Bold); - unlockText.color = new Color(0.52f, 0.86f, 1f, 1f); + unlockText.color = UITheme.CyanBright; PlaceOverlayRect(unlockText.rectTransform, 0f, -14f, 520f, 42f); } @@ -331,7 +335,8 @@ public class EnemySpawner : MonoBehaviour Image panel = bossHealthBar.GetComponent(); if (panel == null) panel = bossHealthBar.gameObject.AddComponent(); - panel.color = new Color(0.05f, 0.03f, 0.035f, 0.88f); + UITheme.StylePanel(panel, new Color(0.12f, 0.035f, 0.05f, 0.94f), new Color(0.9f, 0.18f, 0.22f, 0.9f)); + UITheme.AddTopAccent(bossHealthBar, UITheme.Red, 3f); RectTransform track = bossHealthBar.Find("Track")?.GetComponent(); if (track == null) @@ -343,7 +348,7 @@ public class EnemySpawner : MonoBehaviour track.anchoredPosition = new Vector2(0f, 8f); track.sizeDelta = new Vector2(-24f, 16f); Image trackImage = track.gameObject.AddComponent(); - trackImage.color = new Color(0.16f, 0.08f, 0.08f, 1f); + trackImage.color = new Color(0.2f, 0.06f, 0.08f, 1f); } bossHealthFill = track.Find("Fill")?.GetComponent(); @@ -397,7 +402,8 @@ public class EnemySpawner : MonoBehaviour panel.sizeDelta = new Vector2(150f, 42f); Image panelImage = panelObject.GetComponent(); - panelImage.color = new Color(0.05f, 0.06f, 0.08f, 0.84f); + UITheme.StylePanel(panelImage, UITheme.Panel, UITheme.Border); + UITheme.AddTopAccent(panel, UITheme.Cyan, 3f); GameObject textObject = new GameObject("Text", typeof(RectTransform), typeof(CanvasRenderer), typeof(TextMeshProUGUI)); RectTransform textRect = textObject.GetComponent(); @@ -411,7 +417,7 @@ public class EnemySpawner : MonoBehaviour waveText.alignment = TextAlignmentOptions.Center; waveText.fontSize = 21f; waveText.fontStyle = FontStyles.Bold; - waveText.color = new Color(0.92f, 0.95f, 1f, 1f); + waveText.color = UITheme.Text; waveText.raycastTarget = false; } @@ -433,17 +439,10 @@ public class EnemySpawner : MonoBehaviour Image image = startWaveButton.GetComponent(); if (image != null) { - image.color = new Color(0.2f, 0.66f, 0.9f, 1f); + image.color = new Color(0.08f, 0.42f, 0.61f, 1f); } - ColorBlock colors = startWaveButton.colors; - colors.normalColor = new Color(0.2f, 0.66f, 0.9f, 1f); - colors.highlightedColor = new Color(0.33f, 0.78f, 1f, 1f); - colors.pressedColor = new Color(0.12f, 0.48f, 0.7f, 1f); - colors.selectedColor = colors.highlightedColor; - colors.disabledColor = new Color(0.18f, 0.22f, 0.27f, 0.7f); - colors.colorMultiplier = 1f; - startWaveButton.colors = colors; + UITheme.StyleButton(startWaveButton); TextMeshProUGUI label = startWaveButton.GetComponentInChildren(); if (label != null) @@ -467,7 +466,7 @@ public class EnemySpawner : MonoBehaviour label.fontSize = fontSize; label.fontStyle = style; label.alignment = TextAlignmentOptions.Center; - label.color = new Color(0.94f, 0.96f, 1f, 1f); + UITheme.StyleText(label); label.textWrappingMode = TextWrappingModes.Normal; label.raycastTarget = false; return label; @@ -479,18 +478,8 @@ public class EnemySpawner : MonoBehaviour RectTransform rect = obj.GetComponent(); rect.SetParent(parent, false); - Image image = obj.GetComponent(); - image.color = new Color(0.18f, 0.5f, 0.74f, 1f); - Button button = obj.GetComponent