private void BindProperty(Transform t, ItemAttachAttr show, ItemAttachAttr change = null) { Util.SetText(t.GetComponent <Text>("value"), show.ValueString()); Util.SetText(t.GetComponent <Text>("type"), show.TypeString()); var c = t.GetComponent <Text>("value/change"); if (change != null) { Util.SetText(c, $"【+{change.ValueString()}】"); } var isMax = petSelectModule.selectInfo.IsEvolveMax(); c.SafeSetActive(!isMax); t.GetComponent <Transform>("value/max").SafeSetActive(isMax); }
private void BindPropertyRight(Transform t, ItemAttachAttr show, ItemAttachAttr change) { Util.SetText(t.GetComponent <Text>("attr_txt_03"), show != null ? show.ValueString() : "0"); Util.SetText(t.GetComponent <Text>("attr_txt_03/attr_txt_04"), $"【+{change.ValueString()}】"); Util.SetText(t.GetComponent <Text>("attr_txt_01"), show != null ? show.TypeString() : ""); }
public virtual void Bind(ItemAttachAttr rAttr) { Util.SetText(name, rAttr.TypeString()); Util.SetText(value, rAttr.ValueString()); }
private void BindPropertyLeft(Transform t, ItemAttachAttr show) { Util.SetText(t.GetComponent <Text>("attr_txt_02"), show != null ? show.ValueString() :"0"); Util.SetText(t.GetComponent <Text>("attr_txt_01"), show != null ? show.TypeString() : ""); }
public static string ShowString(this ItemAttachAttr rAttr) { return($"{rAttr.TypeString()}+{rAttr.ValueString()}"); }