Say I have two classes of the same type, level1:tlevel and level2:tlevel. I wish to have level2 completely identical to level1, for instance level2.x and level1.x should be the same. First thought that comes to mind would be
But that doesn't work ;) How can I make a fast copy of all the contents to level2 from level1? I'd hate to have to write a manual function that copies it all over, e.g. :
Surely I'm missing something very basic here, just can't figure out what :P
level2 = level1
But that doesn't work ;) How can I make a fast copy of all the contents to level2 from level1? I'd hate to have to write a manual function that copies it all over, e.g. :
(pseudocode) copylvls(level1,level2) function copylvls(from:tlevel,to:tlevel) to.x = from.x ; to.y = from.y to.data = from.data to.speed = from.speed endfunction
Surely I'm missing something very basic here, just can't figure out what :P