protected void Start() { currentLevel = PlayerStatsController.GetCurrentLevel(); if (PlayerPrefs.GetString("CharClasse") == "Guerreiro") { PlayerStatsController.SetTypeCharacter(TypeCharacter.Guerreiro); Debug.Log("Guerreiro"); } else if (PlayerPrefs.GetString("CharClasse") == "Pistoleiro") { PlayerStatsController.SetTypeCharacter(TypeCharacter.Pistoleiro); Debug.Log("Pistoleiro"); } else if (PlayerPrefs.GetString("CharClasse") == "Bomber") { PlayerStatsController.SetTypeCharacter(TypeCharacter.Bomber); Debug.Log("Bomber"); } else { Debug.Log("Não carregou classe"); } type = PlayerStatsController.GetTypeCharacter(); basicStats = PlayerStatsController.instance.GetBasicStatsPlayer(type); MontarMissoes(); // adiciona todas missoes em um list base.Start(); TipoDeSlider(); }
protected void Start(){ base.Start(); windowRect = new Rect(Screen.width /2 - 200, Screen.height /2 - 250, 400, 500); if (PlayerPrefs.GetInt (PlayerStatsController.CurrentSave () + "newChar") == 1) newChar = true; else if (PlayerPrefs.GetInt(PlayerStatsController.CurrentSave ()+"newChar") == 0) newChar = false; currentLevel = PlayerStatsController.GetCurrentLevel(); type = PlayerStatsController.GetTypeCharacter(); basicStats = PlayerStatsController.intance.GetBasicStats(type); if (newChar) { PlayerStatsController.SetTypeCharacter(TypeCharacter.Beginner); currentLevel = 1; PlayerPrefs.SetInt(PlayerStatsController.CurrentSave ()+"currentLevel",currentLevel); PlayerPrefs.SetInt(PlayerStatsController.CurrentSave ()+"currentXP",0); int xpBase = 100; PlayerPrefs.SetFloat (PlayerStatsController.CurrentSave ()+"maxXP",xpBase); PlayerPrefs.SetFloat (PlayerStatsController.CurrentSave ()+"maxHP",basicStats.startHP); PlayerPrefs.SetFloat (PlayerStatsController.CurrentSave ()+"maxMP",basicStats.startMP); PlayerPrefs.SetFloat (PlayerStatsController.CurrentSave ()+"currentHP",basicStats.startHP); PlayerPrefs.SetFloat (PlayerStatsController.CurrentSave ()+"currentMP",basicStats.startMP); PlayerPrefs.SetFloat (PlayerStatsController.CurrentSave ()+"baseHP",basicStats.startHP); PlayerPrefs.SetFloat (PlayerStatsController.CurrentSave ()+"baseMP",basicStats.startMP); PlayerPrefs.SetInt (PlayerStatsController.CurrentSave ()+"currentAP", 10); PlayerPrefs.SetInt(PlayerStatsController.CurrentSave ()+"newChar", 0); PlayerPrefs.SetInt (PlayerStatsController.CurrentSave () + "STR", 0); PlayerPrefs.SetInt (PlayerStatsController.CurrentSave () + "DEX", 0); PlayerPrefs.SetInt (PlayerStatsController.CurrentSave () + "INT", 0); PlayerPrefs.SetInt (PlayerStatsController.CurrentSave () + "VIT", 0); } atributos = false; }
//private AnimationController animationController; // Start is called before the first frame update protected void Start() { base.Start(); currentLevel = PlayerStatsController.GetCurrentLevel(); type = PlayerStatsController.GetTypeCharacter(); //animationController = GetComponent<AnimationController>(); basicStats = PlayerStatsController.instance.GetBasicStats(type); }
//perguntar pro rodrigo como fazer escolha da classe do player por 1 método só public void SetPlayerType(int aux) { if (aux == 1) { PlayerStatsController.SetTyperCharacter(TypeCharacter.Killer); type = PlayerStatsController.GetTypeCharacter(); basicStats = PlayerStatsController.instance.GetBasicStats(type); } else if (aux == 2) { PlayerStatsController.SetTyperCharacter(TypeCharacter.Achiever); type = PlayerStatsController.GetTypeCharacter(); basicStats = PlayerStatsController.instance.GetBasicStats(type); } }