Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // GameControllerScript
- // Token: 0x06000B1C RID: 2844
- public void Add2ItemSlots()
- {
- this.item = new int[5];
- RectTransform component = GameObject.Find("ItemBG").GetComponent<RectTransform>();
- component.anchoredPosition = new Vector3(component.anchoredPosition.x - 2.6f, component.anchoredPosition.y - 9f);
- component.localScale = new Vector3(component.localScale.x + 0.77f, component.localScale.y - 0.36f, component.localScale.z);
- this.itemSelect.localScale = new Vector3(this.itemSelect.localScale.x + 0.14f, this.itemSelect.localScale.y - 0.36f, this.itemSelect.localScale.z);
- GameObject gameObject = UnityEngine.Object.Instantiate<GameObject>(GameObject.Find("ItemSlot0"));
- GameObject gameObject2 = UnityEngine.Object.Instantiate<GameObject>(GameObject.Find("ItemSlot0"));
- gameObject.gameObject.name = "ItemSlot3";
- gameObject2.gameObject.name = "ItemSlot4";
- gameObject.transform.SetParent(GameObject.Find("Hud").transform);
- gameObject2.transform.SetParent(GameObject.Find("Hud").transform);
- gameObject.GetComponent<RectTransform>().anchoredPosition = new Vector3((float)this.itemSelectOffset[0], GameObject.Find("ItemSlot0").GetComponent<RectTransform>().anchoredPosition.y, 0f);
- gameObject2.GetComponent<RectTransform>().anchoredPosition = new Vector3((float)this.itemSelectOffset[1], GameObject.Find("ItemSlot0").GetComponent<RectTransform>().anchoredPosition.y, 0f);
- gameObject.GetComponent<RectTransform>().localScale = this.itemSlot[0].GetComponent<RectTransform>().localScale;
- gameObject2.GetComponent<RectTransform>().localScale = this.itemSlot[0].GetComponent<RectTransform>().localScale;
- gameObject.GetComponent<Transform>().rotation = Quaternion.identity;
- gameObject2.GetComponent<Transform>().rotation = Quaternion.identity;
- RawImage[] array = this.itemSlot;
- this.itemSlot = new RawImage[5];
- this.itemSlot[0] = gameObject.GetComponent<RawImage>();
- this.itemSlot[1] = gameObject2.GetComponent<RawImage>();
- this.itemSlot[2] = array[0];
- this.itemSlot[3] = array[1];
- this.itemSlot[4] = array[2];
- Texture2D texture2D = ModExtraAssets.Get<Texture2D>("ItemSlot5");
- GameObject.Find("ItemSlots").GetComponent<RawImage>().texture = texture2D;
- GameObject.Find("ItemText").GetComponent<RectTransform>().anchoredPosition = new Vector2(GameObject.Find("ItemText").GetComponent<RectTransform>().anchoredPosition.x, GameObject.Find("ItemText").GetComponent<RectTransform>().anchoredPosition.y + 20f);
- GameObject.Find("ItemText").GetComponent<RectTransform>().sizeDelta = new Vector2((float)texture2D.width, GameObject.Find("ItemText").GetComponent<RectTransform>().sizeDelta.y);
- GameObject.Find("ItemSlots").GetComponent<RectTransform>().sizeDelta = new Vector2((float)texture2D.width, (float)texture2D.height);
- GameObject.Find("ItemSlots").GetComponent<RectTransform>().anchoredPosition = new Vector2(GameObject.Find("ItemSlots").GetComponent<RectTransform>().anchoredPosition.x + 45f, GameObject.Find("ItemSlots").GetComponent<RectTransform>().anchoredPosition.y + 7f);
- this.itemSelect.anchoredPosition = new Vector3((float)this.itemSelectOffset[0] - 3.5f, -8.1f, 0f);
- foreach (RawImage rawImage in UnityEngine.Object.FindObjectsOfType<RawImage>())
- {
- if (rawImage.gameObject.name.Contains("ItemSlot") && rawImage.gameObject.name != "ItemSlots")
- {
- rawImage.gameObject.GetComponent<RectTransform>().anchoredPosition = new Vector2(rawImage.gameObject.GetComponent<RectTransform>().anchoredPosition.x - 6f, rawImage.gameObject.GetComponent<RectTransform>().anchoredPosition.y - 1f);
- rawImage.gameObject.GetComponent<RectTransform>().sizeDelta = new Vector3(rawImage.gameObject.GetComponent<RectTransform>().sizeDelta.x - 1.5f, rawImage.gameObject.GetComponent<RectTransform>().sizeDelta.y - 1.5f);
- }
- }
- GameObject.Find("ItemSlot0").GetComponent<RectTransform>().anchoredPosition = new Vector3((float)this.itemSelectOffset[2] - 6f, GameObject.Find("ItemSlot0").GetComponent<RectTransform>().anchoredPosition.y, 0f);
- GameObject.Find("ItemSlot1").GetComponent<RectTransform>().anchoredPosition = new Vector3((float)this.itemSelectOffset[3] - 6f, GameObject.Find("ItemSlot0").GetComponent<RectTransform>().anchoredPosition.y, 0f);
- GameObject.Find("ItemSlot2").GetComponent<RectTransform>().anchoredPosition = new Vector3((float)this.itemSelectOffset[4] - 6f, GameObject.Find("ItemSlot0").GetComponent<RectTransform>().anchoredPosition.y, 0f);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement