File tree Expand file tree Collapse file tree 8 files changed +29
-2393
lines changed
Assets/Joyixir/GameManager Expand file tree Collapse file tree 8 files changed +29
-2393
lines changed Load Diff This file was deleted.
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -53,6 +53,8 @@ private void Update()
53
53
Retry ( ) ;
54
54
if ( UnityEngine . Input . GetKeyDown ( KeyCode . RightArrow ) )
55
55
Skip ( ) ;
56
+ if ( UnityEngine . Input . GetKeyDown ( KeyCode . LeftArrow ) )
57
+ GoToPreviousLevel ( ) ;
56
58
if ( UnityEngine . Input . GetKeyDown ( KeyCode . F ) )
57
59
ForceFinish ( ) ;
58
60
}
@@ -104,6 +106,11 @@ public static void Skip()
104
106
LevelManager . Instance . Skip ( ) ;
105
107
}
106
108
109
+ private void GoToPreviousLevel ( )
110
+ {
111
+ LevelManager . Instance . InitializePreviousLevel ( ) ;
112
+ }
113
+
107
114
public static void Retry ( )
108
115
{
109
116
LevelManager . Instance . Retry ( ) ;
Original file line number Diff line number Diff line change @@ -144,6 +144,13 @@ internal void Skip()
144
144
Initialize ( ) ;
145
145
}
146
146
147
+ internal void InitializePreviousLevel ( )
148
+ {
149
+ ForceLose ( ) ;
150
+ DecreasePlayerLevel ( ) ;
151
+ Initialize ( ) ;
152
+ }
153
+
147
154
internal void Retry ( )
148
155
{
149
156
CurrentLevel . ForceFinishLevel ( LevelFinishStatus . Retry ) ;
@@ -268,10 +275,16 @@ private int CalculateMoneyFromScore(int score)
268
275
return score ;
269
276
}
270
277
278
+ private static void DecreasePlayerLevel ( )
279
+ {
280
+ PlayerLevel -- ;
281
+ }
282
+
271
283
private static void IncreasePlayerLevel ( )
272
284
{
273
285
PlayerLevel ++ ;
274
- OnLevelUnlocked ? . Invoke ( PlayerLevel ) ;
286
+ if ( GetLevelAttempts ( PlayerLevel ) == 0 )
287
+ OnLevelUnlocked ? . Invoke ( PlayerLevel ) ;
275
288
}
276
289
}
277
290
}
Original file line number Diff line number Diff line change 1
1
{
2
2
"dependencies" : {
3
- "com.unity.collab-proxy" : " 1.15.15 " ,
3
+ "com.unity.collab-proxy" : " 1.15.18 " ,
4
4
"com.unity.ide.rider" : " 2.0.7" ,
5
- "com.unity.ide.visualstudio" : " 2.0.14 " ,
5
+ "com.unity.ide.visualstudio" : " 2.0.15 " ,
6
6
"com.unity.ide.vscode" : " 1.2.5" ,
7
7
"com.unity.test-framework" : " 1.1.31" ,
8
8
"com.unity.textmeshpro" : " 3.0.6" ,
Original file line number Diff line number Diff line change 1
1
{
2
2
"dependencies" : {
3
3
"com.unity.collab-proxy" : {
4
- "version" : " 1.15.15 " ,
4
+ "version" : " 1.15.18 " ,
5
5
"depth" : 0 ,
6
6
"source" : " registry" ,
7
7
"dependencies" : {
26
26
"url" : " https://packages.unity.com"
27
27
},
28
28
"com.unity.ide.visualstudio" : {
29
- "version" : " 2.0.14 " ,
29
+ "version" : " 2.0.15 " ,
30
30
"depth" : 0 ,
31
31
"source" : " registry" ,
32
32
"dependencies" : {
Original file line number Diff line number Diff line change 1
- m_EditorVersion: 2020.3.33f1
2
- m_EditorVersionWithRevision: 2020.3.33f1 (915a7af8b0d5 )
1
+ m_EditorVersion: 2020.3.36f1
2
+ m_EditorVersionWithRevision: 2020.3.36f1 (71f96b79b9f0 )
Original file line number Diff line number Diff line change @@ -23,7 +23,8 @@ There are three ways to use it
23
23
### PackageManager
24
24
##### Scoped Registry
25
25
** No longer supported(Latest version is 2.1.0)**
26
- TO add Joyixir scope to NPM scopedregistry, add the following to manifest.json
26
+
27
+ To add Joyixir scope to NPM scopedregistry, add the following to manifest.json
27
28
``` json
28
29
{
29
30
"scopedRegistries" : [
You can’t perform that action at this time.
0 commit comments