Skip to content

Commit db596c6

Browse files
committed
Added new level
1 parent 956a731 commit db596c6

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+11938
-169
lines changed

Assembly-CSharp-Editor-firstpass.csproj

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -293,8 +293,8 @@
293293
<Reference Include="UnityEditor.WindowsStandalone.Extensions">
294294
<HintPath>C:/Program Files/Unity/Hub/Editor/2020.1.3f1/Editor/Data/PlaybackEngines/WindowsStandaloneSupport/UnityEditor.WindowsStandalone.Extensions.dll</HintPath>
295295
</Reference>
296-
<Reference Include="System.Drawing.Common">
297-
<HintPath>E:/DATA/[Data]/Repozytoria/simulation/Assets/System.Drawing.Common.dll</HintPath>
296+
<Reference Include="System.Drawing">
297+
<HintPath>E:/DATA/[Data]/Repozytoria/simulation/Assets/System.Drawing.dll</HintPath>
298298
</Reference>
299299
<Reference Include="NugetForUnity">
300300
<HintPath>E:/DATA/[Data]/Repozytoria/simulation/Assets/NuGet/Editor/NugetForUnity.dll</HintPath>
@@ -317,9 +317,6 @@
317317
<Reference Include="YamlDotNet">
318318
<HintPath>E:/DATA/[Data]/Repozytoria/simulation/Assets/Packages/YamlDotNet.11.1.1/lib/net45/YamlDotNet.dll</HintPath>
319319
</Reference>
320-
<Reference Include="System.Drawing">
321-
<HintPath>E:/DATA/[Data]/Repozytoria/simulation/Assets/System.Drawing.dll</HintPath>
322-
</Reference>
323320
<Reference Include="nunit.framework">
324321
<HintPath>E:/DATA/[Data]/Repozytoria/simulation/Library/PackageCache/[email protected]/net35/unity-custom/nunit.framework.dll</HintPath>
325322
</Reference>

Assembly-CSharp-firstpass.csproj

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -399,8 +399,8 @@
399399
<Reference Include="UnityEditor">
400400
<HintPath>C:/Program Files/Unity/Hub/Editor/2020.1.3f1/Editor/Data/Managed/UnityEditor.dll</HintPath>
401401
</Reference>
402-
<Reference Include="System.Drawing.Common">
403-
<HintPath>E:/DATA/[Data]/Repozytoria/simulation/Assets/System.Drawing.Common.dll</HintPath>
402+
<Reference Include="System.Drawing">
403+
<HintPath>E:/DATA/[Data]/Repozytoria/simulation/Assets/System.Drawing.dll</HintPath>
404404
</Reference>
405405
<Reference Include="System.Buffers">
406406
<HintPath>E:/DATA/[Data]/Repozytoria/simulation/Assets/Packages/System.Buffers.4.5.1/lib/net461/System.Buffers.dll</HintPath>
@@ -420,9 +420,6 @@
420420
<Reference Include="YamlDotNet">
421421
<HintPath>E:/DATA/[Data]/Repozytoria/simulation/Assets/Packages/YamlDotNet.11.1.1/lib/net45/YamlDotNet.dll</HintPath>
422422
</Reference>
423-
<Reference Include="System.Drawing">
424-
<HintPath>E:/DATA/[Data]/Repozytoria/simulation/Assets/System.Drawing.dll</HintPath>
425-
</Reference>
426423
<Reference Include="mscorlib">
427424
<HintPath>C:/Program Files/Unity/Hub/Editor/2020.1.3f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/mscorlib.dll</HintPath>
428425
</Reference>

Assembly-CSharp.csproj

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@
6060
<Compile Include="Assets\Code\Scripts\Simulation\WAPIClient.cs" />
6161
<Compile Include="Assets\Code\Scripts\Simulation\FinishZoneController.cs" />
6262
<Compile Include="Assets\Code\Scripts\Utility\Config.cs" />
63+
<Compile Include="Assets\Code\Scripts\Simulation\ExplosionController.cs" />
6364
<Compile Include="Assets\Code\Scripts\DatasetGeneration\DetectionRectDraw.cs" />
6465
<Compile Include="Assets\Code\Scripts\Simulation\WaterBehaviour.cs" />
6566
<Compile Include="Assets\Code\Scripts\Start\LoggerController.cs" />
@@ -79,6 +80,7 @@
7980
<Compile Include="Assets\Design\Scenes\SampleScenes\Menu\Scripts\MenuSceneLoader.cs" />
8081
<Compile Include="Assets\Design\Scenes\SampleScenes\Scripts\PlaceTargetWithMouse.cs" />
8182
<Compile Include="Assets\Code\Scripts\Utility\Settings.cs" />
83+
<Compile Include="Assets\Code\Scripts\Simulation\TorpedoController.cs" />
8284
<Compile Include="Assets\Code\Scripts\DatasetGeneration\DatasetObjectInfo.cs" />
8385
<Compile Include="Assets\Code\Scripts\Simulation\JSON.cs" />
8486
<Compile Include="Assets\Code\Scripts\Simulation\Robot\RobotController.cs" />
@@ -98,7 +100,6 @@
98100
<None Include="Assets\Packages\YamlDotNet.11.1.1\lib\net45\YamlDotNet.xml" />
99101
<None Include="Assets\Packages\System.Memory.4.5.4\lib\net461\System.Memory.xml" />
100102
<None Include="Assets\Packages\System.Runtime.CompilerServices.Unsafe.4.5.3\useSharedDesignerContext.txt" />
101-
<None Include="Assets\Packages\System.Drawing.Common.6.0.0\lib\net461\System.Drawing.Common.xml" />
102103
<None Include="Assets\Packages\Microsoft.NETCore.Targets.1.1.0\dotnet_library_license.txt" />
103104
<None Include="Assets\Packages\System.Threading.Tasks.4.3.0\ThirdPartyNotices.txt" />
104105
<None Include="Assets\Packages\System.Threading.Tasks.4.3.0\dotnet_library_license.txt" />
@@ -107,7 +108,6 @@
107108
<None Include="Assets\Packages\System.ValueTuple.4.4.0\useSharedDesignerContext.txt" />
108109
<None Include="Assets\Packages\System.IO.4.3.0\dotnet_library_license.txt" />
109110
<None Include="Assets\Packages\System.Runtime.CompilerServices.Unsafe.4.5.3\version.txt" />
110-
<None Include="Assets\Packages\System.Drawing.Common.6.0.0\useSharedDesignerContext.txt" />
111111
<None Include="Assets\Packages\System.Buffers.4.5.1\useSharedDesignerContext.txt" />
112112
<None Include="Assets\Packages\System.ValueTuple.4.4.0\version.txt" />
113113
<None Include="Assets\Packages\System.Text.Encoding.4.3.0\dotnet_library_license.txt" />
@@ -337,8 +337,8 @@
337337
<Reference Include="UnityEditor">
338338
<HintPath>C:/Program Files/Unity/Hub/Editor/2020.1.3f1/Editor/Data/Managed/UnityEditor.dll</HintPath>
339339
</Reference>
340-
<Reference Include="System.Drawing.Common">
341-
<HintPath>E:/DATA/[Data]/Repozytoria/simulation/Assets/System.Drawing.Common.dll</HintPath>
340+
<Reference Include="System.Drawing">
341+
<HintPath>E:/DATA/[Data]/Repozytoria/simulation/Assets/System.Drawing.dll</HintPath>
342342
</Reference>
343343
<Reference Include="System.Buffers">
344344
<HintPath>E:/DATA/[Data]/Repozytoria/simulation/Assets/Packages/System.Buffers.4.5.1/lib/net461/System.Buffers.dll</HintPath>
@@ -358,9 +358,6 @@
358358
<Reference Include="YamlDotNet">
359359
<HintPath>E:/DATA/[Data]/Repozytoria/simulation/Assets/Packages/YamlDotNet.11.1.1/lib/net45/YamlDotNet.dll</HintPath>
360360
</Reference>
361-
<Reference Include="System.Drawing">
362-
<HintPath>E:/DATA/[Data]/Repozytoria/simulation/Assets/System.Drawing.dll</HintPath>
363-
</Reference>
364361
<Reference Include="mscorlib">
365362
<HintPath>C:/Program Files/Unity/Hub/Editor/2020.1.3f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/mscorlib.dll</HintPath>
366363
</Reference>
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
using System.Collections;
2+
using System.Collections.Generic;
3+
using UnityEngine;
4+
5+
public class ExplosionController : MonoBehaviour
6+
{
7+
// Start is called before the first frame update
8+
void Start()
9+
{
10+
Debug.Log("explosioon");
11+
StartCoroutine(StartTimer());
12+
}
13+
14+
private IEnumerator StartTimer()
15+
{
16+
Debug.Log("waiting");
17+
yield return new WaitForSeconds(1);
18+
Debug.Log("destroyed");
19+
Destroy(gameObject);
20+
}
21+
}

Assets/Code/Scripts/Simulation/ExplosionController.cs.meta

Lines changed: 11 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Assets/Code/Scripts/Simulation/Robot/RobotController.cs

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ public class RobotController : MonoBehaviour
1515
[SerializeField] public Vector3 checkerRotation;
1616
public Rigidbody rb;
1717

18+
[SerializeField] public GameObject torpedo;
19+
1820
public Motor motorFLH, motorFLV, motorBLV, motorBLH, motorFRH, motorFRV, motorBRV, motorBRH;
1921
public Accelerometer accelerometer;
2022
public Gyroscope gyroscpe;
@@ -25,7 +27,7 @@ public class RobotController : MonoBehaviour
2527

2628
public ConcurrentQueue<Action> operations;
2729

28-
public bool motorsArmed = true;
30+
public bool motorsArmed = false;
2931
public string motorsControlMode = "stable";
3032
public PID pitchPID, rollPID, yawPID, depthPID;
3133
public Vector3 targetRotationSpeed = Vector3.zero;
@@ -127,6 +129,14 @@ void FixedUpdate()
127129
Module.FixedUpdateAll();
128130
}
129131

132+
public void SendTorpedo()
133+
{
134+
operations.Enqueue(() =>
135+
{
136+
Instantiate(torpedo, transform.TransformPoint(new Vector3(0,-0.04f,0.2f)), transform.rotation);
137+
});
138+
}
139+
130140
public void SetRawMotors(float FLH, float FLV, float BLV, float BLH, float FRH, float FRV, float BRV, float BRH)
131141
{
132142
if (!motorsArmed) return;

0 commit comments

Comments
 (0)