private void InitPickObjElement(int nImageCount) { GameObject pickObject = this.m_PickObject; if (pickObject != null) { CUIContainerScript component = pickObject.GetComponent <CUIContainerScript>(); if (component != null) { component.RecycleAllElement(); for (int i = 0; i < nImageCount; i++) { this.m_PickIdxList[i] = component.GetElement(); } } } }
public override void Validate() { this._urlaList = UrlAction.ParseFromText(base.view.activity.Content, null); int count = this._urlaList.Count; if (count > 0) { this._stepList.SetElementAmount(count); for (int i = 0; i < count; i++) { UrlAction urlAction = this._urlaList[i]; CUIListElementScript elemenet = this._stepList.GetElemenet(i); if (null != elemenet) { CUIHttpImageScript component = elemenet.GetComponent <CUIHttpImageScript>(); if (null != component) { component.SetImageUrl(urlAction.target); } } } this._pickIdxList = new int[count]; if (this._pickObject != null) { CUIContainerScript component2 = this._pickObject.GetComponent <CUIContainerScript>(); if (component2 != null) { component2.RecycleAllElement(); for (int j = 0; j < this._urlaList.Count; j++) { this._pickIdxList[j] = component2.GetElement(); } } } this._curStepIndex = 0; this._leftToRight = true; this._stepList.MoveElementInScrollArea(this._curStepIndex, true); this.EnablePickObj(this._curStepIndex); this._lastScrollTime = Time.time; this.updateOverTime(); } }