예제 #1
0
// Start is called before the first frame update
    public void Start()
    {
        _game = Manager.Instance.game;
        Assert.IsNotNull(_game);

        _clientInfo = Manager.Instance.clientInfo;
        Assert.IsNotNull(_clientInfo);

        Assert.IsNotNull(Manager.Instance.tablePositions);

        _radialBarGameStart = gameStartsRadialBar.GetComponent <QUI_Bar>();
        buttonToken.SetActive(false);
        smallBlindToken.SetActive(false);
        bigBlindToken.SetActive(false);

        foreach (TablePosition t in Manager.Instance.tablePositions)
        {
            t.nameText.SetText("");
            t.stackText.SetText("");
            t.radialBar.gameObject.SetActive(false);
        }

        cardBlankPrefab = (GameObject)Resources.Load(Cards.BlankCard());
        if (cardBlankPrefab == null)
        {
            throw new FileNotFoundException(Cards.BlankCard() + " no file found - please check the configuration");
        }
    }
    public void Awake()
    {
        playerNamePosition = gameObject.transform.Find("Name").gameObject;
        lastActionPosition = gameObject.transform.Find("LastAction").gameObject;
        stackText          = gameObject.transform.Find("Stack").gameObject.GetComponent <TMP_Text>();
        radialBar          = gameObject.transform.Find("Radial Bar").gameObject.GetComponent <QUI_Bar>();
        cardsPosition      = gameObject.transform.Find("Cards").gameObject;
        tokenPosition      = gameObject.transform.Find("Token");

        nameText = playerNamePosition.GetComponent <TMP_Text>();
        pSystem  = playerNamePosition.GetComponent <ParticleSystem>();
    }