Пример #1
0
 public void SaveRoomFile()
 {
     // Save it!
     RoomSaverLoader.SaveRoomFile(CurrRoom);
     // Update properties that may have changed.
     if (CurrRoom.MyClusterData != null)
     {
         CurrRoom.MyClusterData.RefreshSnackCount();
     }
     // Update total edibles counts!
     dm.RefreshSnackCountGame();
 }
Пример #2
0
    private RoomData AddNewRoom(string roomKey)
    {
        if (GetRoomData(roomKey) != null)   // Safety check.
        {
            Debug.LogError("Whoa, trying to make a Room with key: " + roomKey + ", but one already exists!");
            return(null);
        }
        // Make/populate/add it!
        RoomData rd = new RoomData(this, roomKey);

        rd.SetPosGlobal(GetBrandNewRoomPos());
        RoomSaverLoader.AddEmptyRoomElements(ref rd);
        roomDatas.Add(roomKey, rd);
        // Refresh fundamental world/room properties!
        SetAllRoomDatasFundamentalProperties();
        // Save the file!
        RoomSaverLoader.SaveRoomFile(rd);
        return(rd);
    }