예제 #1
0
    private void stepAction()
    {
        GameBehaviourVO temp = aa.behavieList [stepNum];

        usedList.Insert(0, temp);
        int tempcurIndex = getCurIndex(temp.accountindex_id);

        if (temp.type == 1)
        {
            outCard(tempcurIndex, temp.getOutPai());
        }
        //SetDirGameObjectAction (tempcurIndex);
        stepNum++;
    }
예제 #2
0
    private void stepAction()
    {
        GameBehaviourVO temp = aa.behavieList [stepNum];

        usedList.Insert(0, temp);
        int tempcurIndex = getCurIndex(temp.accountindex_id);

        if (temp.type == 0)          //0:让,1:跟,2:加,3:弃牌
        {
            playerItems [tempcurIndex].GetComponent <PlayerItemBackScript> ().showDZPKRangPai();
        }
        else if (temp.type == 1)
        {
            playerItems [tempcurIndex].GetComponent <PlayerItemBackScript> ().showDZPKGenZhu(temp.gangType);
        }
        else if (temp.type == 2)
        {
            playerItems [tempcurIndex].GetComponent <PlayerItemBackScript> ().showDZPKJiaZhu(temp.gangType);
        }
        else if (temp.type == 3)
        {
            playerItems [tempcurIndex].GetComponent <PlayerItemBackScript> ().showDZPKQiPai();
        }
        else if (temp.type == -1)            //发牌
        {
            int[]             deskCard = temp.getOutPai();
            List <GameObject> cards    = new List <GameObject> ();
            for (int i = 0; i < deskCard.Length; i++)
            {
                GameObject gob = Instantiate(Resources.Load("prefab/pdk/HandCard_s")) as GameObject;
                if (gob != null)
                {
                    gob.transform.SetParent(parentList [6]);
                    gob.transform.localScale = new Vector3(1, 1, 1);
                    gob.GetComponent <pdkCardScript> ().setPoint(deskCard [i], 4);
                    cards.Add(gob);
                }
            }
            handerCardList.Add(cards);
        }
        else if (temp.type == -2)            //胜利
        {
            playerItems [tempcurIndex].GetComponent <PlayerItemBackScript> ().showDZPKSuccess();
        }

        stepNum++;
    }
예제 #3
0
 private void frontAction()
 {
     if (usedList.Count > 0)
     {
         //play = false;
         GameBehaviourVO temp = usedList [0];
         usedList.RemoveAt(0);
         int tempcurIndex = getCurIndex(temp.accountindex_id);
         if (temp.type == 1)
         {
             frontIncard(tempcurIndex, temp.getOutPai());
         }
         //SetDirGameObjectAction (tempcurIndex);
         stepNum--;
         processText.text = "播放进度:" + (int)(stepNum * 100 / aa.behavieList.Count) + "%";
         //play = true;
     }
 }