/// <summary> /// 定缺,缺一门,给手牌排序 /// </summary> /// <param name="key">指定的需要定缺的类型</param> /// 1:万 /// 2:条 /// 3:筒 /// 0:默认状态 public void DingQue(RuleManager.DingQueType type)//定缺、需要定缺的id+30、排序ID、定缺过的ID-30、刷新uv { int low = -1; int hight = -1; switch (type) { case RuleManager.DingQueType.WAN: low = 0; hight = 9; break; case RuleManager.DingQueType.TIAO: low = 10; hight = 19; break; case RuleManager.DingQueType.TONG: low = 20; hight = 29; break; } if (low != -1 || hight != -1) { for (int i = idArray.Count - 1; i >= 0; i--) { int id = idArray[i]; if (idArray[i] > low && idArray[i] <= hight) { idArray[i] += 30; } } } SortList(); //排序id RevertIdArray(); //定缺过的ID-30 UVOffSet(); //刷新uv }
/// <summary> /// 定缺牌型 /// </summary> /// <param name="type">定缺的类型</param> public void DingQue(RuleManager.DingQueType type) { _handCardMgr._dingQueType = type; _handCardMgr.DingQue(type); //1、手牌重新排序:需要定缺的id + 30、排序ID、定缺过的ID - 30、刷新uv,将定缺后的牌放置在最后 RuleManager.m_instance.DingQue(type, _handCardMgr._handCardList); //2、定缺:改变颜色 }
public void SetDingQueType(RuleManager.DingQueType type) { _dingQueType = type; }