public bool CheckFailure(DungeonComponent com) { if (failureCondition == null) { return(false); } return(failureCondition.Failure(com)); }
public bool Victory(DungeonComponent dungeonCom) { if (dungeonCom.levelTiming >= aimTime) { return(true); } return(false); }
public IFailureCondition failureCondition; //关卡失败条件,会导致副本提前结束 public bool CheckVictory(DungeonComponent com) { if (victoryCondition == null) { Log.Error("配置有误! 关卡没有胜利条件!"); return(false); } return(victoryCondition.Victory(com)); }
public bool Failure(DungeonComponent dungeonCom) { foreach (var v in dungeonCom.playerTeam) { CharacterStateComponent unitStateComponent = v.GetComponent <CharacterStateComponent>(); if (!unitStateComponent.Get(SpecialStateType.Die)) { return(false); } } return(true); }
public bool Victory(DungeonComponent dungeonCom) { foreach (var v in dungeonCom.currDungeonData[dungeonCom.currLevelIndex].datas) { if (!v.haveTriggerd) { return(false); } } foreach (var v in dungeonCom.enemyTeam) { CharacterStateComponent unitStateComponent = v.GetComponent <CharacterStateComponent>(); if (!unitStateComponent.Get(SpecialStateType.Die)) { return(false); } } return(true); }