コード例 #1
0
 public bool CheckFailure(DungeonComponent com)
 {
     if (failureCondition == null)
     {
         return(false);
     }
     return(failureCondition.Failure(com));
 }
コード例 #2
0
 public bool Victory(DungeonComponent dungeonCom)
 {
     if (dungeonCom.levelTiming >= aimTime)
     {
         return(true);
     }
     return(false);
 }
コード例 #3
0
        public IFailureCondition failureCondition;                      //关卡失败条件,会导致副本提前结束

        public bool CheckVictory(DungeonComponent com)
        {
            if (victoryCondition == null)
            {
                Log.Error("配置有误! 关卡没有胜利条件!");
                return(false);
            }
            return(victoryCondition.Victory(com));
        }
コード例 #4
0
 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);
 }
コード例 #5
0
 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);
 }