i am freaking out of this engine !!!
by ken · in iTorque 2D · 05/15/2012 (4:31 am) · 5 replies
i write this function
function resetvariable()
{
echo("aaaaaaaaaaaaaahhhhH");
$game::timeX = 1;
}
and run my app on xcode ios simulator and take the result
then i change it to
function resetvariable()
{
echo("BBBBBaaaaaaaahhhhH");
$game::timeX = 0.1;
}
then "BBBBBaaaaaaaahhhhH" print in output but $game::timeX didn't change,
until i run iTorque2DGame app out of xcode,
WHAT IS THIS !?
function resetvariable()
{
echo("aaaaaaaaaaaaaahhhhH");
$game::timeX = 1;
}
and run my app on xcode ios simulator and take the result
then i change it to
function resetvariable()
{
echo("BBBBBaaaaaaaahhhhH");
$game::timeX = 0.1;
}
then "BBBBBaaaaaaaahhhhH" print in output but $game::timeX didn't change,
until i run iTorque2DGame app out of xcode,
WHAT IS THIS !?
#2
1- i said the output of echo has been change, but the variable remain unchanged, if it is related to dso files this never happen
2- i do delete dso files !!!!
05/15/2012 (8:46 am)
as you see,1- i said the output of echo has been change, but the variable remain unchanged, if it is related to dso files this never happen
2- i do delete dso files !!!!
#3
So whatever you had for $game::timeX is saved out to prefs.cs, which is executed every time you run the game. Change $game:: to something like $myGame::.
05/15/2012 (9:25 am)
OH! I see it now. It's because you are using the $game:: namespace. If you open scripts/system/properties.cs, then scroll down to _saveGameConfigurationData, you will see that all variables stored in $Game:: are exported:export("$Game::*", "./prefs.cs", true, false);So whatever you had for $game::timeX is saved out to prefs.cs, which is executed every time you run the game. Change $game:: to something like $myGame::.
#5
05/15/2012 (1:35 pm)
You're welcome.
Community Manager Michael Perry
ZombieShortbus