From c5f145786f4c6d2fe4bea831dfc16e52228920a5 Mon Sep 17 00:00:00 2001 From: chai <215380520@qq.com> Date: Sun, 19 May 2024 16:05:01 +0800 Subject: * move --- GameCode/Quest.cs | 114 ------------------------------------------------------ 1 file changed, 114 deletions(-) delete mode 100644 GameCode/Quest.cs (limited to 'GameCode/Quest.cs') diff --git a/GameCode/Quest.cs b/GameCode/Quest.cs deleted file mode 100644 index 2532576..0000000 --- a/GameCode/Quest.cs +++ /dev/null @@ -1,114 +0,0 @@ -using System; -using System.Collections.Generic; -using I2.Loc; - -[Serializable] -public class Quest -{ - public enum EType - { - BeatTheLevel = 0, - AchieveScoreOf = 2, - BeatTheLevelWith = 1, - BeatTheLevelWithout = 3 - } - - public EType questType; - - public List beatTheLevelWith = new List(); - - public int achieveScoreOf; - - public List beatTheLevelWithout = new List(); - - private bool IsBeatLevelWith => questType == EType.BeatTheLevelWith; - - private bool IsAchieveScoreOf => questType == EType.AchieveScoreOf; - - private bool IsBeatLevelWithout => questType == EType.BeatTheLevelWithout; - - public bool CheckBeaten(LevelData _myLevelData) - { - switch (questType) - { - case EType.BeatTheLevel: - return _myLevelData.beatenBest; - case EType.AchieveScoreOf: - return _myLevelData.highscoreBest >= achieveScoreOf; - case EType.BeatTheLevelWith: - { - for (int k = 0; k < _myLevelData.levelHasBeenBeatenWith.Count; k++) - { - List list2 = _myLevelData.levelHasBeenBeatenWith[k]; - int num = beatTheLevelWith.Count; - for (int l = 0; l < list2.Count; l++) - { - if (beatTheLevelWith.Contains(list2[l])) - { - num--; - } - if (num <= 0) - { - return true; - } - } - } - return false; - } - case EType.BeatTheLevelWithout: - { - for (int i = 0; i < _myLevelData.levelHasBeenBeatenWith.Count; i++) - { - List list = _myLevelData.levelHasBeenBeatenWith[i]; - bool flag = true; - for (int j = 0; j < list.Count; j++) - { - if (beatTheLevelWithout.Contains(list[j])) - { - flag = false; - break; - } - } - if (flag) - { - return true; - } - } - return false; - } - default: - return false; - } - } - - public string GetMissionStatement() - { - string result = ""; - switch (questType) - { - case EType.AchieveScoreOf: - result = LocalizationManager.GetTranslation("Achieve Score") + " " + achieveScoreOf; - break; - case EType.BeatTheLevel: - result = LocalizationManager.GetTranslation("Achieve Victory"); - break; - case EType.BeatTheLevelWith: - result = LocalizationManager.GetTranslation("Achieve Victory With"); - foreach (Equippable item in beatTheLevelWith) - { - result = result + " " + item.displayName + " +"; - } - result = result.Remove(result.Length - 1, 1); - break; - case EType.BeatTheLevelWithout: - result = LocalizationManager.GetTranslation("Achieve Victory Without"); - foreach (Equippable item2 in beatTheLevelWithout) - { - result = result + " " + item2.displayName + " +"; - } - result = result.Remove(result.Length - 1, 1); - break; - } - return result; - } -} -- cgit v1.1-26-g67d0