Ejemplo n.º 1
0
    private void Start()
    {
        InitData();

        if (btBack != null)
        {
            btBack.onClick.AddListener(OpenStartUI);
        }
        if (btCreate != null)
        {
            btCreate.onClick.AddListener(CreateNewGame);
        }
        if (rgSex != null)
        {
            rgSex.SetCallBack(this);
        }
        if (colorSkin != null)
        {
            colorSkin.SetCallBack(this);
        }
        if (colorHair != null)
        {
            colorHair.SetCallBack(this);
        }
        if (selectHair != null)
        {
            selectHair.SetSelectNumber(listSelectHair.Count);
            selectHair.SetCallBack(this);
        }
        if (colorEye != null)
        {
            colorEye.SetCallBack(this);
        }
        if (selectEye != null)
        {
            selectEye.SetSelectNumber(listSelectEye.Count);
            selectEye.SetCallBack(this);
        }
        if (colorMouth != null)
        {
            colorMouth.SetCallBack(this);
        }
        if (selectMouth != null)
        {
            selectMouth.SetSelectNumber(listSelectMouth.Count);
            selectMouth.SetCallBack(this);
        }
        if (selectHat != null)
        {
            selectHat.SetSelectNumber(listSelectHat.Count);
            selectHat.SetCallBack(this);
        }
        if (selectClothes != null)
        {
            selectClothes.SetSelectNumber(listSelectClothes.Count);
            selectClothes.SetCallBack(this);
        }
        if (selectShoes != null)
        {
            selectShoes.SetSelectNumber(listSelectShoes.Count);
            selectShoes.SetCallBack(this);
        }
        if (btRandomCharacter != null)
        {
            btRandomCharacter.onClick.AddListener(OnClickRandomCharacter);
        }
    }