Пример #1
0
    public void BackgroundBought(MyRoomBackgroundController background)
    {
        Vector3 pos = new Vector3(0, -5, 0);
        MyRoomBackgroundController newBackground = Instantiate(background, pos, background.transform.rotation);

        currentBackground = newBackground;
        SubtractStars(background.cost);
        SaveLoadMyRoom.instance.AddToMyBackground((int)background.backgroundID);
        MyRoomMainUIController.instance.ShowCurrentStars();
    }
Пример #2
0
 public void InstantiateMySavedItems()
 {
     for (int i = 0; i < myItemsList.Count; i++)
     {
         for (int x = 0; x < allItems.Length; x++)
         {
             if (myItemsList[i] == (int)allItems[x].itemID)
             {
                 Instantiate(allItems[x], myItemsPositionsList[i], transform.rotation);
             }
         }
     }
     for (int b = 0; b < allBackgrounds.Length; b++)
     {
         if (savedBackground == (int)allBackgrounds[b].backgroundID)
         {
             MyRoomBackgroundController bg = Instantiate(allBackgrounds[b], Vector3.zero, transform.rotation);
             MyRoomController.instance.currentBackground = bg;
         }
     }
 }