コード例 #1
0
        // -------------------------------------------------------------------------------
        // getCanUseType
        // -------------------------------------------------------------------------------
        public static bool getCanUseType(CanUseType useType, CharacterBase target)
        {
            switch (useType)
            {
            case CanUseType.IsHPNotMax:
                return(target.IsAlive && target.HP < target.MaxHP);

            case CanUseType.IsMPNotMax:
                return(target.IsAlive && target.MP < target.MaxMP);

            case CanUseType.IsStun:
                return(target.IsStunned);

            case CanUseType.IsSilence:
                return(target.IsSilenced);

            case CanUseType.IsDepleteHP:
                return(target.IsDepleteHP);

            case CanUseType.IsDepleteMP:
                return(target.IsDepleteMP);

            case CanUseType.IsAlive:
                return(target.IsAlive);

            case CanUseType.IsDead:
                return(!target.IsAlive);
            }

            return(false);
        }
コード例 #2
0
 // -------------------------------------------------------------------------------
 // getUseTypeDescription
 // -------------------------------------------------------------------------------
 public string getUseTypeDescription(CanUseType useType)
 {
     return(languages[language].useTypeDescriptions.FirstOrDefault(x => x.useType == useType).description);
 }