@@ -123,18 +123,21 @@ private void FixedUpdate()
123
123
{
124
124
if ( OtherObject != null )
125
125
{
126
- if ( Mission . Id == null || Mission . Id < 10 )
126
+ if ( Variables . MissionList . Find ( Mission => Mission . Id == Variables . CurrentMissionID ) . ObjetName == OtherObject . name )
127
127
{
128
- if ( Variables . MissionList . Find ( Mission => Mission . Id == Variables . CurrentMissionID ) . ObjetName == OtherObject . name )
128
+ InteractionText . SetActive ( true ) ;
129
+ Debug . Log ( "I am a door" ) ;
130
+ if ( Input . GetKeyDown ( KeyCode . E ) )
129
131
{
130
- InteractionText . SetActive ( true ) ;
131
- Debug . Log ( "I am a door" ) ;
132
- if ( Input . GetKeyDown ( KeyCode . E ) )
133
- {
134
- Showpopup ( ) ;
135
- }
132
+ Showpopup ( ) ;
136
133
}
137
134
}
135
+
136
+ if ( Variables . CurrentMissionID >= 10 )
137
+ {
138
+ bs . FadeIn ( ) ;
139
+ SceneManager . LoadSceneAsync ( "EndGame" ) ;
140
+ }
138
141
}
139
142
Mission FirstMission = Variables . MissionList . Find ( mission => mission . Id == 0 ) ;
140
143
@@ -156,12 +159,6 @@ private void FixedUpdate()
156
159
157
160
MissionNameText . text = Variables . MissionList . Find ( mission => mission . Id == Variables . CurrentMissionID ) . Title ;
158
161
159
- if ( Variables . CurrentMissionID >= 10 )
160
- {
161
- bs . FadeIn ( ) ;
162
- SceneManager . LoadSceneAsync ( "EndGame" ) ;
163
- }
164
-
165
162
Debug . Log ( Mission . Id ) ;
166
163
}
167
164
@@ -210,7 +207,11 @@ private void AfterConfirmation(bool choice)
210
207
ChoiceWindow . SetActive ( false ) ;
211
208
ChoiceWindowtwo . SetActive ( true ) ;
212
209
ShowpopupSecondaire ( choice ) ;
213
- //TODO : fondu au noir ici elipse
210
+ if ( Variables . CurrentMissionID > 9 )
211
+ {
212
+ bs . FadeIn ( ) ;
213
+ SceneManager . LoadSceneAsync ( "EndGame" ) ;
214
+ }
214
215
}
215
216
216
217
private void Showpopup ( )
0 commit comments