示例#1
0
    public void PlaySaiZi(int banker, int[] dices)
    {
        ResourcesMgr rm   = ResourcesMgr.GetInstance();
        GameObject   hand = rm.InstantiateGameObjectWithType("AnShaiZiHand", ResourceType.Hand);

        hand.GetComponent <PlayDicAnimationClick>().SetSaiZiNumber(dices);

        Transform tm = hand.transform;

        switch (banker)
        {
        case 0:
            tm.position = new Vector3(-0.101f, -0.015f, 0.607f);
            tm.rotation = Quaternion.Euler(Vector3.zero);
            break;

        case 1:
            tm.position = new Vector3(-0.611f, -0.015f, -0.103f);
            tm.rotation = Quaternion.Euler(new Vector3(0, -90, 0));
            break;

        case 2:
            tm.position = new Vector3(0.106f, -0.015f, -0.613f);
            tm.rotation = Quaternion.Euler(new Vector3(0, -180, 0));
            break;

        case 3:
            tm.position = new Vector3(0.614f, -0.015f, 0.101f);
            tm.rotation = Quaternion.Euler(new Vector3(0, 90, 0));
            break;
        }

        hand.GetComponent <Animation>().Play("ananniu");
    }
示例#2
0
    public GameObject GetChuPaiWay()
    {
        ResourcesMgr rm = ResourcesMgr.GetInstance();

        int        way  = Random.Range(1, 3);
        GameObject hand = null;

        way = 2;         // TODO
        if (way == 1)
        {
            hand = rm.InstantiateGameObjectWithType("ChuPaiHand1", ResourceType.Hand);
            hand.transform.position = this.transform.TransformPoint(-0.0809f, -0.0141f, 0.4405f);
            return(hand);
        }
        else
        {
            hand = rm.InstantiateGameObjectWithType("ChuPaiHand2", ResourceType.Hand);
            hand.transform.position = this.transform.TransformPoint(-0.1367f, -0.0131f, 0.505f);
            return(hand);
        }
    }