public void SetNewItem(MahjongItem item, int value, EnumMahJongAction action) { item.Value = value; item.SelfData.Action = action; item.SetColor(Color.white); GameTools.AddChild(transform, item.transform); ItemList.Add(item); }
public void Start() { var c = gameObject.AddComponent <BoxCollider>(); _self = GetComponent <MahjongItem>(); c.size = new Vector3(_self.Width, _self.Height); _dragBeforeV3 = gameObject.transform.localPosition; }
public void SetMahjongItem(MahjongItem item) { if (item) { _mjItem = item.transform; transform.parent = _mjItem; transform.localScale = Vector3.one; enabled = true; gameObject.SetActive(true); } else { _mjItem = null; enabled = false; gameObject.SetActive(false); } }
public void RefreshGroup(MahjongItem addItem) { addItem.SelfData.Action = EnumMahJongAction.Lie; }