Beispiel #1
0
    private void CheckReverse() //確認是否打出迴轉
    {
        GameObject   LastCard     = gameManager.IDtoGameobeject(gameManager.LastCardID);
        CardState    cardState    = LastCard.GetComponent <Card>().cardState;
        CardFunction cardFunction = LastCard.GetComponent <Card>().CardFunction;

        if (cardFunction == CardFunction.Reverse) //先確認功能牌尚未發揮作用
        {
            if (cardState == CardState.Played)
            {
                Debug.Log("Reverse");
                turnScript.ChangeOrder(order);
                LastCard.GetComponent <Card>().cardState = CardState.Used;
                GameObject Rotation = Instantiate(Resources.Load <GameObject>("Prefabs/Rotation"));
                Rotation.transform.localPosition = new Vector3(0, 0, -8f);
                StartCoroutine(WaitForDestroy("Rotation(Clone)"));
                SoundEffect.ReverseVoice();
            }
        }
    }