public void OnLoad()
    {
        string[] loadingData = DataBasePerfil.LoadDataChar();
        CharNome   = loadingData[0];
        CharClasse = loadingData[1];
        indexHead  = loadingData[2];
        indexBody  = loadingData[3];
        indexLegs  = loadingData[4];

        Debug.Log(CharNome + "/" + CharClasse);
    }
Esempio n. 2
0
    // Use this for initialization
    void Start()
    {
        string[] loadingData = DataBasePerfil.LoadDataChar();
        NomePersonagem   = loadingData[0];
        ClassePersonagem = loadingData[1];
        IndexHeadP       = int.Parse(loadingData[2]);
        IndexBodyP       = int.Parse(loadingData[3]);
        IndexLegsP       = int.Parse(loadingData[4]);


        Head.GetComponent <SpriteRenderer>().sprite = Visual.GetComponent <DataBaseVisual>().Heads[IndexHeadP];
        Body.GetComponent <SpriteRenderer>().sprite = Visual.GetComponent <DataBaseVisual>().Bodys[IndexBodyP];
        Legs.GetComponent <SpriteRenderer>().sprite = Visual.GetComponent <DataBaseVisual>().Legs[IndexLegsP];
    }
    public void OnCriarPesonagem()
    {
        nome = InputTmp.text;

        bool preenchido = checkClass();

        if (preenchido)
        {
            IndexHead = GetIndexChar.GetComponent <EditarPersonagem>().indexH;
            IndexBody = GetIndexChar.GetComponent <EditarPersonagem>().indexB;
            IndexLegs = GetIndexChar.GetComponent <EditarPersonagem>().indexL;
            DataBasePerfil.SaveDataChar(nome, classe, IndexHead, IndexBody, IndexLegs);

            Load.GetComponent <LoadCene>().OnStart();
        }
    }
Esempio n. 4
0
    // Use this for initialization
    void Start()
    {
        player = GetComponent <Transform>();

        anim.SetBool("Parado", true);
        anim.SetBool("DireitaAndando", false);
        anim.SetBool("EsquerdaAndando", false);
        anim.SetBool("FrenteAndando", false);
        anim.SetBool("CostasAndando", false);

        string[] loadingData = DataBasePerfil.LoadDataChar();
        IndexHeadP = int.Parse(loadingData[2]);
        IndexBodyP = int.Parse(loadingData[3]);
        IndexLegsP = int.Parse(loadingData[4]);

        HeadNome = Visual.GetComponent <DataBaseVisual>().Heads[IndexHeadP].name;
        BodyNome = Visual.GetComponent <DataBaseVisual>().Bodys[IndexBodyP].name;
        LegNome  = Visual.GetComponent <DataBaseVisual>().Legs[IndexLegsP].name;
    }