public void SetIcon(Transform body, JobParam job) { Transform child1 = body.FindChild("ui_uniticon"); if (Object.op_Equality((Object)child1, (Object)null)) { return; } Transform child2 = child1.FindChild("unit"); if (Object.op_Equality((Object)child2, (Object)null)) { return; } Transform child3 = child2.FindChild(nameof(job)); if (Object.op_Equality((Object)child3, (Object)null)) { return; } RawImage_Transparent component = (RawImage_Transparent)((Component)child3).GetComponent <RawImage_Transparent>(); if (Object.op_Equality((Object)component, (Object)null)) { return; } MonoSingleton <GameManager> .Instance.ApplyTextureAsync((RawImage)component, job == null?(string)null : AssetPath.JobIconSmall(job)); }
private void CreateGoldObjects(Transform parent) { if (this.mCurrentQuest != null && !this.mCurrentQuest.IsVersus) { return; } if ((int)this.mResultData.Record.gold <= 0) { return; } GameObject gameObject = (GameObject)UnityEngine.Object.Instantiate <GameObject>((M0)this.TreasureListItem); gameObject.get_transform().SetParent(parent, false); this.mTreasureListItems.Add(gameObject); gameObject.SetActive(true); Transform child1 = gameObject.get_transform().FindChild("BODY/frame"); if (UnityEngine.Object.op_Inequality((UnityEngine.Object)child1, (UnityEngine.Object)null)) { Image_Transparent component = (Image_Transparent)((Component)child1).GetComponent <Image_Transparent>(); if (UnityEngine.Object.op_Inequality((UnityEngine.Object)component, (UnityEngine.Object)null) && UnityEngine.Object.op_Inequality((UnityEngine.Object) this.GoldFrame, (UnityEngine.Object)null)) { component.set_sprite(this.GoldFrame); } } Transform child2 = gameObject.get_transform().FindChild("BODY/itemicon"); if (UnityEngine.Object.op_Inequality((UnityEngine.Object)child2, (UnityEngine.Object)null)) { RawImage_Transparent component = (RawImage_Transparent)((Component)child2).GetComponent <RawImage_Transparent>(); if (UnityEngine.Object.op_Inequality((UnityEngine.Object)component, (UnityEngine.Object)null) && UnityEngine.Object.op_Inequality((UnityEngine.Object) this.GoldTex, (UnityEngine.Object)null)) { component.set_texture((Texture)this.GoldTex); } } Transform child3 = gameObject.get_transform().FindChild("BODY/amount/Text_amount"); if (!UnityEngine.Object.op_Inequality((UnityEngine.Object)child3, (UnityEngine.Object)null)) { return; } BitmapText component1 = (BitmapText)((Component)child3).GetComponent <BitmapText>(); if (!UnityEngine.Object.op_Inequality((UnityEngine.Object)component1, (UnityEngine.Object)null)) { return; } component1.text = this.mResultData.Record.gold.ToString(); }