| | |
| | | public class ReikiRootPointBehaviour : MonoBehaviour
|
| | | {
|
| | | [SerializeField] Text m_PropertyName;
|
| | | [SerializeField] Text m_PropertyValue;
|
| | | [SerializeField] Text m_Point;
|
| | | [SerializeField] Button m_Add;
|
| | | [SerializeField] Button m_Sub;
|
| | |
| | | bool isPointAdd = false;
|
| | | bool isPointSub = false;
|
| | |
|
| | | int cacheQuality = 0;
|
| | |
|
| | | int coroutineCount = 0;
|
| | |
|
| | | static WaitForSeconds waitSpeedFaster = new WaitForSeconds(0.05f);
|
| | |
| | | {
|
| | | parent = win;
|
| | | this.id = id;
|
| | | DisplayBase();
|
| | |
|
| | | cacheQuality = 0;
|
| | |
|
| | | DisplayPoint();
|
| | |
|
| | | model.onReikiRootPointRefresh += OnReikiRootPointRefresh;
|
| | | }
|
| | |
|
| | | void DisplayBase()
|
| | | {
|
| | | var propertyConfig = PlayerPropertyConfig.Get(id);
|
| | | m_PropertyName.text = propertyConfig.Name;
|
| | | var qualiaty = model.GetReikiRootQuality(id);
|
| | | m_PropertyName.color = UIHelper.GetUIColor(qualiaty, true);
|
| | | m_PropertyValue.text = UIHelper.GetPropertyMapPlayerData((PropertyType)id).ToString();
|
| | | }
|
| | |
|
| | | void DisplayPoint()
|
| | | {
|
| | | m_Point.text = point.ToString();
|
| | | var original = model.GetReikiRootPoint(id);
|
| | | var addLabel = point == 0 ? string.Empty : UIHelper.AppendColor(TextColType.Green, "+" + point, true);
|
| | | var quality = model.GetReikiRootQuality(id, original + point);
|
| | | var areaPoint = model.GetQualityPoint(id, quality + 1);
|
| | | if (areaPoint == 0)
|
| | | {
|
| | | m_Point.text = StringUtility.Contact(original, addLabel);
|
| | | }
|
| | | else
|
| | | {
|
| | | m_Point.text = StringUtility.Contact(original, addLabel, "/", areaPoint);
|
| | | }
|
| | |
|
| | | if (cacheQuality != quality)
|
| | | {
|
| | | var propertyConfig = PlayerPropertyConfig.Get(id);
|
| | | m_PropertyName.text = StringUtility.Contact(propertyConfig.Name, ReikiRootModel.GetQualityLabel(quality));
|
| | | m_PropertyName.color = UIHelper.GetUIColor(quality, true);
|
| | | cacheQuality = quality;
|
| | | }
|
| | | }
|
| | |
|
| | | private void OnAddDown(GameObject go)
|
| | |
| | |
|
| | | private void OnReikiRootPointRefresh()
|
| | | {
|
| | | DisplayBase();
|
| | | if (point == 0)
|
| | | {
|
| | | DisplayPoint();
|
| | | }
|
| | | else
|
| | | {
|
| | | point = 0;
|
| | | }
|
| | | }
|
| | |
|
| | | private void OpenKeyboard()
|