public void DrawList(List <Artifact> artifactList, int selfIndex, ArtifactManagement manager) { this.manager = manager; for (int i = 0; i < artifactList.Count; i++) { ArtifactPreview preview = Instantiate(previewPrefab, holder.transform); preview.setArtifact(artifactList[i], i, selfIndex, manager); } }
public void SetSelectedArtifact(ArtifactPreview selectedPreview) { if (this.selectedPreview != null) { this.selectedPreview.Blur(); (List <Artifact> list, ArtifactHolder holder)oldContainer = getArtifactContainers(this.selectedPreview.holderIndex); oldContainer.holder?.UpdateButtonHolderVisibility(false); } this.selectedArtifactIndex = selectedPreview.selfIndex; this.selectedHolderIndex = selectedPreview.holderIndex; this.selectedPreview = selectedPreview; this.selectedPreview.Focus(); (List <Artifact> list, ArtifactHolder holder)newContainer = getArtifactContainers(selectedHolderIndex); newContainer.holder?.UpdateButtonHolderVisibility(true); }
public void SetItemToHolder(ArtifactPreview preview) { preview.transform.parent = null; preview.transform.SetParent(holder.transform); }