Example #1
0
 public void ThrowItem(FossilInfo.FossilSize sizeKey, PointInfo.PointEnum colorKey)
 {
     if (HaveFossilDic[(int)sizeKey % 3 + (int)colorKey * 3].itemCount > 0)
     {
         HaveFossilDic[(int)sizeKey % 3 + (int)colorKey * 3].itemCount--;
     }
 }
Example #2
0
 public bool CheckHadItem(FossilInfo.FossilSize sizeKey, PointInfo.PointEnum colorKey)
 {
     if (HaveFossilDic.ContainsKey((int)sizeKey % 3 + (int)colorKey * 3))
     {
         return(true);
     }
     return(false);
 }
Example #3
0
 public void GetItem(FossilInfo.FossilSize sizeKey, PointInfo.PointEnum colorKey)
 {
     if (CheckHadItem(sizeKey, colorKey))
     {
         HaveFossilDic[(int)sizeKey % 3 + (int)colorKey * 3].itemCount++;
     }
     else
     {
         FossilInfo.Fossil fossil = FossilInfo.FossilInfoDic[(int)sizeKey % 3 + (int)colorKey * 3];
         fossil.itemCount = 1;
         HaveFossilDic.Add((int)sizeKey % 3 + (int)colorKey * 3, fossil);
     }
 }
Example #4
0
 public bool CheckHadItem(int sizeKey, int colorKey)
 {
     FossilInfo.FossilSize tmp  = (FossilInfo.FossilSize)Enum.ToObject(typeof(FossilInfo.FossilSize), sizeKey);
     PointInfo.PointEnum   tmp2 = (PointInfo.PointEnum)Enum.ToObject(typeof(PointInfo.PointEnum), colorKey);
     return(CheckHadItem(tmp, tmp2));
 }
Example #5
0
 public void ThrowItem(int sizeKey, int colorKey)
 {
     FossilInfo.FossilSize tmp  = (FossilInfo.FossilSize)Enum.ToObject(typeof(FossilInfo.FossilSize), sizeKey);
     PointInfo.PointEnum   tmp2 = (PointInfo.PointEnum)Enum.ToObject(typeof(PointInfo.PointEnum), colorKey);
     ThrowItem(tmp, tmp2);
 }