예제 #1
0
 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);
 }
예제 #2
0
        public void Start()
        {
            var c = gameObject.AddComponent <BoxCollider>();

            _self         = GetComponent <MahjongItem>();
            c.size        = new Vector3(_self.Width, _self.Height);
            _dragBeforeV3 = gameObject.transform.localPosition;
        }
예제 #3
0
 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);
     }
 }
예제 #4
0
 public void RefreshGroup(MahjongItem addItem)
 {
     addItem.SelfData.Action = EnumMahJongAction.Lie;
 }