Пример #1
0
    public void StartGame()
    {
        ResetPlayer();
        PlayerPrefs.DeleteAll();
        if (File.Exists(Application.persistentDataPath + "/slot1.dat"))
        {
            File.Delete(Application.persistentDataPath + "/slot1.dat");
        }
        SFXManager.SharedInstance.PlaySFX(SFXType.SoundType.UI_START_MENU_SELECT);
        thePlayer.isTalking = false;
        thePlayer.canMove   = true;
        //SceneManager.LoadScene("Kings Room");

        /*stats.AddStatsAtLevelUP(0);
         * stats.AddStatsToCharacter(stats.strengthLevels[stats.level], stats.defenseLevels[stats.level],
         *                        stats.magicAttLevels[stats.level], stats.magicDefLevels[stats.level],
         *                        stats.speedLevels[stats.level], stats.luckLevels[stats.level], stats.accuracyLevels[stats.level]);*/

        weaponManager.DeactivateWeapon(true);
        weaponManager.ResetToInitialWeapon();
        armorManager.ResetArmorsToInitial();
        accesoryManager.ResetAccesoriesToInitial();

        uiManager.WeaponEq();
        //armorManager.ChangeArmor(0);
        uiManager.ArmorEq();
        //accesoryManager.ChangeAccesory(0);
        uiManager.AccesoryEq();
        sceneTransition.Transition("Kings Room");
        //uiManager.ToggleHUD();
    }