30 lines
673 B
C#
30 lines
673 B
C#
using UnityEngine;
|
|
using UnityEngine.SceneManagement;
|
|
|
|
public class BattleResult {
|
|
private static BattleResult sResult;
|
|
|
|
private bool won;
|
|
|
|
public static void FinishBattle(BattleResult result) {
|
|
sResult = result;
|
|
if (result.Won) {
|
|
Debug.Log("You won!");
|
|
} else {
|
|
Debug.Log("You lost!");
|
|
}
|
|
SceneManager.LoadScene("StoryScene");
|
|
}
|
|
|
|
public static BattleResult RetrieveResult() {
|
|
BattleResult result = sResult;
|
|
sResult = null;
|
|
return result;
|
|
}
|
|
|
|
public BattleResult(bool won) {
|
|
this.won = won;
|
|
}
|
|
|
|
public bool Won {get => this.won;}
|
|
}
|