示例#1
0
    public void Bet(ChipValue chipValue)
    {
        int value = (int)chipValue;

        if (value > money)
        {
            return;
        }

        Money         -= value;
        BetValue      += value;
        BetChipsCount += 1;
    }
示例#2
0
    public static GameObject Create(ChipValue value, Vector3 position, bool getValuePrefab = false)
    {
        string name = Enum.GetName(typeof(ChipValue), value);

        if (getValuePrefab)
        {
            name += "_Value";
        }

        GameObject chipGameObject = Instantiate(Resources.Load <GameObject>($"Prefabs/Chip_{name}"), position, Quaternion.identity);

        chipGameObject.transform.SetParent(ChipContainer.ChipParent);
        return(chipGameObject);
    }