Exemplo n.º 1
0
    void Start()
    {
        animator       = GetComponentInChildren <Animator>();
        rigidbody2d    = GetComponent <Rigidbody2D>();
        playerRenderer = GetComponentInChildren <SpriteRenderer>();
        saver          = GameObject.FindGameObjectsWithTag("SaveObject")[0].GetComponent <SaveDataScript>();
        LoadData(saver.LoadData());
        Debug.Log("Start");
        //stats = new StatsStruct(PlayerStats.insight, PlayerStats.prowess, PlayerStats.strength);
        var   type    = PlayerClass.getClassSkill(playerClass);
        Skill skillCl = (Skill)gameObject.AddComponent(type);

        EquipSkill(skillCl, false);
        //constants

        uiController.SetLevelText(level);
        uiController.changeXp(0, 0, ReqXp);



        camOffset = new Vector3(0, 0, Camera.main.transform.position.z);
        UpdateStats();
    }