Jump to content

  • Log In with Google      Sign In   
  • Create Account

14 years ago on June 15th Gamedev.net was first launched! We want to thank all of you for being part of our community and hope the best years are ahead of us. Happy birthday Gamedev.net!

#ActualFDsagizi

Posted 10 May 2012 - 09:57 AM

I, too, for some reason think that this is not enough, need try it!
wait for the new version!


[edit] I analyze this! Empty constructor is really need!

Example this code
Before reload ref_a.val == 10 after ref_a.val == -1

A ref_a;
B @r;

class A
{
	 int val;
}
class B
{
	 B(){
		  ref_a.val = -1;
	 }
}

void startGame()
{
	 @r = B();
	 ref_a.val = 10;
}

void reloaded()
{
	 output( "ref_a: " + ref_a.val );
}


#2FDsagizi

Posted 10 May 2012 - 09:56 AM

I, too, for some reason think that this is not enough, need try it!
wait for the new version!


[edit] I analyze this! Empty constructor is really need!

Example this code, after restore is no valid!



 A ref_a;
B @r;

class A
{
	 int val;
}
class B
{
	 B(){
		  ref_a.val = -1;
	 }
}

void startGame()
{
	 @r = B();
	 ref_a.val = 10;
}

void reloaded()
{
	 output( "ref_a: " + ref_a.val );
}


before reload ref_a.val == 10 after ref_a.val == -1

#1FDsagizi

Posted 10 May 2012 - 08:57 AM

I, too, for some reason think that this is not enough, need try it!
wait for the new version!Posted Image

PARTNERS