- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
- 29
- 30
- 31
- 32
- 33
- 34
- 35
- 36
- 37
- 38
- 39
- 40
- 41
- 42
- 43
- 44
- 45
- 46
- 47
- 48
- 49
- 50
- 51
- 52
- 53
- 54
- 55
- 56
- 57
- 58
- 59
- 60
- 61
- 62
- 63
- 64
/**
* Saving game state
* @return Boolean is game saved
*/
public static function saveCurrentProfileProgress():Boolean
{
if( defProfile != null )
{
var levelName:String;
var sceneName:String;
if( Module.getSingleton().getCurrentEpisode() )
{
if( Module.getSingleton().getCurrentEpisode() == Module.getSingleton().mEpisode1 )
{
levelName = "1";
}
else if( Module.getSingleton().getCurrentEpisode() == Module.getSingleton().mEpisode2 )
{
levelName = "2";
}
/**
* И так далее
*/
else if( Module.getSingleton().getCurrentEpisode() == Module.getSingleton().mEpisode24 )
{
levelName = "24";
}
else if( Module.getSingleton().getCurrentEpisode() == Module.getSingleton().mEpisode25 )
{
levelName = "25";
}
if( Module.getSingleton().getCurrentEpisode().getCurrentScene() )
{
if( Module.getSingleton().getCurrentEpisode().mScene1Window && Module.getSingleton().getCurrentEpisode().getCurrentScene() == Module.getSingleton().getCurrentEpisode().mScene1Window )
{
sceneName = "1";
}
else if( Module.getSingleton().getCurrentEpisode().mScene2Window && Module.getSingleton().getCurrentEpisode().getCurrentScene() == Module.getSingleton().getCurrentEpisode().mScene2Window )
{
sceneName = "2";
}
else if( Module.getSingleton().getCurrentEpisode().mScene3Window && Module.getSingleton().getCurrentEpisode().getCurrentScene() == Module.getSingleton().getCurrentEpisode().mScene3Window )
{
sceneName = "3";
}
else if( Module.getSingleton().getCurrentEpisode().mScene4Window && Module.getSingleton().getCurrentEpisode().getCurrentScene() == Module.getSingleton().getCurrentEpisode().mScene4Window )
{
sceneName = "4";
}
else if( Module.getSingleton().getCurrentEpisode().mScene5Window && Module.getSingleton().getCurrentEpisode().getCurrentScene() == Module.getSingleton().getCurrentEpisode().mScene5Window )
{
sceneName = "5";
}
}
}
if ( levelName != null && sceneName != null )
{
saveLevelName( levelName + "_" + sceneName );
return true;
}
}
return false;
}