Hello there! Swap between multiple objects
Hi! I need some help understanding the way it can be done.
Lets say I have 2 objects a and b. If I want a to become b and b to become a I guess this is the way is done:
var temp_a:Object = a;
a = b;
b= temp_a;
This works perfectly fine with only 2 objects. The problem is when I am attempting to swap a with b, b with c and c with a.
Could please anyone help me make it through? If it does matter, I am working at a match 3 game where some rows are sliding left or right depending on a certain direction. It can go as a=c,c=b,b=a or a=b,b=c,c=a. I can make the gems swap positions correctly but as Objects, are the same as they were before.
