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--; } }
public bool CheckHadItem(FossilInfo.FossilSize sizeKey, PointInfo.PointEnum colorKey) { if (HaveFossilDic.ContainsKey((int)sizeKey % 3 + (int)colorKey * 3)) { return(true); } return(false); }
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); } }
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)); }
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); }