Beispiel #1
0
    public void Move(int moveCount)
    {
        //プレイヤがいたところを-10
        Masses.ChangeMass(nextPlace - 1, "0");
        AnimationController.SetTrue();

        var sequence = DOTween.Sequence();

        if (DoubleMoveFlag)
        {
            moveCount     *= 2;
            DoubleMoveFlag = false;

            if (CardMenu.GetCard(1) > 0)
            {
                Use1.SetTrue();
            }
        }

        for (int i = 0; i < moveCount; i++)
        {
            int   j = 0;
            float k = 0;
            if (nextPlace == 20)
            {
                nextPlace = 0;
            }
            positionX = Masses.MassGameObjects[nextPlace].transform.localPosition.x;
            positionZ = Masses.MassGameObjects[nextPlace].transform.localPosition.z;

            float time = 0.2f;

            sequence.Append(
                this.gameObject.transform.DOMoveX(positionX, time)
                );
            sequence.Append(
                this.transform.DOMoveZ(positionZ, time)
                );

            if (nextPlace == 0)
            {
                sequence.Append(
                    this.gameObject.transform.DORotate(new Vector3(0, 270, 0), 1f)
                    );
            }
            else if (nextPlace == 5)
            {
                sequence.Append(
                    this.gameObject.transform.DORotate(new Vector3(0, 180, 0), 1f)
                    );
            }
            else if (nextPlace == 10)
            {
                sequence.Append(
                    this.gameObject.transform.DORotate(new Vector3(0, 90, 0), 1f)
                    );
            }
            else if (nextPlace == 15)
            {
                sequence.Append(
                    this.gameObject.transform.DORotate(new Vector3(0, 0, 0), 1f)
                    );
            }

            if (nextPlace == 0)
            {
                if (DoubleGoldFlag)
                {
                    sequence.AppendCallback(() => gold += 20000);
                    StartBonusText.Double();
                    DoubleGoldFlag = false;

                    if (CardMenu.GetCard(2) > 0)
                    {
                        Use2.SetTrue();
                    }
                }
                else
                {
                    sequence.AppendCallback(() => gold += 10000);
                    StartBonusText.Normal();
                }
                sequence.AppendCallback(() => StartBonus.Bonus());
            }

            nextPlace += 1;

            if (i == moveCount - 1)
            {
                sequence.AppendCallback(() => RouletteController.RotMoveFinish());
                sequence.AppendCallback(() => MassEffect(nextPlace - 1));
                sequence.AppendCallback(() => AnimationController.SetFalse());
            }
        }
    }
Beispiel #2
0
 // Update is called once per frame
 void Update()
 {
     this.GetComponent <Text>().text = CardMenu.GetCard(3) + "枚";
 }