private void ChangeBodyImage() { Vector3 localPosition = new Vector3(-363f, -73f, 0f); int currentShopId = TransactionNPCManager.Instance.CurrentShopId; NPCShangChengBiao nPCShangChengBiao = DataReader <NPCShangChengBiao> .Get(currentShopId); if (nPCShangChengBiao != null) { int key = nPCShangChengBiao.shopNPC.get_Item(0); NPC nPC = DataReader <NPC> .Get(key); if (nPC != null && nPC.pic > 0) { int pic = nPC.pic; ResourceManager.SetSprite(this.ImageGril, GameDataUtils.GetIcon(pic)); base.FindTransform("RawImageGril").get_gameObject().SetActive(true); float num = (float)nPCShangChengBiao.deviation; localPosition = new Vector3(localPosition.x + num, localPosition.y, 0f); base.FindTransform("RawImageGril").get_transform().set_localPosition(localPosition); return; } } base.FindTransform("RawImageGril").get_transform().set_localPosition(localPosition); base.FindTransform("RawImageGril").get_gameObject().SetActive(false); }
public bool CheckIsNpcRandomShop(int shopId) { NPCShangChengBiao nPCShangChengBiao = DataReader <NPCShangChengBiao> .Get(shopId); return(nPCShangChengBiao.type == 1); }