File tree Expand file tree Collapse file tree 1 file changed +9
-13
lines changed
Scenes/BattleDirector/Scripts Expand file tree Collapse file tree 1 file changed +9
-13
lines changed Original file line number Diff line number Diff line change @@ -277,26 +277,22 @@ private Timing CheckTiming(double beatDif)
277277 #region Battle End
278278 private void CheckBattleStatus ( PuppetTemplate puppet ) //Called when a puppet dies
279279 {
280+ var tween = CreateTween ( ) ;
281+ tween . TweenProperty ( puppet , "modulate:a" , 0 , 2f ) ;
280282 if ( puppet == Player )
281283 {
282- OnBattleLost ( ) ;
284+ CM . ProcessMode = ProcessModeEnum . Disabled ;
285+ tween . TweenCallback ( Callable . From ( OnBattleLost ) ) ;
283286 return ;
284287 }
285288
286289 if ( puppet is EnemyPuppet )
287290 {
288- if ( IsBattleWon ( ) )
289- {
290- Harbinger . Instance . InvokeBattleEnded ( ) ;
291- CM . ProcessMode = ProcessModeEnum . Disabled ;
292- var tween = CreateTween ( ) ;
293- tween . TweenProperty ( puppet , "modulate:a" , 0 , 2f ) ;
294- tween . TweenCallback ( Callable . From ( OnBattleWon ) ) ;
295- }
296- else
297- {
298- puppet . Visible = false ;
299- }
291+ if ( ! IsBattleWon ( ) )
292+ return ;
293+ Harbinger . Instance . InvokeBattleEnded ( ) ;
294+ CM . ProcessMode = ProcessModeEnum . Disabled ;
295+ tween . TweenCallback ( Callable . From ( OnBattleWon ) ) ;
300296 }
301297 }
302298
You can’t perform that action at this time.
0 commit comments