Regras do Shoutbox 1ªFlood {mensagens seguidas}: Não há limites, mas evitem poluir o shout. 2ªLinks: Proibido links de outros sites, a não ser de tópicos, vídeos no fórum e vídeos do canal dentro de spoilers. 3ªConversas: Se tiver duvidas sobre projetos, script e modelagem etc, abra um tópico na área desejada e aguarde ser respondido. 4ª Somente é permitido links de imagens com o link direto, se tiver com sites de blogs será removido. 5ªVídeos: Somente videos relacionados ao assunto do momento no shout e dentro de spoilers. 6ªSpam: Mensagens sem sentido, excesso de emoticons, fontes de tamanho exagerado, repetição de mensagens iguais. 7ªBanimento:Postagens de links com conteúdo pornográfico, mensagens ofensivas (palavrões),mensagens preconceituosas, acarretará em avaliação do moderador e pode causar expulsão do fórum..
-- [ Converse a vontade, mais cumprindo as regras acima. ]--
We've noticed that you've been inactive for over 10 minute(s). We've stopped running the Shoutbox due to your inactivity. If you are back again, please click the I'm Back button below.
(25 abril 2018 - 01:44 )Abaixo, deixarei o meu script no caso de alguém me ajuda:
using UnityEngine;
using System.Collections;
public class PlayerStatsController : MonoBehaviour {
public static PlayerStatsController intance;
public int xpMultiply = 1;
public float xpFirstLevel = 100;
public float difficultFactor = 1.5f;
// Use this for initialization
void Start () {
intance = this;
DontDestroyOnLoad (gameObject);
Application.LoadLevel ("GamePlay");
}
// Update is called once per frame
void Update () {
if (Input.GetKeyDown (KeyCode.A))
AddXp (100);
if (Input.GetKeyDown (KeyCode.R))
PlayerPrefs.DeleteAll ();
}
}
public static float GetCurrentXp(){
return PlayerPrefs.GetFloat ("currentXp");
}
public static int GetCurrentLevel (){
return PlayerPrefs.GetInt ("CurrentLevel");
}
public static void AddLevel (){
int newLevel = GetCurrentLevel()+1;
PlayerPrefs.SetInt("currentLevel", newLevel);
}
public static float GetNextXp(){
return PlayerStatsController.intance.xpFirstLevel*(GetCurrentLevel ()+1)*PlayerStatsController.intance.difficultFactor;
}
void OnGUI(){
GUI.Label (new Rect (0, 0, 100, 50), "Current Xp = " + GetCurrentXp ());
GUI.Label (new Rect (0, 15, 200, 50), "Current Level = " + GetCurrentLevel ());
GUI.Label (new Rect (0, 25, 200, 50), "Current Next Xp = " + GetNextXp ());
(25 abril 2018 - 01:43 )Criei todo o script certinho e mesmo assim o, ao apertar a tecla "A" (na qual o personagem recebe Xp) o Level não sobe...posso ficar apertando para receber Xp e mesmo assim o level não modifica, fica no 0
(25 abril 2018 - 01:41 )Olá pessoal, estou acompanhando a serie "Criando um RPG na UNITY", os primeiros vídeos se tratam sobre Level,Xp e Hp do personagem e ai que está o meu problema...
(17 abril 2018 - 06:00 )Boa tarde pessoal, que bom que o forum está voltando, estou terminando um GDD e ainda essa semana estarei criando um tópico pra podermos trabalhar, é bem simples e muito divertido.
(04 abril 2018 - 08:16 )Se eu largo um item com o amount 2, pego outro item do mesmo tipo e volto a pegar o item com amount 2, ele adiciona só 1 ao inves de 2