RedUniverse fundamental object in the RedUniverse toolkit
first read the readme.txt and then see the file redUniverseExamplesOverview for the fun stuff.
global class for dealing with worlds. there is only ever one universe. all worlds register themselves in the universe when created.
class methods:
*clear
clear all worlds
*add(redWorld)
manually add a world to the universe. usually never needed.
*remove(redWorld)
manually remove a world from the universe.
*migrate(redObj, toRedWorld)
move one object from its world to another.
*migrateAll(fromRedWorld, toRedWorld)
move all objects in one world to another.
*interpolate(aRedWorld, bRedWorld, percent= 0.5)
return a new world inbetween to other. all world parameters are interpolated but objects stay.
*interpolateMigrate(aRedWorld, bRedWorld, percent= 0.5)
interpolates and also move over all objects. usually you will want to remove the old worlds manually
*write(path)
save all worlds and objects and their respective state to disk.
*read(path)
import worlds and objects and their respective state from disk.
class variables:
<>worlds
array of all available worlds
a= RedWorld.new
b= RedObject(a)
RedUniverse.worlds
RedUniverse.remove(a)
RedUniverse.worlds
RedUniverse.write("testsave")
RedUniverse.clear
RedUniverse.worlds
RedUniverse.read("testsave")
RedUniverse.worlds