Skip to content

Commit a83839e

Browse files
committed
add ClearNavMesh on win condition
1 parent a3534c1 commit a83839e

11 files changed

+2169
-1499
lines changed

Assets/Scenes/SampleSceneRuntime.unity

+2,073-1,484
Large diffs are not rendered by default.
Binary file not shown.

Assets/Scenes/SampleSceneRuntime/NavMesh-NavNesh.asset.meta

-8
This file was deleted.

Assets/Scripts/ClearNavMesh.cs

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.Linq;
4+
using System.Text;
5+
using System.Threading.Tasks;
6+
using UnityEngine;
7+
8+
class ClearNavMesh: MonoBehaviour
9+
{
10+
[SerializeField]
11+
private NavMeshObstacle2d navMeshObstacle;
12+
13+
public NavMeshObstacle2d NevMeshObstacle { get => navMeshObstacle; set => navMeshObstacle = value; }
14+
15+
public void Clear()
16+
{
17+
navMeshObstacle.enabled = false;
18+
navMeshObstacle?.surface.RemoveData();
19+
}
20+
}

Assets/Scripts/ClearNavMesh.cs.meta

+11
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Assets/Scripts/Continue.cs

+3
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
11
using Assets.Scripts;
22
using UnityEngine;
3+
using UnityEngine.Events;
34
using UnityEngine.SceneManagement;
45

56
public class Continue : MonoBehaviour
67
{
78
public GameObject panel;
89
public GameObject score;
10+
public UnityEvent winConditionFire;
911

1012
// Start is called before the first frame update
1113
void Awake()
@@ -16,6 +18,7 @@ public void WinCondition()
1618
{
1719
panel.gameObject.SetActive(true);
1820
score.SendMessage("Stop", true);
21+
winConditionFire?.Invoke();
1922
}
2023

2124
// Update is called once per frame

Packages/manifest.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@
33
"com.unity.2d.sprite": "1.0.0",
44
"com.unity.2d.tilemap": "1.0.0",
55
"com.unity.2d.tilemap.extras": "https://github.com/Unity-Technologies/2d-extras.git#master",
6-
"com.unity.collab-proxy": "1.7.1",
6+
"com.unity.collab-proxy": "1.15.7",
77
"com.unity.ext.nunit": "1.0.6",
88
"com.unity.ide.rider": "2.0.7",
99
"com.unity.ide.visualstudio": "2.0.14",
1010
"com.unity.ide.vscode": "1.2.5",
11-
"com.unity.test-framework": "1.1.27",
11+
"com.unity.test-framework": "1.1.29",
1212
"com.unity.textmeshpro": "3.0.6",
1313
"com.unity.timeline": "1.4.8",
1414
"com.unity.ugui": "1.0.0",

Packages/packages-lock.json

+13-3
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,12 @@
2323
"hash": "d0b3154f95c33e91847c9532b340bbf53aeabb58"
2424
},
2525
"com.unity.collab-proxy": {
26-
"version": "1.7.1",
26+
"version": "1.15.7",
2727
"depth": 0,
2828
"source": "registry",
2929
"dependencies": {
30-
"com.unity.nuget.newtonsoft-json": "2.0.0"
30+
"com.unity.nuget.newtonsoft-json": "2.0.0",
31+
"com.unity.services.core": "1.0.1"
3132
},
3233
"url": "https://packages.unity.com"
3334
},
@@ -70,8 +71,17 @@
7071
"dependencies": {},
7172
"url": "https://packages.unity.com"
7273
},
74+
"com.unity.services.core": {
75+
"version": "1.0.1",
76+
"depth": 1,
77+
"source": "registry",
78+
"dependencies": {
79+
"com.unity.modules.unitywebrequest": "1.0.0"
80+
},
81+
"url": "https://packages.unity.com"
82+
},
7383
"com.unity.test-framework": {
74-
"version": "1.1.27",
84+
"version": "1.1.29",
7585
"depth": 0,
7686
"source": "registry",
7787
"dependencies": {

ProjectSettings/EditorBuildSettings.asset

+3
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,7 @@ EditorBuildSettings:
2020
- enabled: 1
2121
path: Assets/Scenes/SampleSceneNoTileMap.unity
2222
guid: 3d5a83a03ebfcbd45bc258409f297f5e
23+
- enabled: 1
24+
path: Assets/Scenes/SampleSceneRuntime.unity
25+
guid: de86a38ac98734846b15e20dbcac0741
2326
m_configObjects: {}

ProjectSettings/ProjectVersion.txt

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
m_EditorVersion: 2020.3.17f1
2-
m_EditorVersionWithRevision: 2020.3.17f1 (a4537701e4ab)
1+
m_EditorVersion: 2020.3.28f1
2+
m_EditorVersionWithRevision: 2020.3.28f1 (f5400f52e03f)

UserSettings/EditorUserSettings.asset

+42
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
%YAML 1.1
2+
%TAG !u! tag:unity3d.com,2011:
3+
--- !u!162 &1
4+
EditorUserSettings:
5+
m_ObjectHideFlags: 0
6+
serializedVersion: 4
7+
m_ConfigSettings:
8+
RecentlyUsedScenePath-0:
9+
value: 22424703114646680e0b0227036c6c111b07142f1f2b233e2801182bacf53a31f6fe
10+
flags: 0
11+
RecentlyUsedScenePath-1:
12+
value: 22424703114646680e0b0227036c6c111b07142f1f2b233e28000e3cefe5202aebe478fce9332b25
13+
flags: 0
14+
RecentlyUsedScenePath-2:
15+
value: 22424703114646680e0b0227036c6c111b07142f1f2b233e280d1432e5ef3a39eef478fce9332b25
16+
flags: 0
17+
RecentlyUsedScenePath-3:
18+
value: 22424703114646680e0b0227036c6c111b07142f1f2b233e2867083debf42d
19+
flags: 0
20+
RecentlyUsedScenePath-4:
21+
value: 22424703114646680e0b0227036c6c111b07142f1f2b233e280a123feee9303df0b532a7f234362820
22+
flags: 0
23+
RecentlyUsedScenePath-5:
24+
value: 22424703114646680e0b0227036c6c111b07142f1f2b233e28071207ebec3115e3f778fce9332b25
25+
flags: 0
26+
RecentlyUsedScenePath-6:
27+
value: 22424703114646680e0b0227036c6c111b07142f1f2b233e281b083df6e9393dacf238e0f323
28+
flags: 0
29+
vcSharedLogLevel:
30+
value: 0d5e400f0650
31+
flags: 0
32+
m_VCAutomaticAdd: 1
33+
m_VCDebugCom: 0
34+
m_VCDebugCmd: 0
35+
m_VCDebugOut: 0
36+
m_SemanticMergeMode: 2
37+
m_VCShowFailedCheckout: 1
38+
m_VCOverwriteFailedCheckoutAssets: 1
39+
m_VCProjectOverlayIcons: 1
40+
m_VCHierarchyOverlayIcons: 1
41+
m_VCOtherOverlayIcons: 1
42+
m_VCAllowAsyncUpdate: 0

0 commit comments

Comments
 (0)