Esempio n. 1
0
    public void StartNewGame(E_GameDifficulty difficulty)
    {
        ClearInstances();

        _GameType = E_GameType.SinglePlayer;

        Save_Clear();
        Save_Load();
        ClearStatistics();


        GameDifficulty = difficulty;

        Money = 0;


        // Debug.Log("start new game - first " + FirstTimePlayer);
        if (FirstTimePlayer)
        {
            _GameType = E_GameType.FirstTimeTutorial;
            PlayerPrefs.SetInt("firstTime", 1);

            CurrentLevel = "tutorial";
            Application.LoadLevel("empty");
            Application.LoadLevel(CurrentLevel);
        }
        else
        {
            CurrentLevel = "Comics01";
            Application.LoadLevel("empty");
            Application.LoadLevel(CurrentLevel);
        }
    }
Esempio n. 2
0
 public static void FlurryLogEndOfMission(E_GameType gameType, E_GameDifficulty difficulty, int level)
 {
     if (Application.platform != RuntimePlatform.OSXEditor)
     {
         _FlurryLogEndOfMission(gameType.ToString() + "-" + difficulty.ToString() + "-" + level);
     }
 }
Esempio n. 3
0
 public static void FlurryLogStartGame(E_GameType gameType, E_GameDifficulty diff)
 {
     if (Application.platform != RuntimePlatform.OSXEditor)
     {
         _FlurryLogStartGame(gameType.ToString(), diff.ToString());
     }
 }
Esempio n. 4
0
    public void Save_Load()
    {
        CurrentLevel         = PlayerPrefs.GetString(GameType + "Level", "level01");
        CurrentGameZone      = PlayerPrefs.GetInt(GameType + "GameZone", 0);
        CurrentSurvivalRound = PlayerPrefs.GetInt(GameType + "SurvivalRound", 0);
        GameDifficulty       = (E_GameDifficulty)PlayerPrefs.GetInt(GameType + "Difficulty", 0);

        Money       = PlayerPrefs.GetInt(GameType + "Money", 0);
        SwordLevel  = (E_SwordLevel)PlayerPrefs.GetInt(GameType + "Sword", 0);
        HealthLevel = (E_HealthLevel)PlayerPrefs.GetInt(GameType + "Health", 0);

        for (int i = 0; i < ComboLevel.Length; i++)
        {
            ComboLevel[i] = (E_ComboLevel)PlayerPrefs.GetInt(GameType + "Combo" + i, 0);
        }
    }
Esempio n. 5
0
    public void ResumeSurvivalMode()
    {
        if (Game.Instance.DisabledState > 1)
        {
            StartSurvivalMode();
            return;
        }
        ClearInstances();
        _GameType = E_GameType.Survival;

        Save_Load();
        LoadStatistics();

        GameDifficulty = E_GameDifficulty.Hard;
        _CurrentLevel  = "dojo";

        Application.LoadLevel(CurrentLevel);
    }
Esempio n. 6
0
    public void StartSurvivalMode()
    {
        ClearInstances();
        _GameType = E_GameType.Survival;

        ClearStatistics();
        Save_Clear();
        Save_Load();

        GameDifficulty = E_GameDifficulty.Hard;

        ComboLevel  = new E_ComboLevel[] { GetUnlockedCombo(0), GetUnlockedCombo(1), GetUnlockedCombo(2), GetUnlockedCombo(3), GetUnlockedCombo(4), GetUnlockedCombo(5) };
        SwordLevel  = GetUnlockedSword();
        HealthLevel = GetUnlockedHealth();

        _CurrentLevel = "dojo";

        Application.LoadLevel(CurrentLevel);
    }
Esempio n. 7
0
    public void StartChapterMode(int index)
    {
        string[] chapters = { "level01", "level01b", "level02", "level03", "level05", "level06", "level07" };
        ClearInstances();

        _GameType = E_GameType.ChapterOnly;

        Save_Clear();
        Save_Load();
        ClearStatistics();

        GameDifficulty = E_GameDifficulty.Hard;
        CurrentLevel   = chapters[index];

        ComboLevel  = new E_ComboLevel[] { GetUnlockedCombo(0), GetUnlockedCombo(1), GetUnlockedCombo(2), GetUnlockedCombo(3), GetUnlockedCombo(4), GetUnlockedCombo(5) };
        SwordLevel  = GetUnlockedSword();
        HealthLevel = GetUnlockedHealth();

        Application.LoadLevel(CurrentLevel);
    }