コード例 #1
0
 /// <summary>
 /// Returns whether a requirement has been met.
 /// </summary>
 public static bool isRequirementMet(IAPRequirement req)
 {
     //if the requirement exists and is met, return true
     //otherwise return false as default
     if (instance.gameData[playerKey][req.entry] != null &&
         instance.gameData[playerKey][req.entry].AsInt >= req.target)
     {
         return(true);
     }
     else
     {
         return(false);
     }
 }
コード例 #2
0
        /// <summary>
        /// returns whether a requirement has been met.
        /// </summary>
        public static bool IsRequirementMet(IAPRequirement req)
        {
            string data = KeyValueStorage.GetValue(req.entry);
            int value = 0;

            if (!string.IsNullOrEmpty(data))
                value = int.Parse(data);

            //if the requirement exists and is met, return true
            //otherwise return false as default
            if (value >= req.target)
                return true;
            else
                return false;
        }
コード例 #3
0
ファイル: DBManager.cs プロジェクト: mutatis/sprawl-brawl
 /// <summary>
 /// returns whether a requirement has been met. Just
 /// providing a simple method for the supported logic here
 /// </summary>
 public static bool isRequirementMet(IAPRequirement req)
 {
     //get location string
     string loc = instance.player;
     //if the requirement exists and is met, return true
     //otherwise return false as default
     if (instance.gameData[loc][req.entry] != null
         && instance.gameData[loc][req.entry].AsInt >= req.target)
         return true;
     else
         return false;
 }