diff --git a/.vs/CSharpMainProject/CopilotIndices/17.14.1681.23550/CodeChunks.db b/.vs/CSharpMainProject/CopilotIndices/17.14.1681.23550/CodeChunks.db new file mode 100644 index 000000000..a4acf08e7 Binary files /dev/null and b/.vs/CSharpMainProject/CopilotIndices/17.14.1681.23550/CodeChunks.db differ diff --git a/.vs/CSharpMainProject/CopilotIndices/17.14.1681.23550/SemanticSymbols.db b/.vs/CSharpMainProject/CopilotIndices/17.14.1681.23550/SemanticSymbols.db new file mode 100644 index 000000000..80ca73f9d Binary files /dev/null and b/.vs/CSharpMainProject/CopilotIndices/17.14.1681.23550/SemanticSymbols.db differ diff --git a/.vs/CSharpMainProject/FileContentIndex/df81d464-3db8-48cd-bfab-ddb30908c9d8.vsidx b/.vs/CSharpMainProject/FileContentIndex/df81d464-3db8-48cd-bfab-ddb30908c9d8.vsidx new file mode 100644 index 000000000..d09987496 Binary files /dev/null and b/.vs/CSharpMainProject/FileContentIndex/df81d464-3db8-48cd-bfab-ddb30908c9d8.vsidx differ diff --git a/.vs/CSharpMainProject/v17/.suo b/.vs/CSharpMainProject/v17/.suo new file mode 100644 index 000000000..21c26bf4e Binary files /dev/null and b/.vs/CSharpMainProject/v17/.suo differ diff --git a/.vs/CSharpMainProject/v17/DocumentLayout.backup.json b/.vs/CSharpMainProject/v17/DocumentLayout.backup.json new file mode 100644 index 000000000..78337aa38 --- /dev/null +++ b/.vs/CSharpMainProject/v17/DocumentLayout.backup.json @@ -0,0 +1,89 @@ +{ + "Version": 1, + "WorkspaceRootPath": "D:\\vs\\repos\\CSharpMainProject\\", + "Documents": [ + { + "AbsoluteMoniker": "D:0:0:{6BA3E430-C1DB-B53E-7C27-41F2EDC2C301}|Root.csproj|d:\\vs\\repos\\csharpmainproject\\assets\\scripts\\unitbrains\\player\\secondunitbrain.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{6BA3E430-C1DB-B53E-7C27-41F2EDC2C301}|Root.csproj|solutionrelative:assets\\scripts\\unitbrains\\player\\secondunitbrain.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{30E4A36B-DBC1-3EB5-7C27-41F2EDC2C301}|Root.csproj|D:\\vs\\repos\\CSharpMainProject\\assets\\scripts\\unitbrains\\baseunitbrain.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{30E4A36B-DBC1-3EB5-7C27-41F2EDC2C301}|Root.csproj|solutionrelative:assets\\scripts\\unitbrains\\baseunitbrain.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{30E4A36B-DBC1-3EB5-7C27-41F2EDC2C301}|Root.csproj|D:\\vs\\repos\\CSharpMainProject\\assets\\scripts\\enterpoint.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{30E4A36B-DBC1-3EB5-7C27-41F2EDC2C301}|Root.csproj|solutionrelative:assets\\scripts\\enterpoint.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{30E4A36B-DBC1-3EB5-7C27-41F2EDC2C301}|Root.csproj|D:\\vs\\repos\\CSharpMainProject\\assets\\scripts\\controller\\botcontroller.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{30E4A36B-DBC1-3EB5-7C27-41F2EDC2C301}|Root.csproj|solutionrelative:assets\\scripts\\controller\\botcontroller.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + } + ], + "DocumentGroupContainers": [ + { + "Orientation": 0, + "VerticalTabListWidth": 256, + "DocumentGroups": [ + { + "DockedWidth": 200, + "SelectedChildIndex": 0, + "Children": [ + { + "$type": "Document", + "DocumentIndex": 0, + "Title": "SecondUnitBrain.cs", + "DocumentMoniker": "D:\\vs\\repos\\CSharpMainProject\\Assets\\Scripts\\UnitBrains\\Player\\SecondUnitBrain.cs", + "RelativeDocumentMoniker": "Assets\\Scripts\\UnitBrains\\Player\\SecondUnitBrain.cs", + "ToolTip": "D:\\vs\\repos\\CSharpMainProject\\Assets\\Scripts\\UnitBrains\\Player\\SecondUnitBrain.cs", + "RelativeToolTip": "Assets\\Scripts\\UnitBrains\\Player\\SecondUnitBrain.cs", + "ViewState": "AgIAAAAAAAAAAAAAAAAAABkAAAA5AAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2026-05-29T18:10:42.58Z", + "EditorCaption": "" + }, + { + "$type": "Document", + "DocumentIndex": 1, + "Title": "BaseUnitBrain.cs", + "DocumentMoniker": "D:\\vs\\repos\\CSharpMainProject\\Assets\\Scripts\\UnitBrains\\BaseUnitBrain.cs", + "RelativeDocumentMoniker": "Assets\\Scripts\\UnitBrains\\BaseUnitBrain.cs", + "ToolTip": "D:\\vs\\repos\\CSharpMainProject\\Assets\\Scripts\\UnitBrains\\BaseUnitBrain.cs", + "RelativeToolTip": "Assets\\Scripts\\UnitBrains\\BaseUnitBrain.cs", + "ViewState": "AgIAADkAAAAAAAAAAAAqwFUAAAAhAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2026-05-29T18:17:16.686Z" + }, + { + "$type": "Bookmark", + "Name": "ST:0:0:{cce594b6-0c39-4442-ba28-10c64ac7e89f}" + }, + { + "$type": "Document", + "DocumentIndex": 2, + "Title": "EnterPoint.cs", + "DocumentMoniker": "D:\\vs\\repos\\CSharpMainProject\\Assets\\Scripts\\EnterPoint.cs", + "RelativeDocumentMoniker": "Assets\\Scripts\\EnterPoint.cs", + "ToolTip": "D:\\vs\\repos\\CSharpMainProject\\Assets\\Scripts\\EnterPoint.cs", + "RelativeToolTip": "Assets\\Scripts\\EnterPoint.cs", + "ViewState": "AgIAAAAAAAAAAAAAAAAAAAwAAAAgAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2026-05-29T10:13:09.37Z" + }, + { + "$type": "Document", + "DocumentIndex": 3, + "Title": "BotController.cs", + "DocumentMoniker": "D:\\vs\\repos\\CSharpMainProject\\Assets\\Scripts\\Controller\\BotController.cs", + "RelativeDocumentMoniker": "Assets\\Scripts\\Controller\\BotController.cs", + "ToolTip": "D:\\vs\\repos\\CSharpMainProject\\Assets\\Scripts\\Controller\\BotController.cs", + "RelativeToolTip": "Assets\\Scripts\\Controller\\BotController.cs", + "ViewState": "AgIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2026-05-29T10:06:43.639Z" + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/.vs/CSharpMainProject/v17/DocumentLayout.json b/.vs/CSharpMainProject/v17/DocumentLayout.json new file mode 100644 index 000000000..78337aa38 --- /dev/null +++ b/.vs/CSharpMainProject/v17/DocumentLayout.json @@ -0,0 +1,89 @@ +{ + "Version": 1, + "WorkspaceRootPath": "D:\\vs\\repos\\CSharpMainProject\\", + "Documents": [ + { + "AbsoluteMoniker": "D:0:0:{6BA3E430-C1DB-B53E-7C27-41F2EDC2C301}|Root.csproj|d:\\vs\\repos\\csharpmainproject\\assets\\scripts\\unitbrains\\player\\secondunitbrain.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{6BA3E430-C1DB-B53E-7C27-41F2EDC2C301}|Root.csproj|solutionrelative:assets\\scripts\\unitbrains\\player\\secondunitbrain.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{30E4A36B-DBC1-3EB5-7C27-41F2EDC2C301}|Root.csproj|D:\\vs\\repos\\CSharpMainProject\\assets\\scripts\\unitbrains\\baseunitbrain.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{30E4A36B-DBC1-3EB5-7C27-41F2EDC2C301}|Root.csproj|solutionrelative:assets\\scripts\\unitbrains\\baseunitbrain.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{30E4A36B-DBC1-3EB5-7C27-41F2EDC2C301}|Root.csproj|D:\\vs\\repos\\CSharpMainProject\\assets\\scripts\\enterpoint.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{30E4A36B-DBC1-3EB5-7C27-41F2EDC2C301}|Root.csproj|solutionrelative:assets\\scripts\\enterpoint.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{30E4A36B-DBC1-3EB5-7C27-41F2EDC2C301}|Root.csproj|D:\\vs\\repos\\CSharpMainProject\\assets\\scripts\\controller\\botcontroller.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{30E4A36B-DBC1-3EB5-7C27-41F2EDC2C301}|Root.csproj|solutionrelative:assets\\scripts\\controller\\botcontroller.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + } + ], + "DocumentGroupContainers": [ + { + "Orientation": 0, + "VerticalTabListWidth": 256, + "DocumentGroups": [ + { + "DockedWidth": 200, + "SelectedChildIndex": 0, + "Children": [ + { + "$type": "Document", + "DocumentIndex": 0, + "Title": "SecondUnitBrain.cs", + "DocumentMoniker": "D:\\vs\\repos\\CSharpMainProject\\Assets\\Scripts\\UnitBrains\\Player\\SecondUnitBrain.cs", + "RelativeDocumentMoniker": "Assets\\Scripts\\UnitBrains\\Player\\SecondUnitBrain.cs", + "ToolTip": "D:\\vs\\repos\\CSharpMainProject\\Assets\\Scripts\\UnitBrains\\Player\\SecondUnitBrain.cs", + "RelativeToolTip": "Assets\\Scripts\\UnitBrains\\Player\\SecondUnitBrain.cs", + "ViewState": "AgIAAAAAAAAAAAAAAAAAABkAAAA5AAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2026-05-29T18:10:42.58Z", + "EditorCaption": "" + }, + { + "$type": "Document", + "DocumentIndex": 1, + "Title": "BaseUnitBrain.cs", + "DocumentMoniker": "D:\\vs\\repos\\CSharpMainProject\\Assets\\Scripts\\UnitBrains\\BaseUnitBrain.cs", + "RelativeDocumentMoniker": "Assets\\Scripts\\UnitBrains\\BaseUnitBrain.cs", + "ToolTip": "D:\\vs\\repos\\CSharpMainProject\\Assets\\Scripts\\UnitBrains\\BaseUnitBrain.cs", + "RelativeToolTip": "Assets\\Scripts\\UnitBrains\\BaseUnitBrain.cs", + "ViewState": "AgIAADkAAAAAAAAAAAAqwFUAAAAhAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2026-05-29T18:17:16.686Z" + }, + { + "$type": "Bookmark", + "Name": "ST:0:0:{cce594b6-0c39-4442-ba28-10c64ac7e89f}" + }, + { + "$type": "Document", + "DocumentIndex": 2, + "Title": "EnterPoint.cs", + "DocumentMoniker": "D:\\vs\\repos\\CSharpMainProject\\Assets\\Scripts\\EnterPoint.cs", + "RelativeDocumentMoniker": "Assets\\Scripts\\EnterPoint.cs", + "ToolTip": "D:\\vs\\repos\\CSharpMainProject\\Assets\\Scripts\\EnterPoint.cs", + "RelativeToolTip": "Assets\\Scripts\\EnterPoint.cs", + "ViewState": "AgIAAAAAAAAAAAAAAAAAAAwAAAAgAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2026-05-29T10:13:09.37Z" + }, + { + "$type": "Document", + "DocumentIndex": 3, + "Title": "BotController.cs", + "DocumentMoniker": "D:\\vs\\repos\\CSharpMainProject\\Assets\\Scripts\\Controller\\BotController.cs", + "RelativeDocumentMoniker": "Assets\\Scripts\\Controller\\BotController.cs", + "ToolTip": "D:\\vs\\repos\\CSharpMainProject\\Assets\\Scripts\\Controller\\BotController.cs", + "RelativeToolTip": "Assets\\Scripts\\Controller\\BotController.cs", + "ViewState": "AgIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2026-05-29T10:06:43.639Z" + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Assets/Scripts/UnitBrains/Player/SecondUnitBrain.cs b/Assets/Scripts/UnitBrains/Player/SecondUnitBrain.cs index c2c80e989..872f6be33 100644 --- a/Assets/Scripts/UnitBrains/Player/SecondUnitBrain.cs +++ b/Assets/Scripts/UnitBrains/Player/SecondUnitBrain.cs @@ -12,18 +12,30 @@ public class SecondUnitBrain : DefaultPlayerUnitBrain private float _temperature = 0f; private float _cooldownTime = 0f; private bool _overheated; - + protected override void GenerateProjectiles(Vector2Int forTarget, List intoList) { - float overheatTemperature = OverheatTemperature; /////////////////////////////////////// // Homework 1.3 (1st block, 3rd module) - /////////////////////////////////////// + + if (GetTemperature() >= OverheatTemperature) + { + return; + } + var projectile = CreateProjectile(forTarget); AddProjectileToList(projectile, intoList); - /////////////////////////////////////// + + for (int i = 0; i < GetTemperature(); i++) + { + projectile = CreateProjectile(forTarget); + AddProjectileToList(projectile, intoList); + } + + IncreaseTemperature(); } + public override Vector2Int GetNextStep() { return base.GetNextStep();