Beispiel #1
0
    private RoomData AddRoomFromFile(string roomKey)
    {
        RoomData newRoomData = new RoomData(this, roomKey);

        RoomSaverLoader.LoadRoomDataFromItsFile(newRoomData);
        roomDatas.Add(roomKey, newRoomData);
        return(newRoomData);
    }
Beispiel #2
0
    public void ReloadRoomData(string roomKey)
    {
        // Safety check.
        if (!roomDatas.ContainsKey(roomKey))
        {
            //Debug.LogWarning("Can't reload RoomData; doesn't exist. World: " + worldIndex + ", RoomKey: " + roomKey);
            //return;
            AddRoomFromFile(roomKey);
        }
        RoomData roomData = GetRoomData(roomKey);

        // Reload all of this roomData's contents! (WITHOUT remaking it or anything-- it's important to retain all references to it!)
        RoomSaverLoader.LoadRoomDataFromItsFile(roomData);
        // Refresh fundamental world/room properties!
        SetAllRoomDatasFundamentalProperties();
    }