void room_intro::transition(base_room* next)
{
if(transist>0)
{
switch(transist)
{
case 1: next = new room_floor1_1(); break;
}
}
}
So when clicked transition should go from NULL to a new room_floor_1_1 but it always returns NULL. I can't seem to find why this is happening.
Any help would be greatly appreciated.
Thanks,
The pointer is passed by value so the pointer inside the transition function is a copy of the pointer you pass to it. Changes made to the copy (inside the function) will not affect the original pointer.