/// <summary> /// Categories the changed. /// </summary> /// <param name="result">Result.</param> public void CategoryChanged(int result) { string name = _boradCategoryList[_boardCategory.value]; var d = CommonModelHandle.GetByNameBaseData(name, CurrentProfSettingStateType.BoardCategory); _category = d.id; }
private IEnumerator InitWait() { _loadingOverlay.SetActive(true); while (InitDataApi._httpCatchData == null) { yield return(InitDataApi._httpCatchData != null); } //フィールドセット処理。 if (InitDataApi._httpCatchData.result.board_category.Count > 0) { _boradCategoryList.Clear(); foreach (var category in InitDataApi._httpCatchData.result.board_category) { //Debug.Log (category.id); //Debug.Log (category.name); _boradCategoryList.Add(category.name); } _boardCategory.ClearOptions(); _boardCategory.options.Clear(); _boardCategory.AddOptions(_boradCategoryList); } _loadingOverlay.SetActive(false); // カテゴリー初期化 string name = _boradCategoryList[_boardCategory.value]; var d = CommonModelHandle.GetByNameBaseData(name, CurrentProfSettingStateType.BoardCategory); _category = d.id; }
/// <summary> /// Genders the changed. /// </summary> /// <param name="result">Result.</param> public void GenderChanged(int result) { string name = _genderList[_genderDropdown.value]; Debug.Log(name + " どっちに送られてます? "); var d = CommonModelHandle.GetByNameBaseData(name, CurrentProfSettingStateType.Gender); _gender = d.id; }
/// <summary> /// Genders the changed. /// 性別選択。 /// </summary> /// <returns>The changed.</returns> public void GenderChanged() { string n = _genderList[_gender.value]; var d = CommonModelHandle.GetByNameBaseData(n, CurrentProfSettingStateType.Gender); _sexAPIThrow = d.id; Debug.Log("サーバーに送るデータが取得出来ているか? Gender " + _sexAPIThrow); }
/// <summary> /// Orders the changed. /// 表示順のやつ /// </summary> /// <returns>The changed.</returns> public void OrderChanged() { if (_order.value != 0) { string n = _orderList[_order.value]; var d = CommonModelHandle.GetByNameBaseData(n, CurrentProfSettingStateType.UserSort); _orderAPIThrow = d.id; } else if (_order.value == 0) { _orderAPIThrow = "1"; } Debug.Log("サーバーに送るデータが取得出来ているか? Order " + _orderAPIThrow); }
/// <summary> /// Radiuses the changed. /// 距離データ取得 /// </summary> /// <returns>The changed.</returns> public void RadiusChanged() { if (_radius.value != 0) { string n = _radiusList [_radius.value]; var d = CommonModelHandle.GetByNameBaseData(n, CurrentProfSettingStateType.Radius); _radiusAPIThrow = d.id; } else if (_radius.value == 0) { _radiusAPIThrow = ""; } Debug.Log("サーバーに送るデータが取得出来ているか? Radius " + _radiusAPIThrow); }
/// <summary> /// Categories the changed. /// カテゴリのやつ。 /// </summary> /// <returns>The changed.</returns> public void CategoryChanged() { if (_category.value != 0) { string n = _categoryList[_category.value]; var d = CommonModelHandle.GetByNameBaseData(n, CurrentProfSettingStateType.BoardCategory); _categoryAPIThrow = d.id; } else if (_category.value == 0) { _categoryAPIThrow = ""; } Debug.Log("サーバーに送るデータが取得出来ているか? Category " + _categoryAPIThrow); }
/// <summary> /// Displaies the data set. /// </summary> /// <returns>The data set.</returns> /// <param name="stateType">State type.</param> /// <param name="key">Key.</param> /// <param name="value">Value.</param> private void DisplayDataSet(SearchConditionType stateType, int key, string value) { #if UNITY_IOS key = key - 1; #endif switch (stateType) { case SearchConditionType.Order: if (key == 0) { _orderAPIThrow = "1"; _orderNative.transform.GetChild(1).gameObject.GetComponent <Text> ().text = value; } else { var order = CommonModelHandle.GetByNameBaseData(value, CurrentProfSettingStateType.UserSort); _orderAPIThrow = order.id; _orderNative.transform.GetChild(1).gameObject.GetComponent <Text> ().text = order.name; } break; case SearchConditionType.Gender: if (key == 0) { _sexAPIThrow = ""; _genderNative.transform.GetChild(1).GetComponent <Text> ().text = value; } else { var gender = CommonModelHandle.GetByNameBaseData(value, CurrentProfSettingStateType.Gender); _sexAPIThrow = gender.id; _genderNative.transform.GetChild(1).GetComponent <Text> ().text = value; } break; case SearchConditionType.AgeHigh: _ageHighAPIThrow = value; _ageToNative.transform.GetChild(1).gameObject.GetComponent <Text> ().text = value; break; case SearchConditionType.AgeLow: _ageLowAPIThrow = value; _ageFromNative.transform.GetChild(1).gameObject.GetComponent <Text> ().text = value; break; case SearchConditionType.TallHigh: _heightToAPIThrow = value; _heightToNative.transform.GetChild(1).gameObject.GetComponent <Text> ().text = value; break; case SearchConditionType.TallLow: _heightFromAPIThrow = value; _heightFromNative.transform.GetChild(1).gameObject.GetComponent <Text> ().text = value; break; case SearchConditionType.BodyType: if (key == 0) { _bodyTypeAPIThrow = ""; _bodyTypeNative.transform.GetChild(0).gameObject.SetActive(false); _bodyTypeNative.transform.GetChild(1).GetComponent <Text> ().text = "指定しない"; } else { _bodyTypeAPIThrow = value; _bodyTypeNative.transform.GetChild(0).gameObject.SetActive(false); _bodyTypeNative.transform.GetChild(1).GetComponent <Text> ().text = value; } break; case SearchConditionType.IsImage: if (key == 0) { _isImageAPIThrow = ""; _isImageNative.transform.GetChild(0).gameObject.SetActive(false); _isImageNative.transform.GetChild(1).GetComponent <Text> ().text = "指定しない"; } else { if ((key - 1) == 0) { _isImageAPIThrow = "0"; } else { _isImageAPIThrow = (key - 1).ToString(); } _isImageNative.transform.GetChild(0).gameObject.SetActive(false); _isImageNative.transform.GetChild(1).GetComponent <Text> ().text = value; } break; case SearchConditionType.Radius: if (key == 0) { _radiusAPIThrow = ""; _radiusNative.transform.GetChild(0).gameObject.SetActive(false); _radiusNative.transform.GetChild(1).GetComponent <Text> ().text = "指定しない"; } else { var r = CommonModelHandle.GetByNameBaseData(value, CurrentProfSettingStateType.Radius); if (r != null) { _radiusAPIThrow = r.id; _radiusNative.transform.GetChild(0).gameObject.SetActive(false); _radiusNative.transform.GetChild(1).GetComponent <Text> ().text = value; } else { _radiusAPIThrow = ""; _radiusNative.transform.GetChild(0).gameObject.SetActive(false); _radiusNative.transform.GetChild(1).GetComponent <Text> ().text = "指定しない"; } } break; } }