コード例 #1
0
    private void SetWinner(PlayerHead head)
    {
        winnerPlayer = head;
        if (bipaipanel.IsHide() == false)
        {
            bipaipanel.Hide();
        }
        if (winnerPlayer != null)
        {
            Debug.LogError("本轮结束,胜出者:" + head.data.name);
        }
        EnabledAllButton(false);
        ReadlyButton.gameObject.SetActive(true);
        ReadlyButton.interactable = true;
        buttonParentCon.gameObject.SetActive(false);

        for (int i = 0; i < jettonObjList.Count; i++)
        {
            jettonObjList[i].transform.DOMove(head.transform.position, 1.5f);
        }
        int jettonTotal = 0;

        for (int i = 0; i < headList.Count; i++)
        {
            jettonTotal += headList[i].GetChangeJetton();
        }
        head.ChangeJetton(Mathf.Abs(jettonTotal));
        Mogo.Util.TimerHeap.AddTimer(1500, 0, AddJetton);
    }
コード例 #2
0
    private List <GameObject> jettonObjList = new List <GameObject>();//

    /// <summary>
    /// 下注
    /// </summary>
    /// <param name="head"></param>
    private void BetJetton(PlayerHead head)
    {
        GameObject obj = GetJettonObj();

        obj.transform.position = head.transform.position;
        jettonObjList.Add(obj);
        obj.gameObject.SetActive(true);
        obj.GetComponent <Image>().sprite = Resources.Load <Sprite>("Textures/room/jetton/" + minJettionData.resPath);
        Vector3 v       = new Vector3(Random.Range(-100, 100), Random.Range(20, 120), 0);
        Tweener tweener = obj.transform.DOLocalMove(v, 0.2f);

        head.ChangeJetton(-minJettionData.value);

        guizePanel.SetZongZhuAdd(minJettionData.value);
    }