public void Bind(Line line) { if (textComponent_ == null) { textComponent_ = GetComponentInChildren <Text>(); strikeLine_ = textComponent_.GetComponentInChildren <UIGaugeRenderer>(includeInactive: true); checkMark_ = GetComponentInChildren <CheckMark>(includeInactive: true); listMark_ = GetComponentInChildren <Button>().GetComponentInChildren <UIMidairPrimitive>(); tagParent_ = GetComponentInParent <TagParent>(); } BindedLine = line; Text = line.TextWithoutHashTags; IsDone = line.IsDone; }
protected override void InitValue() { primitive_ = Object.GetComponentInChildren <MidairPrimitive>(); uiprimitive_ = Object.GetComponentInChildren <UIMidairPrimitive>(); if (initialValue_ != null) { UpdateAnimValue(); return; } if (primitive_ != null) { switch (Param) { case ParamType.PrimitiveRadius: initialValue_ = (float)primitive_.Radius; break; case ParamType.PrimitiveWidth: initialValue_ = (float)primitive_.Width; break; case ParamType.PrimitiveArc: initialValue_ = (float)primitive_.ArcRate; break; } } else if (uiprimitive_ != null) { switch (Param) { case ParamType.PrimitiveRadius: initialValue_ = (float)uiprimitive_.Radius; break; case ParamType.PrimitiveWidth: initialValue_ = (float)uiprimitive_.Width; break; case ParamType.PrimitiveArc: initialValue_ = (float)uiprimitive_.ArcRate; break; } } }
void Initialize() { primitive_ = GetComponentInChildren <UIMidairPrimitive>(); if (primitive_ == null) { primitive_ = new GameObject("primitive", typeof(UIMidairPrimitive)).GetComponent <UIMidairPrimitive>(); primitive_.gameObject.transform.parent = this.transform; } else { Thickness = primitive_.Width; } rect_ = GetComponent <RectTransform>(); Rect rect = rect_.rect; Width = rect.width; Height = rect.height; primitive_.Num = 4; primitive_.Angle = 45; }
// Use this for initialization void Awake() { textComponent_ = GetComponent <Text>(); check_ = GetComponentInChildren <CheckMark>(includeInactive: true); circle_ = GetComponentInChildren <UIMidairPrimitive>(includeInactive: true); }