示例#1
0
    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();
    }
示例#2
0
	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;
	}
示例#3
0
    //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);
    }
 public void TextUpdateStatus()
 {
     pontos.text          = player.currentPontos.ToString();
     StatusTotais[0].text = player.danoTotal.ToString();
     StatusTotais[1].text = player.defTotal.ToString();
     StatusTotais[2].text = player.totalStamina.ToString();
     StatusTotais[3].text = player.totalLife.ToString();
     StatusTotais[4].text = PlayerStatsController.GetCurrentLevel().ToString();
     StatusTotais[5].text = PlayerStatsController.GetCurrentReputation().ToString();
 }