예제 #1
0
    public void clearBoard()
    {
        GameObject[] cardclones = GameObject.FindGameObjectsWithTag("Card");

        foreach (GameObject clone in cardclones)
        {
            Destroy(clone);
        }

        GameObject[] tempobjectclones = GameObject.FindGameObjectsWithTag("tempobject");

        foreach (GameObject clone in tempobjectclones)
        {
            Destroy(clone);
        }

        GameObject manager = GameObject.Find("_Manager");
        WarMain    warmain = manager.GetComponent <WarMain>();

        if (Application.loadedLevelName == "War")
        {
            warmain.updateScore();
        }
        else if (Application.loadedLevelName == "Blackjack")
        {
            GameObject    manager1 = GameObject.Find("_Manager");
            BlackjackMain bjmain   = manager1.GetComponent <BlackjackMain>();
            bjmain.nextHand();
        }
    }
예제 #2
0
    void OnClick()
    {
        GameObject    manager = GameObject.Find("_Manager");
        BlackjackMain bjmain  = manager.GetComponent <BlackjackMain>();

        bjmain.Stand();
    }